You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When trying to use Pydantic validation class with Instructor's response_model, Azure OpenAI throws error saying that both Functions and Tools cannot be used together. I've noticed there was some push for refactoring the "function_calls.py". I've done the changes locally but it still fails.
These are versions I am currently using:
GPT_MODEL = "gpt-35-turbo-16k"
api_version="2023-12-01-preview"
openai version= 1.7.1
I've tried openai version 1.5.0, but it's the same.
Code example:
This is my validator class:
class SQLValidator(BaseModel):
question: str
answer: Annotated[
str,
BeforeValidator(
instructor.llm_validator("SQL query must be logically and syntactically correct.", allow_override=True)
)
]
Describe the bug
When trying to use Pydantic validation class with Instructor's response_model, Azure OpenAI throws error saying that both Functions and Tools cannot be used together. I've noticed there was some push for refactoring the "function_calls.py". I've done the changes locally but it still fails.
These are versions I am currently using:
GPT_MODEL = "gpt-35-turbo-16k"
api_version="2023-12-01-preview"
openai version= 1.7.1
I've tried openai version 1.5.0, but it's the same.
Code example:
This is my validator class:
and it is used here:
This is the error:
Am I doing some silly mistake or is this problem with compatibility of Azure OpenAI service with Instructor?
Edit:
I have verified that the same error goes for Non-Azure version of OpenAI as well.
The text was updated successfully, but these errors were encountered: