-
Notifications
You must be signed in to change notification settings - Fork 23
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
Issues with sending requests containing certain characters #83
Comments
+1 having similar issues :
|
Thanks! This is a known issue, we'll be releasing a v2 including a fix for this. In the meantime, you should be able to bypass this issue via passing |
Hey, could you possibly provide a code example or reflect this in the README / docs? For example I tried: anthropic.Raw[]anthropic.MessageParam where messages are of type anthropic.MessageParam and no dice. tried marshalling messages myself no dice. |
For anyone who was stuck, here's how I got it to work: messagesJson, _ := json.Marshal(messages)
message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
Model: anthropic.F(anthropic.ModelClaude3_5SonnetLatest),
MaxTokens: anthropic.F(int64(1024)),
Messages: anthropic.Raw[[]anthropic.MessageParam](json.RawMessage(messagesJson)),
}), In this example, |
any progress ? |
Repro
Output:
The text was updated successfully, but these errors were encountered: