instructor-ai / instructor

structured outputs for llms
https://python.useinstructor.com/
MIT License
8.41k stars 664 forks source link

Mistral AI - Cost Usage #1229

Closed pierre-sigwalt closed 1 day ago

pierre-sigwalt commented 1 day ago

Would be nice to get the cost for MistralAI.

I believe their Client is returning the response. If not would it be possible to add to the response all of the prompt used so we can use their tokenizer to compute it.

Thank you

pierre-sigwalt commented 1 day ago

Found the answer using response, completion = instructor_client.completions.create_with_completion