Giter VIP home page Giter VIP logo

claude-api's Introduction


claude-api's People

Contributors

bincooo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

claude-api's Issues

上下文对话未生效

const claudeUnofficalChat = async (options,handleMessage) => {
  try{
    const module = await import('claude-api');
    let {token,appid,message,userId,conversationId}=options
    token = decrypt(token)
    appid = decrypt(appid)
    const Authenticator = module.default;
    token = token,
    // claude appid
    bot = appid,
    text = message

  const authenticator = new Authenticator(token, bot)
  // 创建一个频道,已存在则直接返回频道ID
  const channel = await authenticator.newChannel(`chat-${userId}`)
  let isStart=false
  let chatoptions = {
    text, channel, onMessage: (data) => {
      if(!isStart){
        isStart=true
        handleMessage('[START]')
      }
      handleMessage(data.text)
    }
  }
  if(conversationId){
    chatoptions.conversationId=conversationId
  }
  console.log(chatoptions)

  let result = await authenticator.sendMessage(chatoptions)
  handleMessage(`[DONE]${result.conversationId}`)
  console.log('==============1\n', result)
  }catch(error){
   handleMessage(`[ERROR]`)
   throw error
  }
}

你好,想请教下上下文为什么不起作用,我第二次对话时查看了chatoptions配置项传递的conversationId是有值的,且是第一次对话返回的conversationId值,但是并不能实现上下文对话

advice

大佬牛逼,这个claude-api的go库可以把文档完善更详细一些,写一个go使用claude包使用claude的example。

看起来这个邮箱注册寄了

verify_code Error: 403 Text={"error":{"type":"permission_error","message":"signups_disabled"}}

之前的账号:[Claude2Error::invalid_request_error]Account in read-only mode

login出问题了

login出问题了,看了邮箱地址报错,换了其他的,还是有问题,爆权限错误,应该是InnerRk和InnerRT被制裁了

这个的qps是多少呢?

我刚在测试,使用3个频道,然后1分钟发送4千个请求,发现一百多就被频控了。是否可以实现1分钟4千个请求的需求呢?

image

有一些会没有回复
image

import 引入使用会报错

require() of ES Module /app/node_modules/p-timeout/index.js from /app/node_modules/claude-api/build/index.js not supported
请问这个是什么原因?

The response information is incomplete

最后一次触发onMessage返回的数据。最后还少了一句话,就不返回数据了。请问是否有遇到这种情况?
环境:把claude-api部署到aws lambda function

{
    "id": "45ac590c-ab7e-4427-8b9f-ce4c83251ad9",
    "text": " 最高的楼一般称为“世界第一高楼”或“世界最高楼”。目前世界最高楼为位于阿拉伯联合酋长国迪拜的哈利法塔,高828米,共163层。\n\n下一步高楼排名前几名为:\n\n2. 上海中心大厦,上海,632米,128层\n\n3. 马来西亚Petronas双子塔,吉隆坡,452米,88层\n\n4. 台北101,台北,508米,101层\n\n5. 广州仪电广场,广州,440米,103层 \n\n除此之外,许多城市都在争相建设新的最高楼,以提高城市知名度和吸引游客。最著名的有:\n\n•土耳其伊斯坦布尔的土耳其最高塔,预计高度将达到约1000米。\n\n•沙特阿拉伯吉达的麦加皇家钟楼,预计高度1001米,将超过哈利法塔。\n\n•美国芝加哥的Willis塔,预计高度直达1450米,如果建成将成为新的世界最高楼。\n\n等等。最高楼的建设一直是各国展示科技实力和城市魅力的重要手段,也成为城市发展和世界各地\n\n",
    "conversation_id": "fd1edaaa-776f-4068-9caa-fb6619012677"
}

slack上可以看到完整的回复

image

注册不行了

{"error":{"type":"invalid_request_error","message":"recaptcha_failed"}}

关于彻底解决注册时报signup_disabled

非常感谢大佬开此坑!

近期是发现用着用着就报账号readonly了,之后重新login报signup_disabled是因为邮箱被拉黑了?
观察了近期几次更新,貌似是从邮箱接码解决的?触发这个原因是因为上面说的邮箱后缀导致的嘛?
感觉可以把接码业务抽象成接口来方便后期无缝或自行实现此项功能?
还有recaptcha的验证码token有没有可能从他们的前端js里抓取?

希望能跟大佬讨论一下这些问题,之后我看一下能不能帮忙一起改进这个过程~

请问报301是什么原因?

[WARN] web-api:WebClient:0 http request failed An HTTP protocol error occurred: statusCode = 301

[WARN] web-api:WebClient:0 http request failed An HTTP protocol error occurred: statusCode = 301

[WARN] web-api:WebClient:0 http request failed An HTTP protocol error occurred: statusCode = 301

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.