graphiti/graphiti_core
Daniel Chalef 4481702c9f
feat: enhance GeminiClient with max tokens management (#712)
* feat: enhance GeminiClient with max tokens management

- Introduced a mapping for maximum output tokens for various Gemini models.
- Added methods to resolve max tokens based on precedence rules, allowing for more flexible token management.
- Updated tests to verify max tokens behavior, ensuring explicit parameters take precedence and fallback mechanisms work correctly.

This change improves the handling of token limits for different models, enhancing the client’s configurability and usability.

* refactor: streamline max tokens retrieval in GeminiClient

- Removed the fallback to DEFAULT_MAX_TOKENS in favor of directly using model-specific maximum tokens.
- Simplified the logic for determining max tokens, enhancing code clarity and maintainability.

This change improves the efficiency of token management within the GeminiClient.
2025-07-13 14:37:55 -07:00
..
cross_encoder Bulk ingestion (#698) 2025-07-10 12:14:49 -04:00
driver [REFACTOR][FIX] Move away from DEFAULT_DATABASE environment variable in favour of driver-config support (dc) (#699) 2025-07-10 17:25:39 -04:00
embedder feat(gemini): embedding batch size & lite default (#680) 2025-07-13 10:20:22 -07:00
llm_client feat: enhance GeminiClient with max tokens management (#712) 2025-07-13 14:37:55 -07:00
models Node name bug fix (#622) 2025-06-24 17:13:27 -04:00
prompts Bulk ingestion (#698) 2025-07-10 12:14:49 -04:00
search update search filters (#706) 2025-07-11 10:53:15 -04:00
telemetry feat: add telemetry with PostHog and update Docker configurations (#633) 2025-06-27 12:23:30 -07:00
utils [REFACTOR][FIX] Move away from DEFAULT_DATABASE environment variable in favour of driver-config support (dc) (#699) 2025-07-10 17:25:39 -04:00
__init__.py chore: Fix packaging (#38) 2024-08-25 10:07:50 -07:00
edges.py [REFACTOR][FIX] Move away from DEFAULT_DATABASE environment variable in favour of driver-config support (dc) (#699) 2025-07-10 17:25:39 -04:00
errors.py Add group ID validation and error handling (#618) 2025-06-24 09:33:54 -07:00
graph_queries.py update driver (#583) 2025-06-13 14:12:09 -04:00
graphiti.py [REFACTOR][FIX] Move away from DEFAULT_DATABASE environment variable in favour of driver-config support (dc) (#699) 2025-07-10 17:25:39 -04:00
graphiti_types.py Add support for falkordb (#575) 2025-06-13 12:06:57 -04:00
helpers.py [REFACTOR][FIX] Move away from DEFAULT_DATABASE environment variable in favour of driver-config support (dc) (#699) 2025-07-10 17:25:39 -04:00
nodes.py [REFACTOR][FIX] Move away from DEFAULT_DATABASE environment variable in favour of driver-config support (dc) (#699) 2025-07-10 17:25:39 -04:00
py.typed Add py.typed file (#105) 2024-09-11 08:44:06 -04:00