How to reply with images in customer service responses #940

Closed
opened 2026-02-21 17:29:08 -05:00 by yindo · 2 comments
Owner

Originally created by @xmsz-stu on GitHub (Jan 22, 2024).

Self Checks

Provide a description of the help you need

I have imported a Word document that contains some responses with images. How can I ensure that when a customer sends a message to customer service, the response includes images where applicable?

Originally created by @xmsz-stu on GitHub (Jan 22, 2024). ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). ### Provide a description of the help you need I have imported a Word document that contains some responses with images. How can I ensure that when a customer sends a message to customer service, the response includes images where applicable?
yindo added the 💪 enhancement📚 documentation labels 2026-02-21 17:29:08 -05:00
yindo closed this issue 2026-02-21 17:29:08 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 22, 2024):

🤖

To include images in customer service responses when the responses are imported from a Word document, you need to configure the file_upload section in the ModelConfig type. Specifically, you need to set the image field in the file_upload section to an instance of VisionSettings where enabled is set to true.

Here is an example of how you can do this:

const modelConfig: ModelConfig = {
  // other fields...
  file_upload: {
    image: {
      enabled: true,
      number_limits: 10, // set the maximum number of images allowed
      detail: Resolution.high, // set the resolution of the images
      transfer_methods: [TransferMethod.all], // set the transfer methods allowed
      image_file_size_limit: '5mb' // set the maximum file size allowed
    }
  },
  // other fields...
}

In this example, the file_upload field is set to an object that includes an image field. The image field is set to an instance of VisionSettings where enabled is set to true, number_limits is set to 10, detail is set to Resolution.high, transfer_methods is set to [TransferMethod.all], and image_file_size_limit is set to '5mb'.

This configuration allows up to 10 high-resolution images to be included in the responses, and the images can be transferred by any method and must be no larger than 5 megabytes each. You can find more details about this in the web/types/app.ts file.

As for your question about the import of Word documents, I wasn't able to find any information about this in the dify repository. It's possible that this feature is not currently supported, or that the information is available elsewhere. If you could provide more details about how you're importing the Word document, I might be able to give a more accurate answer.

Sources


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[bot] commented on GitHub (Jan 22, 2024): _🤖_ <!-- Answer --> To include images in customer service responses when the responses are imported from a Word document, you need to configure the `file_upload` section in the `ModelConfig` type. Specifically, you need to set the `image` field in the `file_upload` section to an instance of `VisionSettings` where `enabled` is set to `true`. Here is an example of how you can do this: ```ts const modelConfig: ModelConfig = { // other fields... file_upload: { image: { enabled: true, number_limits: 10, // set the maximum number of images allowed detail: Resolution.high, // set the resolution of the images transfer_methods: [TransferMethod.all], // set the transfer methods allowed image_file_size_limit: '5mb' // set the maximum file size allowed } }, // other fields... } ``` In this example, the `file_upload` field is set to an object that includes an `image` field. The `image` field is set to an instance of `VisionSettings` where `enabled` is set to `true`, `number_limits` is set to `10`, `detail` is set to `Resolution.high`, `transfer_methods` is set to `[TransferMethod.all]`, and `image_file_size_limit` is set to `'5mb'`. This configuration allows up to 10 high-resolution images to be included in the responses, and the images can be transferred by any method and must be no larger than 5 megabytes each. You can find more details about this in the [web/types/app.ts](https://github.com/langgenius/dify/blob/main/web/types/app.ts) file. As for your question about the import of Word documents, I wasn't able to find any information about this in the dify repository. It's possible that this feature is not currently supported, or that the information is available elsewhere. If you could provide more details about how you're importing the Word document, I might be able to give a more accurate answer. ## Sources - [web/types/app.ts](https://github.com/langgenius/dify/blob/main/web/types/app.ts) --- 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.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 7, 2024):

Close due to it's no longer active, if you have any questions, you can reopen it.

@github-actions[bot] commented on GitHub (Feb 7, 2024): Close due to it's no longer active, if you have any questions, you can reopen it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#940