I was wondering if Dify supports the File Search feature offered by large language models, like the one OpenAI has. (see [OpenAI File Search API](https://platform.openai.com/docs/assistants/tools/file-search)). #4116

Closed
opened 2026-02-21 18:04:49 -05:00 by yindo · 1 comment
Owner

Originally created by @ghost on GitHub (Jun 16, 2024).

I was wondering if Dify supports the File Search feature offered by large language models, like the one OpenAI has. (see OpenAI File Search API).

This isn't about Dify having its own file search, but rather using the file search capabilities of the language model itself.

It would be super helpful for us to quickly search through multiple documents.

Originally posted by @xielong in https://github.com/langgenius/dify/discussions/5095

Originally created by @ghost on GitHub (Jun 16, 2024). I was wondering if Dify supports the File Search feature offered by large language models, like the one OpenAI has. (see [OpenAI File Search API](https://platform.openai.com/docs/assistants/tools/file-search)). This isn't about Dify having its own file search, but rather using the file search capabilities of the language model itself. It would be super helpful for us to quickly search through multiple documents. _Originally posted by @xielong in https://github.com/langgenius/dify/discussions/5095_
yindo added the 🙋‍♂️ question label 2026-02-21 18:04:49 -05:00
yindo closed this issue 2026-02-21 18:04:49 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 16, 2024):

Hey @kebotbmfl! I'm a bot here to help you with bugs, questions, and contributions. Let me know how I can assist you while you wait for a human maintainer.

Yes, Dify supports file search capabilities similar to the OpenAI File Search API through its Hybrid Search feature. Hybrid Search combines Vector Search and Full-Text Search to leverage the strengths of both methods, including a re-ranking step to optimize the order of search results. This allows for comprehensive search functionality across multiple documents [1].

For integrating an external API like the OpenAI File Search API into a Dify application, you can follow these steps:

  1. Obtain API Key: Get your API key from OpenAI.
  2. Set Environment Variables: Add the OpenAI API key to your Dify application's environment configuration.
  3. Configure API Endpoint: Set up the base endpoint for the OpenAI API if necessary.
  4. Develop the API Extension: Follow Dify's API extension specifications to ensure proper integration.
  5. Make API Requests: Use the API key to make authenticated requests to the OpenAI File Search API from within your Dify application.
  6. Verify API Availability: Ensure the API responds to a point=ping request with result=pong.
  7. Access API Documentation: Use Dify's API Access section to view documentation and manage credentials [2][3][4][5].

This setup will enable you to leverage the file search capabilities of large language models within your Dify application.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jun 16, 2024): <!-- Greeting --> Hey @kebotbmfl! I'm a bot here to help you with bugs, questions, and contributions. Let me know how I can assist you while you wait for a human maintainer. <!-- Answer --> Yes, Dify supports file search capabilities similar to the OpenAI File Search API through its Hybrid Search feature. Hybrid Search combines Vector Search and Full-Text Search to leverage the strengths of both methods, including a re-ranking step to optimize the order of search results. This allows for comprehensive search functionality across multiple documents <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/en/features/retrieval-augment/hybrid-search.md)</sup>. For integrating an external API like the OpenAI File Search API into a Dify application, you can follow these steps: 1. **Obtain API Key**: Get your API key from OpenAI. 2. **Set Environment Variables**: Add the OpenAI API key to your Dify application's environment configuration. 3. **Configure API Endpoint**: Set up the base endpoint for the OpenAI API if necessary. 4. **Develop the API Extension**: Follow Dify's API extension specifications to ensure proper integration. 5. **Make API Requests**: Use the API key to make authenticated requests to the OpenAI File Search API from within your Dify application. 6. **Verify API Availability**: Ensure the API responds to a `point=ping` request with `result=pong`. 7. **Access API Documentation**: Use Dify's API Access section to view documentation and manage credentials <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/tests/integration_tests/.env.example)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/features/extension/api_based_extension/README.md)</sup><sup>[[4]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/openai/openai.yaml)</sup><sup>[[5]](https://github.com/langgenius/dify-docs/blob/main/en/user-guide/launching-dify-apps/developing-with-apis/README.md)</sup>. This setup will enable you to leverage the file search capabilities of large language models within your Dify application. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4116