[feature request] Add support for Chain of Thought (CoT) from deepseek-r1
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 12.5k
- Forks
- 998
- Avg merge
- 6d 12h
- Merged PRs (30d)
- 15
Description
Hello everyone, I think the CoT of deepseek-r1 is significantly helpful for users to understand how the model solves the problem and can help us overcome the LLM hallucinations to some extent.
Currently the llm CLI just print the final output from llm, I think it's a cool feature if the cli can print the CoT.
According to the official document of Deepseek, the CoT is stored by the reasoning_content, which is at the same level as the content field, just like below:
reasoning_content = response.choices[0].message.reasoning_content
content = response.choices[0].message.content
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named; start by locating the llm CLI's response parsing and output entry point, using DeepSeek's official API example and its reasoning_content field as the reference. Done means the CLI prints the CoT as well as the final content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100