run-llama / llama_index

LlamaIndex is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
35.73k stars 5.05k forks source link

[Feature Request]: Update Dependencies for `llama-index-llms-gemini #16273

Open arthurbrenno opened 6 hours ago

arthurbrenno commented 6 hours ago

Feature Description

I am encountering a dependency conflict when attempting to add the llama-index-llms-gemini package to my project and I think some developers might have this problem too. The current version constraints for llama-index-llms-gemini are incompatible with the latest versions of llama-index-core and google-generativeai that some projects might rely on.


Current Issue:
When running the command:

uv add llama-index-llms-gemini

I receive the following error:

No solution found when resolving dependencies for split (python_full_version == '3.10.*' and platform_python_implementation != 'PyPy' and platform_system == 'Darwin' and sys_platform != 'linux'):
  ...
  And because your project depends on llama-index-core>=0.11.14 and llama-index-llms-gemini, we can conclude that your project's requirements are unsatisfiable.

Root Cause:

These constraints make it impossible to satisfy all dependencies simultaneously, preventing the successful addition of llama-index-llms-gemini.


Proposed Enhancement:
Update the llama-index-llms-gemini package to support higher versions of its dependencies, specifically:

  1. llama-index-core:

    • Current Constraint: <0.11.0
    • Proposed Update: >=0.11.0 to align with projects using llama-index-core >=0.11.14.
  2. google-generativeai:

    • Current Constraint: >=0.5.2,<0.6.0
    • Proposed Update: Expand the upper limit to accommodate >=0.8.2, such as >=0.5.2,<1.0.0.

Benefits:


Additional Context:
I have verified that other dependencies in my project are compatible with the proposed updates. Ensuring that llama-index-llms-gemini supports these higher versions will greatly enhance its usability and integration within contemporary Python projects.


Possible Solutions:


Thank You:
Thank you for your continued efforts in maintaining and improving the llamaindex project. Your work is greatly appreciated by the developer community!

Reason

No response

Value of Feature

No response

logan-markewich commented 6 hours ago

@arthurbrenno here's the current deps for the gemini llm

It already specifies llama-index-core = "^0.11.0"

Probably can loosen the generative-ai dependency, assuming that google hasn't made many breaking changes

logan-markewich commented 6 hours ago

Oops, forgot the link https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/llms/llama-index-llms-gemini/pyproject.toml

arthurbrenno commented 52 minutes ago

Thanks, Logan.