mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
feat: support chatglm.cn
This commit is contained in:
parent
8bdf9a3b6d
commit
c69358cd80
7 changed files with 287 additions and 23 deletions
17
client/test/ChatGLM4ClientTest.js
Normal file
17
client/test/ChatGLM4ClientTest.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { ChatGLM4Client } from '../ChatGLM4Client.js'
|
||||
|
||||
async function sendMsg () {
|
||||
const client = new ChatGLM4Client({
|
||||
refreshToken: '',
|
||||
debug: true
|
||||
})
|
||||
let res = await client.sendMessage('你好啊')
|
||||
console.log(res)
|
||||
}
|
||||
// global.redis = null
|
||||
// global.logger = {
|
||||
// info: console.log,
|
||||
// warn: console.warn,
|
||||
// error: console.error
|
||||
// }
|
||||
// sendMsg()
|
||||
10
client/test/GoogleGeminiClientTest.js
Normal file
10
client/test/GoogleGeminiClientTest.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { GoogleGeminiClient } from '../GoogleGeminiClient.js'
|
||||
|
||||
async function test () {
|
||||
const client = new GoogleGeminiClient({
|
||||
e: {},
|
||||
userId: 'test',
|
||||
key: '',
|
||||
model: 'gemini-pro'
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue