feat: add system message support for Anthropic provider#25
Merged
akshaydeo merged 1 commit into04-16-feat_readmefrom Apr 30, 2025
Merged
feat: add system message support for Anthropic provider#25akshaydeo merged 1 commit into04-16-feat_readmefrom
akshaydeo merged 1 commit into04-16-feat_readmefrom
Conversation
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merged
81b2cc0 to
e8a891c
Compare
akshaydeo
reviewed
Apr 27, 2025
| for i, choice := range result.Choices { | ||
| if choice.Message.ToolCalls != nil && len(*choice.Message.ToolCalls) > 0 { | ||
| toolCall := *choice.Message.ToolCalls | ||
| fmt.Printf("\n🐒 %s Tool Call Result %d (Choice %d): %s\n", config.Provider, index+1, i+1, toolCall[0].Function.Arguments) |
Contributor
There was a problem hiding this comment.
remove all these from the codebase - fmt.Printf is an expensive line
Collaborator
Author
There was a problem hiding this comment.
its only there in the test files so do we need to remove it? cause anyway it is not interfering with the core working
e8a891c to
380f868
Compare
40daf2a to
ee1d513
Compare
ee1d513 to
4a88643
Compare
64bce76 to
1520f38
Compare
6727e2e to
fa3c0b1
Compare
1520f38 to
180a91a
Compare
180a91a to
55a5a8e
Compare
fa3c0b1 to
001e5e7
Compare
55a5a8e to
54176d6
Compare
akshaydeo
approved these changes
Apr 30, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Add support for system messages in Anthropic provider
This PR adds support for system messages in the Anthropic provider by properly handling system role messages in the chat completion API. System messages are now extracted from the input messages array and combined into a single system message in the Anthropic API request.
Key changes:
ParallelToolCallsfield in ModelParameters properly omitemptyEnumfield to FunctionParameters for better function calling supportThis change enables proper handling of system prompts with Anthropic models, which is important for setting context and controlling model behavior.