vanna-ai / vanna

šŸ¤– Chat with your SQL database šŸ“Š. Accurate Text-to-SQL Generation via LLMs using RAG šŸ”„.
https://vanna.ai/docs/
MIT License
11.04k stars 862 forks source link

openai.APITimeoutError: Request timed out #252

Closed njalan closed 7 months ago

njalan commented 7 months ago

I am trying to use openai and chromadb to generate sql but got openai.APITimeoutError: Request timed out Below is my code:

from vanna.openai.openai_chat import OpenAI_Chat from vanna.chromadb.chromadb_vector import ChromaDB_VectorStore

class MyVanna(ChromaDB_VectorStore, OpenAI_Chat): def init(self, config=None): ChromaDB_VectorStore.init(self, config=config) OpenAI_Chat.init(self, config=config)

vn = MyVanna(config={'api_key': 'xxxxx', 'model': 'text-davinci-003','base_url':'http://xxxxx:8000/v1'})

import mysql.connector

vn.train(ddl=""" create table xxxx ( xxxx );

""")

vn.ask(question="how many ids ")

Below is the output: Using model text-davinci-003 for 1368.25 tokens (approx) huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks... To disable this warning, you can either:

andreped commented 7 months ago

@njalan As you have closed this issue, it would be great if you could report what the issue/fix was, as someone might run into the same issue down the line :]