Skip to content

Model incompatible request argument supplied: temperature #3253

Open
@hstaudacher

Description

@hstaudacher

Bug description
When using the OpenAI search models the following error is returned: Model incompatible request argument supplied: temperature

There is no way to remove the temperature parameter from the OpenAiChatOptions programmatically without changing the global temperature.

Environment
Spring AI latest snapshot

Steps to reproduce

 var options = OpenAiChatOptions.builder()
      .model(MODEL)
      .build();
    Prompt prompt = new Prompt(messages, options);
    return client.prompt(prompt)
      .call()
      .chatResponse();

Expected behavior
Either allow setting the temperature to null or remove it when a search model is used.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions