Open ahuang11 opened 2 weeks ago
from mistralai import Mistral
s = Mistral(
api_key="x",
)
client = instructor.patch(
create=s.chat.complete_async,
mode=instructor.mode.Mode.JSON,
)
response = await client(
model="mistral-large-latest",
messages=[],
response_model=Iterable[Accounts],
)
Meanwhile, you can do it like that
What Model are you using?
Describe the bug A clear and concise description of what the bug is.
Mistral recently released their new APIs. https://github.com/mistralai/client-python?tab=readme-ov-file
To Reproduce Steps to reproduce the behavior, including code snippets of the model and the input data and openai response.
Expected behavior A clear and concise description of what you expected to happen.
Not crash
Screenshots If applicable, add screenshots to help explain your problem.