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

incorrect transfer of image file in workflow. #3217

Closed
4 tasks done
CenturyOldGoblin opened this issue Apr 9, 2024 · 3 comments
Closed
4 tasks done

incorrect transfer of image file in workflow. #3217

CenturyOldGoblin opened this issue Apr 9, 2024 · 3 comments
Assignees
Labels
🐞 bug Something isn't working

Comments

@CenturyOldGoblin
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a quesion, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.6.0-fix1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

create any workflow
use image model

✔️ Expected Behavior

correct usage of image by LLM

❌ Actual Behavior

start:
{
"sys.query": "这是什么书",
"sys.files": [
{
"__variant": "FileVar",
"tenant_id": "7767b646-820f-489e-85f2-83df6fecf57f",
"type": "image",
"transfer_method": "remote_url",
"url": "https://s3proxy.cdn-zlib.se/covers400/collections/userbooks/adcfeeddedd2a11bb7a06c56c650cdeb1f4ec3518a51f75882c00dca68f95ed6.jpg",
"related_id": null,
"filename": null,
"extension": null,
"mime_type": null
}
]
}
LLM:
{
"model_mode": "chat",
"prompts": [
{
"role": "system",
"text": "你是一个乐于助人的助手。\n回答用户时:\n如果你不知道,就直说你不知道。如果你在不确定的时候不知道,就寻求澄清。\n避免提及你是从上下文中获取的信息。\n并根据用户问题的语言来回答。",
"files": []
},
{
"role": "user",
"text": "这是什么书",
"files": []
}
]
}

Copy link

dosubot bot commented Apr 9, 2024

Thank you for providing detailed information about the issue you're experiencing. Based on the provided start and LLM payloads, it seems like the image file is not being transferred correctly to the LLM for processing.

The issue might be related to how the image file is being handled during the transfer process. In the start payload, the sys.files array contains an object with the transfer_method set to remote_url. This indicates that the image file is expected to be transferred via a remote URL. However, in the LLM payload, the files array in the prompts object is empty, which suggests that the image file is not being transferred as expected.

Here are some steps you can take to troubleshoot and potentially resolve this issue:

  1. Verify the Image URL: Ensure that the image URL provided in the sys.files array is valid and accessible. You can do this by trying to access the URL in a web browser. If the image does not load, this could be the cause of the issue.

  2. Check the Transfer Method: The transfer_method is set to remote_url, which means Dify is expecting to fetch the image from a remote location. If the image is not hosted at a location that Dify can access, this could be causing the issue. You might need to adjust your hosting setup or use a different transfer method.

  3. Inspect the Server Logs: If Dify is running on a server, check the server logs for any error messages or warnings related to the image transfer process. This could provide clues about what is going wrong.

  4. Check the Dify Configuration: Ensure that Dify is correctly configured to handle image transfers. This includes checking the Dify settings and any environment variables that might affect the image transfer process.

  5. Update Dify: If you're not already using the latest version of Dify, consider updating to the latest version. New versions often include bug fixes and improvements that might resolve the issue.

If you've tried these steps and are still experiencing the issue, it would be helpful to have more information about your setup. Specifically, details about how you're hosting Dify, any customizations you've made to the Dify configuration, and any relevant server logs or error messages would be useful.

I hope this helps! If you have any other questions or need further clarification, please don't hesitate to ask.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added the 🐞 bug Something isn't working label Apr 9, 2024
@iamjoel
Copy link
Collaborator

iamjoel commented Apr 9, 2024

Fixed in #3225

@iamjoel iamjoel closed this as completed Apr 9, 2024
@Alixxxxxxx
Copy link

not fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants