Skip to content

Commit

Permalink
handled case where is
Browse files Browse the repository at this point in the history
  • Loading branch information
bauerem committed Nov 23, 2024
1 parent 8abb2c0 commit b454c42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/partners/ollama/langchain_ollama/chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _get_tool_calls_from_response(
"""Get tool calls from ollama response."""
tool_calls = []
if response.get("message", None):
if "tool_calls" in response["message"]:
if response.get("tool_calls", None):
for tc in response["message"]["tool_calls"]:
tool_calls.append(
tool_call(
Expand Down

0 comments on commit b454c42

Please sign in to comment.