Ich versuche, das unten gezeigte Python-Client-Codebeispiel von Mistral AI auszuführen.
from mistralai.client import MistralClient
from mistralai.models.chat_completion import ChatMessage
model = "mistral-tiny"
client = MistralClient(api_key=userdata.get('MISTRAL_API_KEY'))
messages = [
ChatMessage(role="user", content="What is the best French cheese?")
]
# No streaming
chat_response = client.chat(
model=model,
messages=messages,
)
Ich bekomme ständig AttributeError: 'ChatMessage' object has no attribute 'model_dump', aber dazu steht nirgends etwas.
Kann Helft mir bitte jemand?
Mistralai – AttributeError: „ChatMessage“-Objekt hat kein Attribut „model_dump“ ⇐ Python
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Warum Shaps Erklärer.Model.Predict () und Model.Predict nicht übereinstimmen?
by Anonymous » » in Python - 0 Replies
- 8 Views
-
Last post by Anonymous
-
-
-
Warum Shaps Erklärer.Model.Predict () und Model.Predict nicht übereinstimmen?
by Anonymous » » in Python - 0 Replies
- 9 Views
-
Last post by Anonymous
-