This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
forked from ChatGPTNextWeb/ChatGPT-Next-Web
-
Notifications
You must be signed in to change notification settings - Fork 8
Feat ChatGPT LLM Api Tools A.ka Function Calling #86
Draft
H0llyW00dzZ
wants to merge
11
commits into
main
Choose a base branch
from
functionalcalling
base: main
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.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[+] feat(openai.ts): add getFunctionCalling method to ChatGPTApi class [+] feat(openai.ts): implement getFunctionCalling method to handle function calling customization [+] feat(openai.ts): update chat method to use getFunctionCalling method [+] feat(config.ts): add istools property to modelConfig in DEFAULT_CONFIG [+] feat(config.ts): update version to 4.3 in useAppConfig migration
[+] feat(locales): add translations for FunctionCall component in cn, en, and id locales
[+] feat(settings.tsx): add import statement for Tool and useToolStore from "../store/tools" [+] feat(constant.ts): add Tool enum value to FileName enum [+] feat(constant.ts): add Tool enum value to StoreKey enum [+] feat(store/tools.ts): create Tool, ToolParameter, ToolFunction interfaces [+] feat(store/tools.ts): create SearchServicez object with methods for initializing, removing, adding, and searching tools [+] feat(store/tools.ts): create useToolStore with methods for adding, getting, removing, updating, and searching tools [+] feat(store/tools.ts): create persist store configuration for useToolStore with migration and rehydration logic [+] feat(public/tools.json): add tools.json file with example tool data in English and Chinese languages
[+] chore(settings.tsx): fix import statement for ToolSearchService in settings.tsx [+] fix(tools.ts): rename SearchServicez to ToolSearchService [+] refactor(tools.ts): update references to SearchServicez to ToolSearchService [+] refactor(tools.ts): update references to SearchServicez.builtinTools to ToolSearchService.builtinTools [+] refactor(tools.ts): update references to SearchServicez.search to ToolSearchService.search [+] refactor(tools.ts): update references to SearchServicez.count.builtin to ToolSearchService.count.builtin [+] refactor(tools.ts): update references to SearchServicez.init to ToolSearchService.init
[+] refactor(tools.ts): Update Tool interface to include additional properties [+] fix(tools.ts): Change parameter name in remove function from id to name [+] feat(tools.ts): Add support for updating tools by id instead of name [+] chore(tools.ts): Refactor initialization of ToolSearchService to include additional properties
[+] refactor(tools.ts): remove unused title and content properties from Tool interface [+] feat(tools.ts): add type property to Tool interface [+] refactor(tools.ts): update filter condition in useToolStore to check function name and description for search
[+] chore(tools.json): update tools.json with new structure and add support for unit parameter - Update the "type" field to "name" field - Add "type" field to the "parameters" object - Add "properties" field to the "parameters" object - Add "required" field to the "parameters" object
[+] chore(tools.ts): refactor ToolParameter interface to include optional properties, enum, and required fields [+] feat(tools.ts): update useToolStore to include support for nested parameters in tool functions [+] fix(tools.ts): fix bug in useToolStore where builtinTools were not being properly mapped
[+] fix(openai.ts): change tools from object to array in the payload [+] fix(openai.ts): add required property for location in the tools payload [+] fix(openai.ts): change modelConfig.model to defaultModel in getFunctionCalling function call [+] fix(openai.ts): change modelConfig.istools to modelConfig.isTools in getFunctionCalling function call [+] fix(openai.ts): add toolsPayload variable to getFunctionCalling function call [+] fix(openai.ts): add toolsPayload to the magicPayload object [+] fix(openai.ts): add comment explaining the bug in the code [+] fix(tools.ts): add type assertion to the tool object in the map function
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Ref Yidadaa#3217
Note : this just a experimental from my idea