deepseek-ai / DeepSeek-V2

DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model
MIT License
3.08k stars 115 forks source link

Compatibility issues with the OpenAI Python client. #52

Open dennymao opened 1 month ago

dennymao commented 1 month ago

server return http status code 422; request:

{ "model": "deepseek-chat", "messages": [ { "role": "system", "content": "someting" }, { "role": "user", "content": [ { "type": "image_url", "image_url": { "url": "data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAA............", "detail": "high" } }, { "type": "text", "text": "\\nGenerate code for a web page that looks exactly like this.\\n" } ] } ], "stream": true, "timeout": 600, "temperature": 0.0, "max_tokens": 4096 }

xyh0202 commented 1 month ago

"timeout" is not a valid request parameter for deepseek api. Please refer to API document https://platform.deepseek.com/api-docs/api/create-chat-completion/

dennymao commented 1 month ago

I understand, but in the official DeepSeek example code, they use OpenAI's client: from openai import OpenAI. Therefore, I think DeepSeek should consider either fully supporting compatibility with OpenAI's client and API parameters, or creating its own proprietary one. It's not ideal to have a semi-compatible approach that appears to work but actually doesn't in practice. This is not elegant.