npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

claude-revert-api

v0.0.38

Published

revert claude chart api.

Downloads

37

Readme

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 [email protected] or follow my twitter

And feel free open an issue or PR.

Document: https://parsedark.github.io/claude-revert-api/

NPM version NPM downloads

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

// baseURL?: string
// uuid: string;
// organization_uuid: organizationType;
// sessionKey: string;
// name?: string;
createConversationSDK
// baseURL?: string
// sessionKey: string;
// prompt: string;
// metadata: IMetadata;
appendMessageSDK
// baseURL?: string
// organization_uuid: organizationType;
// sessionKey: string;
conversationListSDK
// baseURL?: string
// sessionKey: string;
// organization_uuid: organizationType;
// conversation_uuid: conversationType;
deleteConversationSDK
//   baseURL?: string
//   sessionKey: string;
//   organization_uuid: organizationType;
//   conversation_uuid: conversationType;
getConversationSDK
// baseURL?: string
// organization_uuid: organizationType;
// conversation_uuid: conversationType;
// sessionKey: string;
// title: string;
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.

// ClaudeRevertAPI(baseURL: string, sessionKey: string)
const claude = new ClaudeRevertAPI("https://claude.ai", "sessionKey");

// create a new chat session
claude.createConversation(organization_uuid: string)
// post a new message session
claude.appendMessage(prompt: string, metadata: IMetadata)
// get all chat session
claude.conversationList(organization_uuid: string)
// delete chat session
claude.deleteConversation(organization_uuid: organizationType, conversation_uuid: conversationType)
// get history message 
claude.getConversation(organization_uuid: organizationType, conversation_uuid: conversationType)
// rename your session
claude.renameConversation(title: string,organization_uuid: organizationType, conversation_uuid: conversationType)

Pending issue

  1. 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