Skip to content

feat: support for Gemini file urls#81

Merged
srijanpatel merged 2 commits intomainfrom
feat/geminiUrls
Jan 7, 2025
Merged

feat: support for Gemini file urls#81
srijanpatel merged 2 commits intomainfrom
feat/geminiUrls

Conversation

@JeanKaddour
Copy link
Copy Markdown
Contributor

@JeanKaddour JeanKaddour commented Jan 7, 2025

This pull request includes several changes to enhance the handling of URL variables for Gemini models and improve the overall functionality of the generate_text function. The most important changes include updates to the LLMModels enum, modifications to the generate_text function to handle URL variables, and updates to the frontend to support URL variable configuration.

Enhancements to URL variable handling:

Frontend updates:

Configuration updates:


Important

Adds support for handling URL variables in Gemini models, updates generate_text function, and modifies frontend for URL variable configuration.

  • Backend Enhancements:
    • Updated LLMModels enum in _utils.py to use new format for Gemini model names.
    • Modified generate_text in _utils.py to handle URL variables for Gemini models.
    • Added url_variables field to SingleLLMCallNodeConfig in single_llm_call.py and updated run method to process URL variables.
  • Frontend Updates:
    • Added URL variable configuration section in NodeSidebar.tsx for Gemini models.
    • Updated renderConfigFields and renderUrlVariableConfig in NodeSidebar.tsx to support URL variables.

This description was created by Ellipsis for 48511dd. It will automatically update as commits are pushed.

Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 48511dd in 11 seconds

More details
  • Looked at 16 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. backend/app/nodes/llm/_utils.py:469
  • Draft comment:
    Remove debugging print statements to clean up the code.
    # print(f"kwargs: {kwargs}")
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The print statements for debugging purposes should be removed or replaced with proper logging to maintain clean code and avoid unnecessary console output in production.

Workflow ID: wflow_9rN4bg9E53IdcmPp


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 874568d in 1 minute and 41 seconds

More details
  • Looked at 262 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. backend/app/nodes/llm/_utils.py:470
  • Draft comment:
    Remove print statements used for debugging or replace them with proper logging.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The print statements used for debugging should be removed or replaced with proper logging.
2. backend/app/nodes/llm/_utils.py:519
  • Draft comment:
    The JSON response handling logic is duplicated. Consider refactoring it into a separate function to improve maintainability.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code for handling JSON responses is duplicated and can be refactored for better maintainability.
3. backend/app/nodes/llm/single_llm_call.py:97
  • Draft comment:
    The URL variable processing logic is specific to Gemini models. If other models require similar handling, consider generalizing this logic.
  • Reason this comment was not posted:
    Confidence changes required: 33%
    The code for processing URL variables in the run method is specific to Gemini models and should be generalized if other models require similar handling.
4. frontend/src/components/nodes/nodeSidebar/NodeSidebar.tsx:721
  • Draft comment:
    The renderUrlVariableConfig function is specific to Gemini models. Consider generalizing if other models require similar configurations.
  • Reason this comment was not posted:
    Confidence changes required: 33%
    The renderUrlVariableConfig function in the frontend is tightly coupled with Gemini models. If other models require similar configurations, consider generalizing this function.

Workflow ID: wflow_JRHJrKkO3HWxLoeM


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@srijanpatel srijanpatel merged commit 77f86ce into main Jan 7, 2025
@JeanKaddour JeanKaddour deleted the feat/geminiUrls branch January 16, 2025 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants