dify-openai-apis-0.1.8 is not a library.
English | 中文
dify-openai-apis
Description
OpenAI-compatible APIs for Dify platform services.
This crate provides a set of APIs that are compatible with OpenAI's GPT-3 API, and can be used to interact with Dify's platform services and tools.
Note: The app currently does not support OpenAI's Legacy Completions API. Please use the Chat Completion API instead.
Config
Configurations can be set via .env file or environment variables:
HOST: The host to bind the server to. Default:127.0.0.1PORT: The port to bind the server to. Default:3000DIFY_BASE_URL: The base URL of Dify's API. Default:https://api.dify.aiDIFY_API_KEY: Your API key for Dify's API. Default:your_api_keyDIFY_TIMEOUT: The timeout for requests to Dify's API. Default:10WORKERS_NUM: The number of worker threads to use. Default:4RUST_LOG: The log level for the server. Default:error
Note:
DIFY_API_KEYis the default API key. If a user provides an API key via Bearer Token when requesting the API/v1/chat/completions, it will override this default value.RUST_LOGis the log level, with a default value oferror, meaning only error logs will be output. If you want to debug, it is recommended to set it todebugortrace.
Install
Please download the precompiled binary from : Release page
You can also install it using the cargo command.
# require cargo installed
Usage
To start the server, run:
# require cargo bin directory in PATH
# export PATH=$HOME/.cargo/bin:$PATH