-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
Since #521 is closed state, creating a new issue.
Now, the initial PR #522 for the issue was reverted by this PR, #584 recently, I think we need to keep this issue.
BootstrapFewShot failing due to lm.copy for AzureOpenAI, likely due to positional argument issue from recent changes.
Environment
- code: 98304a2
- model azure openai
Error message
- during
BootstrapFewShotrun, code errored out due to missing arguments,api_version
>[dspy/dsp/modules/lm.py](https://file+.vscode-resource.vscode-cdn.net/Users/insop/Projects/Github/NLP/dspy/dsp/modules/lm.py)(106)copy()
102 model = kwargs.pop('model')
105
--> 106 return self.__class__(model, **kwargs)
Changes
AzureOpenAI expects positional arguments, so it is failing. I am putting my change for review if that will impact other models.
class AzureOpenAI(LM):
...
def __init__(
self,
api_base: str,
api_version: str,
model: str = "gpt-3.5-turbo-instruct",
api_key: Optional[str] = None,
model_type: Literal["chat", "text"] = "chat",
**kwargs,
):
Metadata
Metadata
Assignees
Labels
No labels