Skip to content

Commit b304312

Browse files
committed
update chatglm api client
1 parent 3f1cc60 commit b304312

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/popup/sections/GeneralPart.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ export function GeneralPart({ config, updateConfig, setTabIndex }) {
301301
{isUsingChatGLMApiModel(config) && (
302302
<input
303303
type="password"
304-
style="width: 50%;"
305304
value={config.chatglmApiKey}
306305
placeholder={t('ChatGLM API Key')}
307306
onChange={(e) => {

src/services/apis/chatglm-api.mjs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { getUserConfig } from '../../config/index.mjs'
2-
import { getToken } from '../../utils/jwt-token-generator.mjs'
2+
// import { getToken } from '../../utils/jwt-token-generator.mjs'
33
import { generateAnswersWithChatgptApiCompat } from './openai-api.mjs'
44

55
/**
@@ -10,11 +10,5 @@ import { generateAnswersWithChatgptApiCompat } from './openai-api.mjs'
1010
export async function generateAnswersWithChatGLMApi(port, question, session) {
1111
const baseUrl = 'https://open.bigmodel.cn/api/paas/v4'
1212
const config = await getUserConfig()
13-
return generateAnswersWithChatgptApiCompat(
14-
baseUrl,
15-
port,
16-
question,
17-
session,
18-
getToken(config.chatglmApiKey),
19-
)
13+
return generateAnswersWithChatgptApiCompat(baseUrl, port, question, session, config.chatglmApiKey)
2014
}

0 commit comments

Comments
 (0)