[PR #596] [MERGED] improve gemini models #1453

Closed
opened 2026-02-16 10:22:59 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-official-plugins/pull/596
Author: @hjlarry
Created: 3/28/2025
Status: Merged
Merged: 3/30/2025
Merged by: @Yeuoly

Base: mainHead: p9


📝 Commits (6)

  • 3b20f21 improve gemini models
  • d9019ae fix json schema
  • 4f2bd54 fix
  • d85a234 use google-genai~=1.2.0
  • d1c6d6f fix cache and dify plugin version
  • 203d677 refactor FileCache initialization to ensure cache file is writable and fallback to temporary directory if not

📊 Changes

6 files changed (+273 additions, -151 deletions)

View changed files

models/gemini/file_cache.json (+1 -0)
📝 models/gemini/main.py (+0 -2)
📝 models/gemini/manifest.yaml (+1 -1)
📝 models/gemini/models/llm/llm.py (+258 -130)
📝 models/gemini/models/llm/utils.py (+12 -5)
📝 models/gemini/requirements.txt (+1 -13)

📄 Description

Related Issue or Context

change list:

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that may cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Other

Test Evidence

Important

Visual proof is required for Bug fixes, New features, Breaking changes:

  • Screenshots or Video/GIF (if applicable):

image

Issues with sending image messages have been resolved in pull request https://github.com/langgenius/dify-plugin-sdks/pull/73

Note

For Non-LLM Plugin Changes:

  • Bug fixes:
    • Show the fix working
  • New features:
    • Demonstrate the functionality
  • Breaking changes:
    • Show both old and new behavior

For LLM Plugin Changes:

  • Bug fixes:
    • Show the fix working with example inputs/outputs
  • New features:
    • Demonstrate the functionality with example inputs/outputs
  • Breaking changes (requires comprehensive testing):
    • Conversation & Interaction:
      • Conversation sequence correctness:
        • System message handling
        • Proper turn-taking (user→assistant messages)
      • Tool usage demonstrations (if applicable):
        • Multi-round tool interactions
        • Appropriate handling of tool outputs
    • Input/Output Handling:
      • Multimodal input handling (images, PDFs, audio, video if applicable)
      • Multimodal output generation (images, PDFs, audio, video if applicable)
      • Structured output format (if applicable)
    • Metrics:
      • Token consumption metrics
    • Others:
      • Reasoning process (if applicable, e.g. tool use)

Environment Verification

Important

Please confirm your testing environment:

  • Changes tested in a clean/isolated environment
  • Test environment matches production configuration
  • No cached data influenced the test results

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-official-plugins/pull/596 **Author:** [@hjlarry](https://github.com/hjlarry) **Created:** 3/28/2025 **Status:** ✅ Merged **Merged:** 3/30/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `p9` --- ### 📝 Commits (6) - [`3b20f21`](https://github.com/langgenius/dify-official-plugins/commit/3b20f21cfc0fc99ccbcf45c497d51b6bc113d7aa) improve gemini models - [`d9019ae`](https://github.com/langgenius/dify-official-plugins/commit/d9019ae61af1a8190d85263ba07e509aa240f054) fix json schema - [`4f2bd54`](https://github.com/langgenius/dify-official-plugins/commit/4f2bd549cc0cb97d946547e1d99a190deb1493b5) fix - [`d85a234`](https://github.com/langgenius/dify-official-plugins/commit/d85a234830368586d8c4c11899442b4216d40085) use google-genai~=1.2.0 - [`d1c6d6f`](https://github.com/langgenius/dify-official-plugins/commit/d1c6d6fca12632c59dbf828f053a0fdb257560b0) fix cache and dify plugin version - [`203d677`](https://github.com/langgenius/dify-official-plugins/commit/203d67794b195228a3d07249343e83155f38f540) refactor FileCache initialization to ensure cache file is writable and fallback to temporary directory if not ### 📊 Changes **6 files changed** (+273 additions, -151 deletions) <details> <summary>View changed files</summary> ➕ `models/gemini/file_cache.json` (+1 -0) 📝 `models/gemini/main.py` (+0 -2) 📝 `models/gemini/manifest.yaml` (+1 -1) 📝 `models/gemini/models/llm/llm.py` (+258 -130) 📝 `models/gemini/models/llm/utils.py` (+12 -5) 📝 `models/gemini/requirements.txt` (+1 -13) </details> ### 📄 Description ## Related Issue or Context <!-- - Link related issues if applicable: #issue_number - Or provide context about why this change is needed --> change list: - fix https://github.com/langgenius/dify-official-plugins/issues/574 - fix https://github.com/langgenius/dify-official-plugins/issues/582 - fix https://github.com/langgenius/dify-official-plugins/issues/567 - fix https://github.com/langgenius/dify-official-plugins/issues/566 - remove lots of unused requirement package, the `google-genai` package is enough ## Type of Change <!-- Put an `x` in all the boxes that apply --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that may cause existing functionality to not work as expected) - [ ] Documentation update - [x] Code refactoring - [ ] Other ## Test Evidence > [!IMPORTANT] > Visual proof is required for Bug fixes, New features, Breaking changes: - Screenshots or Video/GIF (if applicable): ![image](https://github.com/user-attachments/assets/b56761a9-9137-4eea-8f89-6fbc1c24750c) Issues with sending image messages have been resolved in pull request https://github.com/langgenius/dify-plugin-sdks/pull/73 > [!NOTE] > For Non-LLM Plugin Changes: > - **Bug fixes**: > - [ ] Show the fix working > - **New features**: > - [ ] Demonstrate the functionality > - **Breaking changes**: > - [ ] Show both old and new behavior > > For LLM Plugin Changes: > - **Bug fixes**: > - [x] Show the fix working with example inputs/outputs > - **New features**: > - [ ] Demonstrate the functionality with example inputs/outputs > - **Breaking changes** (requires comprehensive testing): > - **Conversation & Interaction**: > - Conversation sequence correctness: > - [ ] System message handling > - [ ] Proper turn-taking (user→assistant messages) > - Tool usage demonstrations (if applicable): > - [ ] Multi-round tool interactions > - [ ] Appropriate handling of tool outputs > - **Input/Output Handling**: > - [ ] Multimodal input handling (images, PDFs, audio, video if applicable) > - [ ] Multimodal output generation (images, PDFs, audio, video if applicable) > - [ ] Structured output format (if applicable) > - **Metrics**: > - [ ] Token consumption metrics > - **Others**: > - [ ] Reasoning process (if applicable, e.g. tool use) ### Environment Verification > [!IMPORTANT] > Please confirm your testing environment: - [ ] Changes tested in a clean/isolated environment - [ ] Test environment matches production configuration - [ ] No cached data influenced the test results --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 10:22:59 -05:00
yindo closed this issue 2026-02-16 10:22:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#1453