feat: support claude api fix #659

This commit is contained in:
ikechan8370 2024-03-08 14:38:39 +08:00
parent 8b2493a4bf
commit 79ab6cbd40
17 changed files with 859 additions and 563 deletions

View file

@ -0,0 +1,27 @@
// import { ClaudeAPIClient } from '../ClaudeAPIClient.js'
//
// async function test () {
// const client = new ClaudeAPIClient({
// key: 'sk-ant-api03-**************************************',
// model: 'claude-3-opus-20240229',
// debug: true,
// // baseUrl: 'http://claude-api.ikechan8370.com'
// })
// let rsp = await client.sendMessage('你好')
// console.log(rsp)
// }
// global.store = {}
// global.redis = {
// set: (key, val) => {
// global.store[key] = val
// },
// get: (key) => {
// return global.store[key]
// }
// }
// global.logger = {
// info: console.log,
// warn: console.warn,
// error: console.error
// }
// test()

View file

@ -1,6 +1,6 @@
import { SlackCozeClient } from '../CozeSlackClient.js'
import fs from 'fs'
global.store = {}
// global.store = {}
// global.redis = {
// set: (key, val) => {