We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
test_vector_database.py
1 parent a72f52a commit 51a8f38Copy full SHA for 51a8f38
demos/palm/python/docs-agent/scripts/test_vector_database.py
@@ -108,8 +108,12 @@ def embed_palm(texts: Documents) -> Embeddings:
108
model_name=LOCAL_LLM
109
)
110
111
+embedding_function_gemini_retrieval = embedding_functions.GoogleGenerativeAiEmbeddingFunction(
112
+ api_key=API_KEY, model_name=EMBEDDING_MODEL,
113
+ task_type="RETRIEVAL_QUERY")
114
+
115
collection = chroma_client.get_collection(
- name=COLLECTION_NAME, embedding_function=emb_fn
116
+ name=COLLECTION_NAME, embedding_function=embedding_function_gemini_retrieval
117
118
119
results = collection.query(query_texts=[QUESTION], n_results=NUM_RETURNS)
0 commit comments