Open
Description
Cortex version
v1.0.12
Describe the issue and expected behaviour
The following code works as expected:
output = client.chat.completions.create(
model=session.model_id,
messages=messages,
stream=True,
)
print(f'Output: {list(output)}')
However, when I add tools=my_tools,
the response becomes the empty list. If I then remove stream=True
, the response is again correct, only that streaming being disable, it's returned all at once.
I expected stream=True
and tools=...
to work together as per https://platform.openai.com/docs/guides/function-calling#streaming.
Steps to Reproduce
No response
Screenshots / Logs
No response
What is your OS?
- Windows
- Mac Silicon
- Mac Intel
- Linux / Ubuntu
What engine are you running?
- cortex.llamacpp (default)
- cortex.tensorrt-llm (Nvidia GPUs)
- cortex.onnx (NPUs, DirectML)
Hardware Specs eg OS version, GPU
No response