-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Gemini #1520
Gemini #1520
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
examples/gemini/requirements.txt
Outdated
@@ -0,0 +1,3 @@ | |||
chromadb>=0.4.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make this more restrictive?
self._genai.embed_content( | ||
model=self._model_name, | ||
content=text, | ||
task_type="retrieval_document", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make this configurable?
model=self._model_name, | ||
content=text, | ||
task_type="retrieval_document", | ||
title="Embedding of single string", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with this?
class GoogleGenerativeAiEmbeddingFunction(EmbeddingFunction[Documents]): | ||
"""To use this EmbeddingFunction, you must have the google.generativeai Python package installed and have a Google API key.""" | ||
|
||
"""Use RETRIEVAL_DOCUMENT for the task_type for embedding, and RETRIEVAL_QUERY for the task_type for retrieval.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
clients/js/examples/node/app.js
Outdated
|
||
var app = express(); | ||
app.get("/", async (req, res) => { | ||
const cc = new chroma.ChromaClient({ path: "http://localhost:8000" }); | ||
await cc.reset(); | ||
|
||
const openAIembedder = new chroma.OpenAIEmbeddingFunction("key") | ||
const cohereAIEmbedder = new chroma.OpenAIEmbeddingFunction({ openai_api_key: "API_KEY" }); | ||
console.log("entry") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
This adds a Google Gemini embedding function and an RAG chat example
TODO