hollama icon indicating copy to clipboard operation
hollama copied to clipboard

Add support for DeepSeek-R1 (API)

Open harrychih opened this issue 1 year ago • 2 comments

I have been using Openai Compatiable Server to set up my DeepSeek-V3 API access; however, as the DeepSeek-R1 published, I found that the process is output in message.choices[0].delta.reasoning_content instead of message.choices[0].delta.content (dont know if same thing happens to OpenAI O1 series models).

Could you manage to fix this issue? Wrap the thinking text into shallow, smaller text like what DeepSeek does might be a good idea (as long as the thinking process could be visible so that people could validate the generated code or text.

harrychih avatar Jan 24 '25 07:01 harrychih

My understanding is that OpenAI does not return the reasoning content. I don't have access to the DeepSeek API but it sounds like they are deviating a little bit from the "OpenAI standard".

Does message.choices[0].delta.reasoning_content include both the reasoning content and the final output? Or is the final output still in message.choices[0].delta.content?

Any chance you can provide an example of the full object returned by DeepSeek's API?

fmaclen avatar Jan 26 '25 15:01 fmaclen

I just pushed a new reasoning UI component that works with DeepSeek-R1 in Ollama.

Image

fmaclen avatar Jan 26 '25 20:01 fmaclen