fix: 冲突的openai baseurl v1

This commit is contained in:
ikechan8370 2023-03-16 23:43:09 +08:00
parent b35a609b63
commit 01892b6ec2
3 changed files with 5 additions and 5 deletions

View file

@ -28,7 +28,7 @@ export async function createImage (prompt, n = 1, size = '512x512') {
}
const configuration = new Configuration({
apiKey: Config.apiKey,
basePath: basePath + '/v1'
basePath
})
const openai = new OpenAIApi(configuration)
if (Config.debug) {
@ -58,7 +58,7 @@ export async function imageVariation (imageUrl, n = 1, size = '512x512') {
}
const configuration = new Configuration({
apiKey: Config.apiKey,
basePath: basePath + '/v1'
basePath
})
const openai = new OpenAIApi(configuration)
if (Config.debug) {
@ -135,7 +135,7 @@ export async function editImage (originalImage, mask = [], prompt, num = 1, size
}
const configuration = new Configuration({
apiKey: Config.apiKey,
basePath: basePath + '/v1'
basePath
})
const openai = new OpenAIApi(configuration)
if (Config.debug) {