mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 22:07:10 +00:00
添加Azure配置支持,修复重复的配置项冲突
This commit is contained in:
parent
5028c2ea67
commit
57416dcd03
3 changed files with 27 additions and 2 deletions
|
|
@ -1935,7 +1935,7 @@ export class chatgpt extends plugin {
|
|||
let msg = conversation.messages
|
||||
let content = { role: 'user', content: prompt }
|
||||
msg.push(content)
|
||||
const client = new OpenAIClient(Config.azureUrl, new AzureKeyCredential(Config.apiKey))
|
||||
const client = new OpenAIClient(Config.azureUrl, new AzureKeyCredential(Config.azApiKey))
|
||||
const deploymentName = Config.azureDeploymentName
|
||||
const { choices } = await client.getChatCompletions(deploymentName, msg)
|
||||
let completion = choices[0].message;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue