Replies: 7 comments 4 replies
-
this is also a requirement for OpenAI Codex |
Beta Was this translation helpful? Give feedback.
-
If implemented this may resolve issues with Agent calls from n8n n8n-io/n8n#13112 The current version of OpenAI API agent calls via the n8n chain results in the same error output when called as |
Beta Was this translation helpful? Give feedback.
-
It also affects usage inside zed.dev - they need tool use support in stream |
Beta Was this translation helpful? Give feedback.
-
It's being worked on: #12379 |
Beta Was this translation helpful? Give feedback.
-
I think streaming tool call support is very important. I only provide the model with programming interfaces, allowing it to programmatically fetch information (such as the current time). After thinking, the model is more likely to use tools and correctly write code. The content during the thinking phase and the tool calls are separate. It would be great if the thinking phase could be viewed in a streaming manner, so we don’t have to wait indefinitely for an unknown duration (although the thinking time is still unknown, we could at least see the model’s current progress). Of course, it would be even better if full streaming tool calls were directly supported, enabling models without thinking capabilities to use tools while streaming. Excerpted part of the code which i tested messages = [
{"role": "system", "content": "You are a helpful assistant.\nYou can call functions with appropriate input when necessary(Even solved through programming APIs)."},
{"role": "user", "content": "what time is it now?"},
]
API_tools = [
{
"type": "function",
"function": {
"name": "lua54",
"description": "some possible problems that need to be solved through programming APIs, can be solved through Lua, version Lua54, the output content needs to be output through print (not only expressions), the return value is json (code, stdout, stderr)."},
"parameters": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "the code to execute"
},
"cwd": {
"type": "string",
"description":"current working directory (optional)"
},
"env": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "environment variables (optional)"
}
},
"required": [
"code"
]
}
}
}
]
payload = {
...
"tools": API_tools,
"tool_choice": "auto",
}
def Lua54Service(code, cwd=None, env=None):
try:
process = subprocess.Popen(
[executable, "-e", code],
cwd=cwd or os.getcwd(),
env={**os.environ, **(env or {})},
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True
)
stdout, stderr = process.communicate()
return {"code": process.returncode, "stdout": stdout, "stderr": stderr}
except Exception as e:
raise RuntimeError(f"Lua execution failed: {str(e)}") |
Beta Was this translation helpful? Give feedback.
-
Streaming tool calls just got merged and is available in the latest release :) |
Beta Was this translation helpful? Give feedback.
-
The proxy lives here now |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
5ire, the most recommended open source MCP client requires streaming and tool use.
however, llama_server doesn't allow this:
llama.cpp/examples/server/utils.hpp
Line 565 in f17a3bb
it would be great to be able to use this tool with llama.cpp directly.
Beta Was this translation helpful? Give feedback.
All reactions