chatgpt-plugin/client/test/ClaudeApiClientTest.js
2024-03-08 14:38:39 +08:00

27 lines
681 B
JavaScript

// 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()