Skip to content

Commit

Permalink
Fix thmsmlr#78, add an error handler for unknown Gemini responses
Browse files Browse the repository at this point in the history
  • Loading branch information
vkryukov committed Nov 9, 2024
1 parent 1abd847 commit d456a4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/instructor/adapters/gemini.ex
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ defmodule Instructor.Adapters.Gemini do
Jason.decode(text)
end

defp parse_response_for_mode(mode, response) do
{:error, "Unsupported Gemini mode #{mode} with response #{inspect(response)}"}
end

defp parse_stream_chunk_for_mode(
:tools,
%{
Expand Down

0 comments on commit d456a4b

Please sign in to comment.