Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: DuckDuckGo image search tool error #5606

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Conversation

hjlarry
Copy link
Contributor

@hjlarry hjlarry commented Jun 26, 2024

Description

  1. Fixes Error when using DuckDuckGo image search tool #5244. As the doc described, we should pass IDs instead of Model objects to avoid DetachedInstanceError.
  2. Now the image search results will not be downloaded. For agent mode, the images display well. For workflow mode, I add a remote_url field in the files response to avoid affect others.

1719371661878

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement

How Has This Been Tested?

I test it locally.

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional I have added tests that prove my fix is effective or that my feature works
  • optional New and existing unit tests pass locally with my changes

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. 🐞 bug Something isn't working 💪 enhancement New feature or request labels Jun 26, 2024
@crazywoola crazywoola requested a review from laipz8200 June 26, 2024 03:24
Copy link
Member

@laipz8200 laipz8200 left a comment

Choose a reason for hiding this comment

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

LGTM. Maybe we should open a new issue to make our FileVar.url more readable.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 26, 2024
@laipz8200 laipz8200 merged commit b8926ea into langgenius:main Jun 26, 2024
5 checks passed
Scorpion1221 added a commit to yybht155/dify that referenced this pull request Jun 26, 2024
* commit '8d9a45908397b3f3c0d56e86160bb97b5611b79b': (240 commits)
  fix: remove obsoleted 'version' elements in compose files (langgenius#5553)
  chore: add a secondary confirmation dialog when the user delete the tool (langgenius#5634)
  fix: ro-RO is not a valid language (langgenius#5635)
  FR: langgenius#4048 - Add color customization to the chatbot  (langgenius#4885)
  feat: tracing fe (langgenius#5487)
  feat: add ops trace (langgenius#5483)
  chore: cleanup test_delete_by_document_id method in opensearch vdb test (langgenius#5619)
  chore(pyproject.toml): Add Ruff formatter config. (langgenius#5627)
  Fix link to documentation of nodes (langgenius#5623)
  feat: undo/redo for workflow editor (langgenius#3927)
  fix: populate app configs to system environment variables (langgenius#5590)
  fix: DuckDuckGo image search tool error (langgenius#5606)
  delete the deprecated method  (langgenius#5612)
  fix: context icon in chat (langgenius#5604)
  fix: Modify the incorrect configuration name for Google storage (langgenius#5595)
  feat: update issue template (langgenius#5592)
  chore: fix typo in config descriptions (langgenius#5585)
  fix: add support for FILE type in ToolParameterConverter (langgenius#5578)
  Fix/single run panel show parent scrollbar (langgenius#5574)
  refactor: extract cors configs into dify config and cleanup the config class (langgenius#5507)
  ...

# Conflicts:
#	.github/workflows/build-push.yml
#	api/Dockerfile
#	api/core/helper/code_executor/code_executor.py
#	api/requirements.txt
Scorpion1221 added a commit to yybht155/dify that referenced this pull request Jun 26, 2024
* commit '17d2f0bb0d3c7618ed59968613175d2344fcbdc1': (145 commits)
  fix(api/configs): Ignore empty environment variables when loading config. (langgenius#5647)
  fix: type error in config (langgenius#5643)
  fix: remove obsoleted 'version' elements in compose files (langgenius#5553)
  chore: add a secondary confirmation dialog when the user delete the tool (langgenius#5634)
  fix: ro-RO is not a valid language (langgenius#5635)
  FR: langgenius#4048 - Add color customization to the chatbot  (langgenius#4885)
  feat: tracing fe (langgenius#5487)
  feat: add ops trace (langgenius#5483)
  chore: cleanup test_delete_by_document_id method in opensearch vdb test (langgenius#5619)
  chore(pyproject.toml): Add Ruff formatter config. (langgenius#5627)
  Fix link to documentation of nodes (langgenius#5623)
  feat: undo/redo for workflow editor (langgenius#3927)
  fix: populate app configs to system environment variables (langgenius#5590)
  fix: DuckDuckGo image search tool error (langgenius#5606)
  delete the deprecated method  (langgenius#5612)
  fix: context icon in chat (langgenius#5604)
  fix: Modify the incorrect configuration name for Google storage (langgenius#5595)
  feat: update issue template (langgenius#5592)
  chore: fix typo in config descriptions (langgenius#5585)
  fix: add support for FILE type in ToolParameterConverter (langgenius#5578)
  ...

# Conflicts:
#	.github/workflows/build-push.yml
#	api/Dockerfile
#	api/requirements.txt
ZhouhaoJiang added a commit that referenced this pull request Jun 27, 2024
* refs/heads/feat/cleaning_ops_trace: (23 commits)
  feat: update migrate file
  fix: generate name trace info error
  feat: undo/redo for workflow editor (#3927)
  fix: populate app configs to system environment variables (#5590)
  fix: DuckDuckGo image search tool error (#5606)
  delete the deprecated method  (#5612)
  feat: update langfuse trace structure
  fix: context icon in chat (#5604)
  fix: Modify the incorrect configuration name for Google storage (#5595)
  feat: update issue template (#5592)
  feat: update workflow trace
  chore: fix typo in config descriptions (#5585)
  optimize
  feat: optimize file_list
  fix
  fix _invoke_error_mapping of tongyi tts
  optimize error msg
  feat: update suggested question trace manager
  fix: add support for FILE type in ToolParameterConverter (#5578)
  Fix/single run panel show parent scrollbar (#5574)
  ...

# Conflicts:
#	api/controllers/console/datasets/error.py
#	api/services/workflow_service.py
#	web/i18n/en-US/workflow.ts
#	web/i18n/zh-Hans/workflow.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 💪 enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when using DuckDuckGo image search tool
2 participants