Skip to content

Commit

Permalink
feat: add Gemini text-embedding-004 model (#122)
Browse files Browse the repository at this point in the history
- Add Gemini text-embedding-004 as a new embedding model option
- Add rate limit error handling for embedding API calls
- Update model names to include provider prefix for clarity
  • Loading branch information
kevin-on authored Nov 22, 2024
1 parent b8f487b commit 2da7365
Show file tree
Hide file tree
Showing 12 changed files with 559 additions and 31 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Note: The Apply Edit feature is currently slower than desired. We are working on
5. Set up your API key in plugin settings
- OpenAI : [ChatGPT API Keys](https://platform.openai.com/api-keys)
- Anthropic : [Claude API Keys](https://console.anthropic.com/settings/keys)
- Gemini : [Gemini API Keys](https://aistudio.google.com/apikey)
- Groq : [Groq API Keys](https://console.groq.com/keys)

**📚 For detailed setup instructions and documentation, please visit our [Documentation](https://github.com/glowingjade/obsidian-smart-composer/wiki).**
Expand Down
10 changes: 10 additions & 0 deletions drizzle/0007_create_vector_data_gemini_text_embedding_004.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CREATE TABLE IF NOT EXISTS "vector_data_gemini_text_embedding_004" (
"id" serial PRIMARY KEY NOT NULL,
"path" text NOT NULL,
"mtime" bigint NOT NULL,
"content" text NOT NULL,
"embedding" vector(768),
"metadata" jsonb NOT NULL
);
--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "embeddingIndex_gemini_text_embedding_004" ON "vector_data_gemini_text_embedding_004" USING hnsw ("embedding" vector_cosine_ops);
Loading

0 comments on commit 2da7365

Please sign in to comment.