Skip to content

Commit

Permalink
Merge pull request #90 from faizan2700/mistralmodel1
Browse files Browse the repository at this point in the history
mistral model changes
  • Loading branch information
cobycloud authored Aug 16, 2024
2 parents 6e2709d + 52b9d92 commit 2365323
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions swarmauri/standard/llms/concrete/MistralModel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
from typing import List, Literal, Dict
from mistralai.client import MistralClient
from mistralai import Mistral
from swarmauri.core.typing import SubclassUnion

from swarmauri.standard.messages.base.MessageBase import MessageBase
Expand Down Expand Up @@ -35,9 +35,9 @@ def predict(self,

formatted_messages = self._format_messages(conversation.history)

client = MistralClient(api_key=self.api_key)
client = Mistral(api_key=self.api_key)
if enable_json:
response = client.chat(
response = client.chat.complete(
model=self.name,
messages=formatted_messages,
temperature=temperature,
Expand All @@ -47,7 +47,7 @@ def predict(self,
safe_prompt=safe_prompt
)
else:
response = client.chat(
response = client.chat.complete(
model=self.name,
messages=formatted_messages,
temperature=temperature,
Expand Down

0 comments on commit 2365323

Please sign in to comment.