Open catdddmouse opened 3 weeks ago
@catdddmouse Hello there! I'm a bot designed to help you with bug fixes, answer questions, and guide you on becoming a contributor. If you need any assistance, feel free to ask.
To resolve the 400 Bad Request error with the message "[openai_api_compatible] Error: 'model'" when calling the API for the arrangement page in Dify version 0.7.0 (Cloud), follow these steps:
Check the Model Name: Ensure that the model name you are using is correctly specified and supported. For example, valid model names include gpt-3.5-turbo
and gpt-4
.
Set the Model in the Application: Make sure you have selected the correct model in the application settings. You can do this by navigating to 提示词编排 --> 模型及参数 --> 语言模型 and selecting the appropriate model.
Verify API Key and Quota: Ensure that your OpenAI API key is valid and that you have not exceeded your quota. If you encounter issues with the API key, you may need to check your plan and billing details.
Update Model Settings: If you are using a custom API domain or a different model provider, ensure that the settings are correctly configured in 设置 --> 模型供应商 --> OpenAI --> 编辑 API.
If the issue persists, review the specific API request being made and ensure that all required parameters, including the model
parameter, are correctly included in the request.
Example of setting the model in the API request:
{
"model": "gpt-3.5-turbo",
"prompt": "Your prompt here",
"max_tokens": 100
}
Ensure that the model
field is correctly specified as shown above [1].
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.7.0
Cloud or Self Hosted
Cloud
Steps to reproduce
✔️ Expected Behavior
Can be called normally through the api interface
❌ Actual Behavior