Closed orangeclk closed 1 month ago
To enable price calculation for ZhipuAI models in your self-hosted Docker setup, ensure that the ZHIPUAI_API_KEY
environment variable is set. This key is necessary for fetching the price information.
Here is the relevant code snippet that checks for the api_key
:
if api_key is None:
api_key = os.environ.get("ZHIPUAI_API_KEY")
if api_key is None:
raise ZhipuAIError("未提供api_key,请通过参数或环境变量提供")
Make sure to set the ZHIPUAI_API_KEY
in your environment variables to resolve the issue with missing price information for ZhipuAI models [1].
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.6.16
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Check the monitoring panel and you will find there is no price info.
✔️ Expected Behavior
It should be possible to calculate the price correctly.
❌ Actual Behavior
No response