How to select models "on the fly"? #824
Unanswered
ThadeuFerreira
asked this question in
Q&A
Replies: 2 comments 2 replies
-
OpenAiChatOptions options = OpenAiChatOptions.builder().withModel("model-name").build();
Prompt prompt = new Prompt(new UserMessage(message), options);
return Map.of("generation", chatModel.call(prompt)); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Using the ChatClient fluent API: chatClient
.prompt()
.options(OpenAiChatOptions.builder().withModel("gtp-4-turbo").build())
.user(question)
.call()
.content(); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've just started with this library and I'm trying to find a way to invoke different models depending on the situation.
Following the tutorials, I have this in my application.properties
And this configuration
I couldn't find a way to change the configurations of ChatClient in Running time.
Should I have multiple Beans for each model?
O can I change it in the Controller?
Beta Was this translation helpful? Give feedback.
All reactions