ChatGPTNextWeb / ChatGPTNextWeb/NextChat
[Feature Request] anthropic api 中 system role的实现
- Dominant language
- TypeScript
- Stars
- 88.8k
- Forks
- 59.1k
- PR merge metrics
- No merged PRs in 30d
Description
### 🥰 Feature Description
您好,我在使用claude的api的时候,发现system的role貌似没有生效,于是去大概查询了下源码和官方api的文档。
发现代码中似乎是使用assistant role模拟了system role的实现,而官方文档有提到system role需要额外传一个system的参数,而不是把system prompt放在message里面。


如果是我误读代码还请见谅,项目庞大无法理解全部
最后感谢你们为开源社区做的贡献,谢谢~
### 🧐 Proposed Solution
修改anthropic client中的system role的实现,通过传递system参数来实现system prompt
### 📝 Additional Information
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Anthropic client and inspecting how system-role messages are converted into the request. Compare that request with Anthropic's documented system parameter; done when system prompts are sent through that parameter and the relevant client behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100