Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MistralAPIStatusException: Cannot stream response. Status: 429 #177

Closed
ttkrpink opened this issue Jan 23, 2024 · 5 comments
Closed

MistralAPIStatusException: Cannot stream response. Status: 429 #177

ttkrpink opened this issue Jan 23, 2024 · 5 comments

Comments

@ttkrpink
Copy link

I put one training question/sql pair into the model.
I trained the model using vn.train().
The vn.ask return with 429 error.

1705971871593

@zainhoda
Copy link
Contributor

Do you have a Mistral account? Currently the configuration for Mistral requires a Mistral API key

@ttkrpink
Copy link
Author

I did have the API key.

API_Mistral = "xxxxxxxxxxxxxxxxxxxxxx"
API_Vanna ="xxxxxxxxxxxxxxxxxxxxxx"

from vanna.chromadb.chromadb_vector import ChromaDB_VectorStore
from vanna.mistral.mistral import Mistral

Database = './database.sqlite'
class MyVanna(ChromaDB_VectorStore, Mistral):
    def __init__(self, config=None):
        ChromaDB_VectorStore.__init__(self, config=config)
        Mistral.__init__(self, config={'api_key': API_Mistral, 'model': 'mistral-tiny'})

vn = MyVanna()

@zainhoda
Copy link
Contributor

Closing this issue as non-reproducible. Our integration test runs against Mistral on every merge and nobody else has reported this issue:

https://github.com/vanna-ai/vanna/actions/runs/8180364867/job/22368242743#step:5:35

@varunsingh3000
Copy link

varunsingh3000 commented Apr 1, 2024

This happened to me because my monthly usage limit had reached on the platform. Increasing the limit fixed it. But if this was the case, then I think the error description needs to be more clear and explicit regarding what caused it.

@zainhoda
Copy link
Contributor

zainhoda commented Apr 1, 2024

Thanks @varunsingh3000 and @ttkrpink -- This type of error comes directly from the API provider (Mistral). I think the right thing to do is to keep the raw error as is. It's really Mistral that should provide more context about the error via their package: https://github.com/mistralai/client-python

I think once we get into the business of "interpreting" API errors, it's going to get unmanageable for us very quickly, especially if the underlying Mistral package changes its error handling/messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants