-
Notifications
You must be signed in to change notification settings - Fork 260
fix: Ignore the Chain-of-Thought in AI response #952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3a80faf
to
5949b4e
Compare
Moved CoT removing method into GenerateCommitMessage to avoid remove think tags in prompts. |
Improve regex pattern to specifically match and capture content within Can we merge this PR first? It removes some API service providers that do not support the openai Refer: |
The |
- Improve chat response processing to handle thinking patterns using regular expressions. - Migrate server value by removing trailing '/chat/completions' path.
9f3a58d
to
fb36b08
Compare
Can we merge this now? I want to use |
I'll check this PR tomorrow |
I'm using deepseek api (DeepSeek official service) with |
The official API does not have this problem, but it may be encountered when deploying through open-source models, such as the |
You can try groq, which is free 1000 reqs/day |
I think remove
For most AI clients, it should be considered to separate the thinking chain from the display of answers. However, in the scenario where the AI returns results as submitted information here, the thinking chain is of no use. Moreover, the current processing results temporarily store the thinking chain in the |
All right. I have no questions. Good job! |
Comments as records: DeepSeek updated the chat template https://huggingface.co/deepseek-ai/DeepSeek-R1/commit/8a58a132790c9935686eb97f042afa8013451c9f , which makes the final output not include the starting |
I reviewed the code of the official OpenAI SDK, and it seems that the official SDK does not handle the direct return of the Chain-of-Thought
<think>{thinking}</think>\n\n{content}
. After switching to the official SDK, you may need to perform additional processing on the returned results.