instructor_ex icon indicating copy to clipboard operation
instructor_ex copied to clipboard

`Instructor.echo_response/1` no function clause matching

Open kevinschweikert opened this issue 11 months ago • 5 comments

We are using Version 0.0.5 in our application. We recently got this error:

** (FunctionClauseError) no function clause matching in Instructor.echo_response/1
(instructor 0.0.5) lib/instructor.ex:510: Instructor.echo_response(%{"choices" => [%{"finish_reason" => "stop", "index" => 0, "message" => %{"content" => "[OUR_CONTENT]", "role" => "assistant"}}], "created" => 1709884788, "id" => "chatcmpl-90PQq8TYhzCvxtCz2w2xneKudwU0O", "model" => "gpt-4-1106-vision-preview", "object" => "chat.completion", "usage" => %{"completion_tokens" => 76, "prompt_tokens" => 1408, "total_tokens" => 1484}})
(instructor 0.0.5) lib/instructor.ex:456: anonymous fn/3 in Instructor.do_chat_completion/3

I couldn't find time to look at the code yet. Maybe I could provide a fix for this later.

kevinschweikert avatar Mar 08 '24 09:03 kevinschweikert