langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
50.39k stars 7.23k forks source link

Provide API Base configurations for model providers such as Zhipu, Moonshot, and Tongyi Qianwen #3153

Closed majian159 closed 6 months ago

majian159 commented 6 months ago

Self Checks

1. Is this request related to a challenge you're experiencing?

I'm using gateways like Portkey and OneAPI to centralize billing and API key rate limiting policies. However, when using Dify, I can't specify the API Base for model providers such as Zhipu and Moonshot, leading to uncontrollable large model requests on Dify. I hope to resolve this issue.

2. Describe the feature you'd like to see

Model providers such as Zhipu, Moonshot, and Tongyi Qianwen offer the same API Base capabilities as OpenAI, which I will configure to the gateway address.

3. How will this feature improve your workflow or experience?

This allows for unified management of billing and access policies, and can also address issues related to network policies.

4. Additional context or comments

No response

5. Can you help us with this feature?

zfanswer commented 6 months ago

you can use openapi-compatible-provider to register the llm services which managed on OneAPI, screenshot blow shows 2 OneApi managed llm services which can be registered on dify.

image
majian159 commented 6 months ago

This does not apply, it seems to be caused by too strict data validation.

@zfanswer @crazywoola

WeChat184b80478feb1473
e7cf6d7d0759442d