-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
[Bug]: ChromaDB OpenAI embedding function is not working #2979
Comments
Verify Compatibility: Ensure that the RetrieveUserProxyAgent accepts the embedding function in the manner you're providing it. There might be specific requirements or ways to pass the embedding function. |
@nithinkodithyala Thank you very much for the prompt response. I tried "client": Chroma(client = chromadb.PersistentClient(path="/tmp/chromadb/test"), collection_name="groupchat-collection", embedding_function=embeddings), but still doesn't seem to solve this. |
I can confirm that it is working with the below settings: "client": chromadb.PersistentClient().get_or_create_collection(name = 'autogen_agent', embedding_function=openai_ef) |
I tried this: import autogen openai_ef = embedding_functions.OpenAIEmbeddingFunction( assistant = AssistantAgent( qa_problem = "How many agents are there?" ERROR: RateLimitError Traceback (most recent call last) File c:\Users\Datasemantics\Documents\DS\RAG1.autogen\lib\site-packages\chromadb\api\models\CollectionCommon.py:406, in CollectionCommon._validate_and_prepare_upsert_request(self, ids, embeddings, metadatas, documents, images, uris) File c:\Users\Datasemantics\Documents\DS\RAG1.autogen\lib\site-packages\chromadb\api\models\CollectionCommon.py:526, in CollectionCommon._embed_record_set(self, record_set, embeddable_fields) File c:\Users\Datasemantics\Documents\DS\RAG1.autogen\lib\site-packages\chromadb\api\models\CollectionCommon.py:539, in CollectionCommon._embed(self, input) TypeError: init() missing 2 required keyword-only arguments: 'response' and 'body' |
Describe the bug
I have the below code:
openai_ef = OpenAIEmbeddingFunction(
api_key= os.getenv("AZURE_OPENAI_API_KEY"),
api_base= os.getenv("AZURE_OPENAI_ENDPOINT"),
model_name= "text-embedding-ada-002"
)
While I am passing it to RetrieveUserProxyAgent as "embedding_function" : openai_ef, i am still getting the below error:
autogen.agentchat.contrib.vectordb.chromadb - INFO - No content embedding is provided. Will use the VectorDB's embedding function to generate the content embedding.
Also in the logs, the link: https://docs.trychroma.com/embeddings is not existing anymore (404)
Steps to reproduce
No response
Model Used
text-embeddings-ada-002
Expected Behavior
TO pass the embedding function into ChromaDB and overpass the default state
Screenshots and logs
Additional Information
No response
The text was updated successfully, but these errors were encountered: