Fix AsyncChat to handle unmapped models (fixes #42)#100
Conversation
|
The failed test are due to nbdev v3 not being released, I had the same issue in solveit, fixed it by pip installing main from nbdev. The removal of settings.ini made cachy misbehave, it looks for the root of the project in settings.ini |
|
Thanks! What's needed to move this from draft? BTW want to see if there's some dupe code you can factor out across the 2 implementations? |
|
It is ready, cachy wasn't working with nbdev3, I see that you fixed cachy already, make sense. I would love unify async and sync code, I'll make another pr. |
There was a problem hiding this comment.
The sync Chat._call method also has the following (just before calling completion):
if self.api_base: kwargs['api_base'] = self.api_base
if self.api_key: kwargs['api_key'] = self.api_key
You could include that in this PR too so that azure models are supported at the same time
| try: | ||
| model_info = get_model_info(self.model) |
There was a problem hiding this comment.
| try: | |
| model_info = get_model_info(self.model) | |
| try: model_info = get_model_info(self.model) |
Minor FYI - no need to use 2 lines for stuff like this.
Apply the same fix from #68 to AsyncChat._call() method. Wraps get_model_info() in try-except to register unknown models before querying their info.