claude-revert-api
A wrapper of the claude 2. Basicly use the axios mock a sdk. For my project switch to claude2.
Code will be open source. I still test for it.
If you have more requirement just send email to 3173991952@qq.com or follow my twitter
And feel free open an issue or PR.
Document: https://parsedark.github.io/claude-revert-api/
Install
// npm
npm install claude-revert-api
// pnpm
pnpm install claude-revert-api
Develop
pnpm install
$ npm run dev
$ npm run build
Usage 1: only use the sdk
createConversationSDK
appendMessageSDK
conversationListSDK
deleteConversationSDK
getConversationSDK
renameConversationSDK
Usage 2: if need to customize the base_url or token
for this usage i think your are not the claude api support region. So we need to do a proxy. When use the proxy will change the base url. So you need to use this OOP style.
const claude = new ClaudeRevertAPI("https://claude.ai", "sessionKey");
claude.createConversation(organization_uuid: string)
claude.appendMessage(prompt: string, metadata: IMetadata)
claude.conversationList(organization_uuid: string)
claude.deleteConversation(organization_uuid: organizationType, conversation_uuid: conversationType)
claude.getConversation(organization_uuid: organizationType, conversation_uuid: conversationType)
claude.renameConversation(title: string,organization_uuid: organizationType, conversation_uuid: conversationType)
Pending issue
- axios browser call streaming issue. If you use the sdk to the browser. The appendMessage SDK can't be a stream response. Only return all of thing one time. It's will cause long response time.
Have fun for it.
LICENSE
MIT