Skip to content

Commit 516bacc

Browse files
committed
fix: LLM call crash when no tools
See #399
1 parent bb07eee commit 516bacc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/helpers/llm_worker.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ async def _completion_stream_worker(
148148
max_tokens=max_tokens,
149149
messages=prompt,
150150
stream=True,
151-
tools=tools,
151+
# AI Inference API doesn't support enpty tools array
152+
# See: https://github.com/microsoft/call-center-ai/issues/399
153+
tools=tools or None,
152154
)
153155

154156
# Yield chuncks

0 commit comments

Comments
 (0)