* feat(gemini): embedding batch size & lite default
The new `gemini-embedding-001` model only allows one embedding input per batch
(instance), but has other impressive statistics:
https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api
The -DEFAULT_SMALL_MODEL must not have the 'models/' prefix.
* Refactor: Improve Gemini Client Error Handling and Reliability
This commit introduces several improvements to the Gemini client to enhance its robustness and reliability.
- Implemented more specific error handling for various Gemini API responses, including rate limits and safety blocks.
- Added a JSON salvaging mechanism to gracefully handle incomplete or malformed JSON responses from the API.
- Introduced detailed logging for failed LLM generations to simplify debugging and troubleshooting.
- Refined the Gemini embedder to better handle empty or invalid embedding responses.
- Updated and corrected tests to align with the improved error handling and reliability features.
* fix: cleanup in _log_failed_generation()
* fix: cleanup in _log_failed_generation()
* Fix ruff B904 error in gemini_client.py
* fix(gemini): correct retry logic and enhance error logging
Updated the retry mechanism in the GeminiClient to ensure it retries the maximum number of times specified. Improved error logging to provide clearer insights when all retries are exhausted, including detailed information about the last error encountered.
* fix(gemini): enhance error handling for safety blocks and update tests
Refined error handling in the GeminiClient to improve detection of safety block conditions. Updated test cases to reflect changes in exception messages and ensure proper retry logic is enforced. Enhanced mock responses in tests to better simulate real-world scenarios, including handling of invalid JSON responses.
* revert default gemini to text-embedding-001
---------
Co-authored-by: Daniel Chalef <131175+danielchalef@users.noreply.github.com>
The cross_encoder for Gemini already supported passing in a custom client.
I replicated the same input pattern to embedder and llm_client.
The value is, you can support custom API endpoints and other options like below:
cross_encoder=GeminiRerankerClient(
client=genai.Client(
api_key=os.environ.get('GOOGLE_GENAI_API_KEY'),
http_options=types.HttpOptions(api_version='v1alpha')),
config=LLMConfig(
model="gemini-2.5-flash-lite-preview-06-17"
)
))
* migrate to pyright
* Refactor type checking to use Pyright, update dependencies, and clean up code.
- Replaced MyPy with Pyright in configuration files and CI workflows.
- Updated `pyproject.toml` and `uv.lock` to reflect new dependencies and versions.
- Adjusted type hints and fixed minor code issues across various modules for better compatibility with Pyright.
- Added new packages `backoff` and `posthog` to the project dependencies.
* Update CI workflows to install all extra dependencies for type checking and unit tests
* Update dependencies in uv.lock to replace MyPy with Pyright and add nodeenv package. Adjust type hinting in config.py for compatibility with Pyright.
* Refactor group_id handling and update dependencies
- Changed default behavior for `group_id` to 'default' instead of generating a UUID.
- Updated README to reflect the new default behavior for `--group-id`.
- Reformatted LLMConfig initialization for better readability.
- Bumped versions of several dependencies including `azure-core`, `azure-identity`, `certifi`, `charset-normalizer`, `sse-starlette`, and `typing-inspection`.
- Added `python-multipart` as a new dependency.
This update improves usability and ensures compatibility with the latest library versions.
* Update Graphiti MCP server instructions and refactor method names for clarity
- Revised the welcome message to enhance clarity about Graphiti's functionality.
- Renamed methods for better understanding: `add_episode` to `add_memory`, `search_nodes` to `search_memory_nodes`, `search_facts` to `search_memory_facts`, and updated related docstrings to reflect these changes.
- Updated references to "knowledge graph" to "graph memory" for consistency throughout the codebase.
* Update README for Graphiti MCP server configuration and integration with Claude Desktop
- Changed server name from "graphiti" to "graphiti-memory" in configuration examples for clarity.
- Added instructions for running the Graphiti MCP server using Docker.
- Included detailed steps for integrating Claude Desktop with the Graphiti MCP server, including optional installation of `mcp-remote`.
- Enhanced overall documentation to improve user experience and understanding of the setup process.
* Enhance error handling in GeminiEmbedder and GeminiClient
- Added checks to raise exceptions when no embeddings or response text are returned, improving robustness.
- Included type ignore comments for mypy compatibility in embed_content calls.
* Update graphiti_core/embedder/gemini.py
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Update graphiti_core/llm_client/gemini_client.py
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* Bump version from 0.9.0 to 0.9.1 in pyproject.toml and update google-genai dependency to >=0.1.0
* Bump version from 0.9.1 to 0.9.2 in pyproject.toml
* Update google-genai dependency version to >=0.8.0 in pyproject.toml
* loc file
* Update pyproject.toml to version 0.9.3, restructure dependencies, and modify author format. Remove outdated Google API key note from README.md.
* upgrade poetry and ruff
* Update README.md to include installation instructions for Graphiti with Google Gemini support
* fix to deps since peotry doesn't fully implement PEP 735
* Refactor string formatting in various files to use single quotes for consistency and improve readability. This includes updates in agent.ipynb, quickstart.py, multiple prompt files, and ingest.py and retrieve.py modules.
* Remove optional dependencies from pyproject.toml to streamline project requirements.
* Bump version from 0.9.0 to 0.9.1 in pyproject.toml and update google-genai dependency to >=0.1.0
* Bump version from 0.9.1 to 0.9.2 in pyproject.toml
* Update google-genai dependency version to >=0.8.0 in pyproject.toml
* loc file
* Update pyproject.toml to version 0.9.3, restructure dependencies, and modify author format. Remove outdated Google API key note from README.md.
* upgrade poetry and ruff
* first cut
* Update dependencies and enhance README for optional LLM providers
- Bump aiohttp version from 3.11.14 to 3.11.16
- Update yarl version from 1.18.3 to 1.19.0
- Modify pyproject.toml to include optional extras for Anthropic, Groq, and Google Gemini
- Revise README.md to reflect new optional LLM provider installation instructions and clarify API key requirements
* Remove deprecated packages from poetry.lock and update content hash
- Removed cachetools, google-auth, google-genai, pyasn1, pyasn1-modules, rsa, and websockets from the lock file.
- Added new extras for anthropic, google-genai, and groq.
- Updated content hash to reflect changes.
* Refactor import paths for GeminiClient in README and __init__.py
- Updated import statement in README.md to reflect the new module structure for GeminiClient.
- Removed GeminiClient from the __all__ list in __init__.py as it is no longer directly imported.
* Refactor import paths for GeminiEmbedder in README and __init__.py
- Updated import statement in README.md to reflect the new module structure for GeminiEmbedder.
- Removed GeminiEmbedder and GeminiEmbedderConfig from the __all__ list in __init__.py as they are no longer directly imported.