deepseek-ai/DeepSeek-V2

Chat API响应的role字段不要设为null

jichulu opened this issue · 1 comments

Chat API响应的role字段不要设为null,需要明确。

data: {"choices":[{"delta":{"content":"","role":null},"finish_reason":"stop","index":0,"logprobs":null}],"created":1717557740,"id":"f893ea8481f6fe1487bb2000a9ed3cd9","model":"deepseek-chat","object":"chat.completion.chunk","system_fingerprint":"fp_f4b7ce5256","usage":{"completion_tokens":7,"prompt_tokens":15,"total_tokens":22}}

data: [DONE]

在Azure.AI.OpenAI库不支持为null的role。

带“finish_reason”字段的是最后一个输出chunk,只有第一个chunk有"role":"assistant"