0.0.10 • Published 11 months ago

anthropic-ai v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

anthropic-ai

感谢Anthropic的免费api,提供的ai回答功能

Usage

import ClaudeApi from 'anthropic-ai'
const claude = new ClaudeApi('apikey')
claude.complete('给我写一个js的防抖函数', { model: 'claude-v1.3-100k' }, true).then((res) => {
  console.log(res)
})

Params

1. prompt: string // 问题
2. interface Options {
  model?: 'claude-v1' | 'claude-v1-100k' | 'claude-instant-v1' | 'claude-instant-v1-100k' | 'claude-v1.3' | 'claude-v1.3-100k' | 'claude-v1.2' | 'claude-v1.0' | 'claude-instant-v1.1' | 'claude-instant-v1.1-100k' | 'claude-instant-v1.0'
  max_tokens_to_sample?: number
  stream?: boolean
  stop_sequences?: boolean
  temperature?: number
  top_k?: number
  top_p?: number
}
3. conversation: boolean // 是否开启连续对话

License

MIT License © 2022 Simon He

sponsors

0.0.10

11 months ago

0.0.9

11 months ago

0.0.8

12 months ago

0.0.7

12 months ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago