fix mistral system prompt
This commit is contained in:
@@ -130,7 +130,7 @@ impl LLMClient for Mistral {
|
|||||||
mut request: ollama_rs::generation::chat::request::ChatMessageRequest,
|
mut request: ollama_rs::generation::chat::request::ChatMessageRequest,
|
||||||
) -> Result<ChatMessageResponse, LLMError> {
|
) -> Result<ChatMessageResponse, LLMError> {
|
||||||
if let Some(first_message) = history.first() // add system prompt as first message
|
if let Some(first_message) = history.first() // add system prompt as first message
|
||||||
&& first_message.role == MessageRole::System
|
&& first_message.role != MessageRole::System
|
||||||
&& let Some(system_prompt) = self.system_prompt.clone()
|
&& let Some(system_prompt) = self.system_prompt.clone()
|
||||||
{
|
{
|
||||||
history.insert(
|
history.insert(
|
||||||
|
|||||||
Reference in New Issue
Block a user