How to set the default system message for OllamaChatModel? #1127
-
How do I do something like this: @Bean
public ChatClient chatClient(ChatClient.Builder builder) {
return builder.defaultSystem("You are a helpful ...")
.build();
} But for Ollama? public class InterviewOllamaAdapter implements InterviewChatClient {
private final OllamaChatModel chatModel;
public InterviewOllamaAdapter(OllamaChatModel chatModel) {
this.chatModel = chatModel;
}
@Override
public String chat(String chatMessage) {
return chatModel.call(chatMessage);
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
LiveNathan
Jul 30, 2024
Replies: 1 comment
-
Ha! Never mind. I didn't realize that all I had to do was use the ChatClient instead of the OllamaChatModel. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
LiveNathan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ha! Never mind. I didn't realize that all I had to do was use the ChatClient instead of the OllamaChatModel.