Код: Выделить всё
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,
)
Может кто-нибудь, помогите, пожалуйста?
Подробнее здесь: https://stackoverflow.com/questions/779 ... model-dump
Мобильная версия