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

bug: o3-mini temperature parameter #258

Closed
1 task done
atcol opened this issue Feb 1, 2025 · 2 comments · Fixed by #266
Closed
1 task done

bug: o3-mini temperature parameter #258

atcol opened this issue Feb 1, 2025 · 2 comments · Fixed by #266
Assignees

Comments

@atcol
Copy link

atcol commented Feb 1, 2025

  • I have looked for existing issues (including closed) about this

Nothing in Issues mentioning "o3-mini"

Bug Report

CompletionError(ProviderError("{\n \"error\": {\n \"message\": \"Unsupported parameter: 'temperature' is not supported with this model.\",\n \"type\": \"invalid_request_error\",\n \"param\": \"temperature\",\n \"code\": \"unsupported_parameter\"\n }\n}"))

Reproduction

use rig::{providers::openai, agent::AgentBuilder};

// Initialize the OpenAI client
let openai = openai::Client::new("your-openai-api-key");

// Create a model and initialize an agent
let o3-mini = openai.completion_model("o3-mini");

let agent = AgentBuilder::new(o3-mini)
    .preamble("\
        You are Gandalf the white and you will be conversing with other \
        powerful beings to discuss the fate of Middle Earth.\
    ")
    .build();

// Alternatively, you can initialize an agent directly
let agent = openai.agent("gpt-4o")
    .preamble("\
        You are Gandalf the white and you will be conversing with other \
        powerful beings to discuss the fate of Middle Earth.\
    ")
    .build();

Expected behavior

The code executes without error.

Screenshots

N.A.

Additional context

N.A.

@joshua-mo-143 joshua-mo-143 self-assigned this Feb 3, 2025
@0xMochan
Copy link
Contributor

0xMochan commented Feb 3, 2025

Nice catch, it's a bit odd that temperature is beind added in general when not specified!

@atcol
Copy link
Author

atcol commented Feb 10, 2025

Note: this fails if you use the agent builder function to create an agent with a preamble.

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 a pull request may close this issue.

3 participants