We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey,
I was trying out chroma db with the following code:
import chromadb from chromadb.utils import embedding_functions import os from google.colab import userdata CHROMA_PATH = "chroma_db" client = chromadb.PersistentClient(path=CHROMA_PATH) openai_ef = embedding_functions.OpenAIEmbeddingFunction( api_key=userdata.get('OPENAI_API_KEY'), model_name="text-embedding-3-small", ) COLLECTION = client.get_or_create_collection( name="documents", embedding_function=openai_ef ) sample_texts = ['hello world', 'this is a test'] metadata = [{"key1": "value1", "key2": "value2"}, {"key1": "value3", "key2": "value4"}] ids = [f'doc_{ix}' for ix in range(len(sample_texts))] COLLECTION.add(documents=sample_texts, metadatas=metadata, ids=ids)
This is still vanilla. But the OPENAI key that i set was incorrect. Unfortunately the error i got was the following
TypeError: APIStatusError.__init__() missing 2 required keyword-only arguments: 'response' and 'body'
This was confusing to figure out the exact issue was the wrong key
Maybe we can relay the error directly from the embedding function?
No response
nice to have
Non breaking, but might be easier to handle the issues
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the problem
Hey,
I was trying out chroma db with the following code:
This is still vanilla. But the OPENAI key that i set was incorrect. Unfortunately the error i got was the following
TypeError: APIStatusError.__init__() missing 2 required keyword-only arguments: 'response' and 'body'
This was confusing to figure out the exact issue was the wrong key
Describe the proposed solution
Maybe we can relay the error directly from the embedding function?
Alternatives considered
No response
Importance
nice to have
Additional Information
Non breaking, but might be easier to handle the issues
The text was updated successfully, but these errors were encountered: