feat(embedding): add multimodal support to Gemini backend#380
Closed
murasame-desu-ai wants to merge 6 commits intoNevaMind-AI:mainfrom
Closed
feat(embedding): add multimodal support to Gemini backend#380murasame-desu-ai wants to merge 6 commits intoNevaMind-AI:mainfrom
murasame-desu-ai wants to merge 6 commits intoNevaMind-AI:mainfrom
Conversation
- Add Anthropic LLM provider (Claude API support with Bearer/x-api-key auth) - Add Gemini LLM and embedding provider (Google AI Studio API) - Improve SQLite repository with better embedding search - Add embed_api_key for separate embedding authentication - Fix max_tokens handling for different providers
- Add context that this is a personal memory DB, not general knowledge - Remove 'general knowledge questions → NO_RETRIEVE' rule that caused false negatives for personal terms/slang - Add rules to RETRIEVE for unknown names, nicknames, slang - Add 'when in doubt, RETRIEVE' principle Fixes issue where queries like group chat nicknames or personal events were incorrectly classified as general knowledge and skipped retrieval.
Extend GeminiEmbeddingBackend.build_embedding_payload() to accept dict inputs with text, image (bytes or base64 str), and mime_type fields alongside plain strings. Backward compatible with existing text-only callers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EmbeddingBackend.build_embedding_payload()input type fromlist[str]tolist[str | dict]for multimodal support_build_parts()helper in Gemini backend to convert text, image, or text+image dict inputs into Gemini content parts formatbytes(auto base64-encoded) andstr(pre-encoded) image inputs with configurable mime_typeTest plan
pytest tests/test_gemini_embedding.py -v)🤖 Generated with Claude Code