-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instructor.echo_response/1
no function clause matching
#32
Comments
Does your code also use validations and max_retries? Could be a weird interaction between the vision api response and the instructor validation / reasking feature |
Yes, this is the code we're using: Instructor.chat_completion(
model: "gpt-4-vision-preview",
response_model: __MODULE__,
max_tokens: 800,
max_retries: 3,
mode: :md_json,
messages: [
%{
role: "user",
content: [
%{type: "text", text: data.image_to_text_prompt},
%{type: "image_url", image_url: %{url: data.original_image, detail: "high"}}
]
},
%{
role: "system",
content: "Straightforward and direct answers."
}
]
) And we're doing validation with |
I had the same issue here too
Looks like |
I am getting this issue as well. I'm not using vision though. Just sending regular text. I seem to be getting this with both the chat gpt and ollama adapters. And I'm using the json mode, while this seems related to tool calling so I don't really get what's happening |
We have hit this problem too, and appreciate the fix. Is there any chance this can be merged back to main? |
We are using Version
0.0.5
in our application. We recently got this error:I couldn't find time to look at the code yet. Maybe I could provide a fix for this later.
The text was updated successfully, but these errors were encountered: