Skip to content

Commit

Permalink
quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibondarev committed Sep 11, 2024
1 parent 6e83c6c commit feaeb73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/langchain/llm/google_vertex_ai.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def chat(params = {})
params[:system] = {parts: [{text: params[:system]}]} if params[:system]
params[:tools] = {function_declarations: params[:tools]} if params[:tools]
# This throws an error when tool_choice is passed
params[:tool_choice] = {function_calling_config: {mode: params[:tool_choice].upcase}} if params[:tool_choice]
# params[:tool_choice] = {function_calling_config: {mode: params[:tool_choice].upcase}} if params[:tool_choice]

raise ArgumentError.new("messages argument is required") if Array(params[:messages]).empty?

Expand Down

0 comments on commit feaeb73

Please sign in to comment.