-
Notifications
You must be signed in to change notification settings - Fork 677
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
Toolkits/issue949 generate openai tool schema #1070
Open
Zhangzeyu97
wants to merge
14
commits into
master
Choose a base branch
from
toolkits/issue949_generate_openai_tool_schema
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Toolkits/issue949 generate openai tool schema #1070
Zhangzeyu97
wants to merge
14
commits into
master
from
toolkits/issue949_generate_openai_tool_schema
+510
−7
Commits on Oct 17, 2024
-
refactor: update FunctionTool to generate OpenAI tool schema
This commit refactors the `FunctionTool` class in the `function_tool.py` file. It adds a new method `generate_openai_tool_schema` that uses an optional assistant model to generate the OpenAI tool schema for the specified function. If no assistant model is provided, it defaults to creating a GPT_4O_MINI model. The function's source code is used to generate a docstring and schema, which are validated before returning the final schema. If schema generation or validation fails, the process retries up to two times. This refactor improves the functionality and flexibility of the `FunctionTool` class.
Configuration menu - View commit details
-
Copy full SHA for c2b8dc8 - Browse repository at this point
Copy the full SHA c2b8dc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for bde54d8 - Browse repository at this point
Copy the full SHA bde54d8View commit details
Commits on Oct 18, 2024
-
"Adjusted the code to comply with PEP 8 line length standards. Added the `use_schema_assistant` parameter in `FunctionTool` to control whether to use LLM to generate the schema, with a default value of `False`."
Configuration menu - View commit details
-
Copy full SHA for 6d08771 - Browse repository at this point
Copy the full SHA 6d08771View commit details -
Configuration menu - View commit details
-
Copy full SHA for 942b6e4 - Browse repository at this point
Copy the full SHA 942b6e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 21df8fa - Browse repository at this point
Copy the full SHA 21df8faView commit details -
Configuration menu - View commit details
-
Copy full SHA for fd071d6 - Browse repository at this point
Copy the full SHA fd071d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for c8a3c53 - Browse repository at this point
Copy the full SHA c8a3c53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 802d074 - Browse repository at this point
Copy the full SHA 802d074View commit details -
Configuration menu - View commit details
-
Copy full SHA for a343510 - Browse repository at this point
Copy the full SHA a343510View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7fb038f - Browse repository at this point
Copy the full SHA 7fb038fView commit details
Commits on Oct 19, 2024
-
Apply suggestions from code review
Co-authored-by: Guohao Li <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 387a648 - Browse repository at this point
Copy the full SHA 387a648View commit details -
Configuration menu - View commit details
-
Copy full SHA for e8d45a4 - Browse repository at this point
Copy the full SHA e8d45a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9413ec6 - Browse repository at this point
Copy the full SHA 9413ec6View commit details -
Configuration menu - View commit details
-
Copy full SHA for d2616f4 - Browse repository at this point
Copy the full SHA d2616f4View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.