You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to set up an example Chroma database that can be queried with the retrieval plugin.
I generate the database with this code:
import chromadb
from chromadb.config import Settings
import os
cl = chromadb.Client(Settings(
chroma_db_impl="duckdb+parquet",
persist_directory=os.path.expanduser("~/Code/chatgpt-retrieval-plugin/openai")
))
co = cl.create_collection('openaiembeddings')
for c in range(ord('A'), ord('Z')+1):
co.add(documents=chr(c), ids=chr(c))
Then I run the retrieval plugin with poetry run dev and try the plugin with ChatGPT.
After the ChatGPT session, the log says:
INFO: Will watch for changes in these directories: ['/home/cwl/Code/chatgpt-retrieval-plugin']
INFO: Uvicorn running on http://localhost:3333 (Press CTRL+C to quit)
INFO: Started reloader process [103737] using WatchFiles
INFO: Started server process [103748]
INFO: Waiting for application startup.
Using embedded DuckDB with persistence: data will be stored in: openai
No embedding_function provided, using default embedding function: SentenceTransformerEmbeddingFunction
INFO: Application startup complete.
Error: Dimensionality of (1536) does not match index dimensionality (384)
INFO: 127.0.0.1:57770 - "POST /query HTTP/1.1" 500 Internal Server Error
The text was updated successfully, but these errors were encountered:
The issue is that when you added the documents, you used the built-in default embedding function.
If you want to use Chroma in this way, you should use the OpenAI embedding function when adding documents.
Because you populated your index directly, we did not know that the OpenAI embedding function should be used, so used our default.
In chroma_datastore.py the function is deliberately set to None as it should never be called directly for collections created via the retrieval plugin.
I've been trying to set up an example Chroma database that can be queried with the retrieval plugin.
I generate the database with this code:
Then I run the retrieval plugin with
poetry run dev
and try the plugin with ChatGPT.After the ChatGPT session, the log says:
The text was updated successfully, but these errors were encountered: