mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
feat: support claude api fix #659
This commit is contained in:
parent
8b2493a4bf
commit
79ab6cbd40
17 changed files with 859 additions and 563 deletions
27
client/test/ClaudeApiClientTest.js
Normal file
27
client/test/ClaudeApiClientTest.js
Normal 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()
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import { SlackCozeClient } from '../CozeSlackClient.js'
|
||||
import fs from 'fs'
|
||||
global.store = {}
|
||||
// global.store = {}
|
||||
|
||||
// global.redis = {
|
||||
// set: (key, val) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue