ChatGPTNextWeb / ChatGPTNextWeb/NextChat

[Feature Request] Add support for prompt caching with Claude

Open
#5,279 1 comment 0 reactions 1 assignee Claimed by @Dogtiti View on GitHub
enhancement
Dominant language
TypeScript
Stars
88.8k
Forks
59.1k
PR merge metrics
No merged PRs in 30d

Description

### 🥰 Feature Description

Claude昨天新出了Prompt缓存功能,价格降低90%,在多轮对话场景下能够极大减少费用,能否在Claude模型和自定义接口中添加支持?
https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching

### 🧐 Proposed Solution

对于Claude,Prompt缓存功能通过在Header中添加“anthropic-beta: prompt-caching-2024-07-31”开启。
建议自定义接口新增选项允许用户添加自定义的Headers列表,在发送请求时与默认Headers合并发送。

### 📝 Additional Information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.