feat: Support stream + tool call + structured output#3821
feat: Support stream + tool call + structured output#3821Zephyroam wants to merge 17 commits intocamel-ai:masterfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Removed the _format_message_with_fallback method and its usages throughout the chat_agent.py file.
fengju0213
left a comment
There was a problem hiding this comment.
Nice implementation. I noticed that we also added a fallback mechanism. I think retaining the native capabilities of the OpenAI SDK is already sufficient, and introducing a fallback would bring significant maintenance overhead. I suggest removing the related code.
Since this PR was submitted via a forked repository, I’m not able to submit a PR myself, so I made the changes directly in your PR.
|
Now Gemini and Claude are supported. |
…all-structured-output
…all-structured-output
…all-structured-output
waleedalzarooni
left a comment
There was a problem hiding this comment.
Great job @Zephyroam!,
Couple of quick comments
…all-structured-output
|
I've been wondering about something. Since the OpenAI SDK doesn't natively support simultaneous structured outputs and tool calling in streaming mode, our current approach departs from the native pattern. Should we avoid building these custom workarounds for capabilities the model doesn't currently support? After all, as the model's capabilities evolve, this adaptation code will likely become obsolete. |
It brings value to the agent framework by adding useful features beyond the current base model. While model platforms may support this natively in the future, the implementation cost is low. Given how important and useful it is, I think doing it ourselves makes sense |
bytecii
left a comment
There was a problem hiding this comment.
In general LGTM, left some comments
…est-support-stream-tool-call-structured-output
|
Done, thanks for your comments @bytecii |
|
https://github.com/camel-ai/camel/pull/3821/changes#diff-f90260a7e58e0c09b9d2e737a580635d71a7310f1a4adebdb3b41323a960698cR744 |
Description
Fixes #3782
Checklist
Go over all the following points, and put an
xin all the boxes that apply.Fixes #issue-numberin the PR description (required)pyproject.tomlanduv lockIf you are unsure about any of these, don't hesitate to ask. We are here to help!