Support 8192 output tokens for Claude Sonnet 3.5 (#16358)
Release Notes: - Added support for 8192 output tokens from Claude Sonnet 3.5 (https://x.com/alexalbert__/status/1812921642143900036)
This commit is contained in:
parent
7eab57a264
commit
b4f5f5024e
6 changed files with 37 additions and 8 deletions
|
@ -286,7 +286,7 @@ impl LanguageModelRequest {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn into_anthropic(self, model: String) -> anthropic::Request {
|
||||
pub fn into_anthropic(self, model: String, max_output_tokens: u32) -> anthropic::Request {
|
||||
let mut new_messages: Vec<anthropic::Message> = Vec::new();
|
||||
let mut system_message = String::new();
|
||||
|
||||
|
@ -353,7 +353,7 @@ impl LanguageModelRequest {
|
|||
anthropic::Request {
|
||||
model,
|
||||
messages: new_messages,
|
||||
max_tokens: 4092,
|
||||
max_tokens: max_output_tokens,
|
||||
system: Some(system_message),
|
||||
tools: Vec::new(),
|
||||
tool_choice: None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue