Skip to content
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

feat(api): switch func calling to tools #157

Merged
merged 1 commit into from
Apr 27, 2024
Merged

feat(api): switch func calling to tools #157

merged 1 commit into from
Apr 27, 2024

Conversation

appleboy
Copy link
Owner

  • Add imports for "fmt" and "log" in commit.go
  • Refactor message output to use a variable in commit.go
  • Update error handling for completion response to check for both errors and the number of choices in commit.go
  • Simplify the handling of summary prefix by removing conditional checks and replacing them with a single error check and assignment in commit.go
  • Change CreateFunctionCall to accept a single FunctionDefinition instead of a variadic slice in openai.go
  • Remove hardcoded system message content in openai.go
  • Replace Functions field with Tools in CreateFunctionCall to use the new Tool struct in openai.go
  • Remove specific function call strings from the allow list in openai.go and replace with a single entry

fix #156

- Add imports for "fmt" and "log" in `commit.go`
- Refactor message output to use a variable in `commit.go`
- Update error handling for completion response to check for both errors and the number of choices in `commit.go`
- Simplify the handling of summary prefix by removing conditional checks and replacing them with a single error check and assignment in `commit.go`
- Change `CreateFunctionCall` to accept a single `FunctionDefinition` instead of a variadic slice in `openai.go`
- Remove hardcoded system message content in `openai.go`
- Replace `Functions` field with `Tools` in `CreateFunctionCall` to use the new `Tool` struct in `openai.go`
- Remove specific function call strings from the allow list in `openai.go` and replace with a single entry

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
@appleboy appleboy changed the title feat: switch func calling to tools feat(api): switch func calling to tools Apr 27, 2024
@appleboy appleboy merged commit 3ea1edf into main Apr 27, 2024
9 checks passed
@appleboy appleboy deleted the tools branch April 27, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

switch FunctionCall to Tools.
1 participant