OpenAI cleanups (#32597)
Release Notes: - openai: Remove support for deprecated o1-preview and o1-mini models - openai: Support streaming for o1 model
This commit is contained in:
parent
4e4856f2c1
commit
2d4e427b45
2 changed files with 5 additions and 244 deletions
|
@ -438,7 +438,7 @@ pub fn into_open_ai(
|
|||
stream,
|
||||
stop: request.stop,
|
||||
temperature: request.temperature.unwrap_or(1.0),
|
||||
max_tokens: max_output_tokens,
|
||||
max_completion_tokens: max_output_tokens,
|
||||
parallel_tool_calls: if model.supports_parallel_tool_calls() && !request.tools.is_empty() {
|
||||
// Disable parallel tool calls, as the Agent currently expects a maximum of one per turn.
|
||||
Some(false)
|
||||
|
@ -648,8 +648,6 @@ pub fn count_open_ai_tokens(
|
|||
| Model::FourPointOneMini
|
||||
| Model::FourPointOneNano
|
||||
| Model::O1
|
||||
| Model::O1Preview
|
||||
| Model::O1Mini
|
||||
| Model::O3
|
||||
| Model::O3Mini
|
||||
| Model::O4Mini => tiktoken_rs::num_tokens_from_messages(model.id(), &messages),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue