Sign inSign up

funnyzak/dify2openai

By funnyzak

•Updated almost 2 years ago

converts the Dify API to the OpenAI API format.

Image
0

3.1K

funnyzak/dify2openai repository overview

⁠dify2openai

Docker Tags Image Size Docker Stars Docker Pulls

dify2openai converts the Dify API to the OpenAI API format, giving you access to Dify's LLMs, knowledge base, tools, and workflows within your preferred OpenAI clients. More information can be found at dify2openai⁠.

This image is built with the linux/amd64, linux/arm64, linux/arm/v7, linux/arm64/v8, linux/ppc64le, linux/s390x architectures.

Pulling Images:

You can pull the images using the following commands:

Docker Pull Commands
docker pull funnyzak/dify2openai:latest
# GHCR 
docker pull ghcr.io/funnyzak/dify2openai:latest
# Aliyun
docker pull registry.cn-beijing.aliyuncs.com/funnyzak/dify2openai:latest

⁠Environment Variable

This project provides some additional configuration items set with environment variables:

Environment VariableRequiredDescriptionExample
DIFY_API_URLYesYour Dify API if you self-host ithttps://api.dify.ai/v1
BOT_TYPEYesThe type of your Dify botsChat,Completion,Workflow
INPUT_VARIABLENoThe name of input variable in your own Dify workflow botquery,text
OUTPUT_VARIABLENoThe name of output variable in your own Dify workflow bottext
MODELS_NAMENoThe value is the model name output by the /v1/models endpoint. The default value is dify.

⁠Deployment

⁠Docker Deployment
docker run --name dify2openai -d \
  --network bridge \
  -p 3000:3000 \
  -e DIFY_API_URL=https://api.dify.ai/v1 \
  -e BOT_TYPE=Chat \
  --restart always \
  funnyzak/dify2openai:latest
⁠Docker Compose Deployment
version: '3.1'
services:
  dify2openai:
    image: funnyzak/dify2openai:latest
    container_name: dify2openai
    environment:
      - DIFY_API_URL=https://api.dify.ai/v1
      - BOT_TYPE=Chat
    ports:
      - 3000:3000
    restart: always

More information can be found at dify2openai⁠.

Tag summary

Content type

Image

Digest

sha256:0c369f9a9…

Size

40.8 MB

Last updated

almost 2 years ago

docker pull funnyzak/dify2openai