-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] ToolAssistantToolsFunction can't find #475
Conversation
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the To trigger a single review, invoke the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing. Actually, I have some questions for @ocss884 about the preivous code logic.
camel/functions/openai_function.py
Outdated
@@ -245,7 +179,6 @@ def get_openai_tool_schema(self) -> Dict[str, Any]: | |||
Returns: | |||
Dict[str, Any]: The OpenAI tool schema for this function. | |||
""" | |||
self.validate_openai_tool_schema(self.openai_tool_schema) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we validate openai_tool_schema
during get
but not set
in the previous version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we validate
openai_tool_schema
duringget
but notset
in the previous version?
@dandansamax Sry I have no idea. I only add pydantic
v1 support to this function before. The main logic was done in #393 . See /~https://github.com/camel-ai/camel/pull/393/files#diff-5ef2fd2f375255947f98e1a9359dd96d48d9e548b32312be896ab05dd47e9b17R242-R253.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ocss884. Let's call the author. Hi @forever-ly, do you have some ideas?
Edit: let's make it a new issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! We should quickly merge it to avoid holding up other PRs.
Description
since openai==1.14.0
ToolAssistantToolsFunction
has been moved, which will lead to the error:ImportError: cannot import name 'ToolAssistantToolsFunction' from 'openai.types.beta.threads.run'
Motivation and Context
if it's not needed, simply remove
def validate_openai_tool_schema
Types of changes
What types of changes does your code introduce? Put an
x
in all the boxes that apply:Implemented Tasks
Checklist
Go over all the following points, and put an
x
in all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!