Skip to content

Commit

Permalink
fix: LLM call crash when no tools
Browse files Browse the repository at this point in the history
See #399
  • Loading branch information
clemlesne committed Jan 21, 2025
1 parent bb07eee commit 516bacc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/helpers/llm_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ async def _completion_stream_worker(
max_tokens=max_tokens,
messages=prompt,
stream=True,
tools=tools,
# AI Inference API doesn't support enpty tools array
# See: https://github.com/microsoft/call-center-ai/issues/399
tools=tools or None,
)

# Yield chuncks
Expand Down

0 comments on commit 516bacc

Please sign in to comment.