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

Plugged in a simple docker container that exposes dify's api as OpenAI compatible API on port 8001. #14046

Closed
wants to merge 2 commits into from

Conversation

nimishchaudhari
Copy link

Summary

This pull request introduces a Docker container that exposes Dify's API as an OpenAI-compatible API on port 8001. This change enhances interoperability with OpenAI-compatible tools and services by providing an easily accessible API endpoint.

Key Changes

  • Docker container funnyzak/dify2openai:0.0.1 for exposing Dify's API as an OpenAI-compatible API.
  • The API is accessible on port 8001.

Motivation

  • Improve compatibility with OpenAI-compatible tools.
  • Simplify deployment and usage of Dify's API.

Dependencies

Environment Variables

ENVIRONMENT_VARIABLE Required Description Example
DIFY_API_URL Yes Your Dify API if you self-host it https://api.dify.ai/v1
BOT_TYPE Yes The type of your Dify bots Chat, Completion, Workflow
INPUT_VARIABLE No The name of the input variable in your own Dify workflow bot query, text
OUTPUT_VARIABLE No The name of the output variable in your own Dify workflow bot text
MODELS_NAME No The model name output by the /v1/models endpoint. The default value is dify.

Fixes

No specific issue was mentioned for this pull request.

Screenshots

Before After
N/A N/A

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat (backend) and cd web && npx lint-staged (frontend) to appease the lint gods.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. 📚 documentation Improvements or additions to documentation labels Feb 19, 2025
@crazywoola
Copy link
Member

Checkout this https://marketplace.dify.ai/plugins/langgenius/openai_api_compatible.

We will release v1.0.0 soon.

@crazywoola crazywoola closed this Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 documentation Improvements or additions to documentation size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants