fix: message id

This commit is contained in:
ikechan8370 2024-05-15 17:45:48 +08:00
parent 1f80758491
commit 72b6dcf54d

View file

@ -172,10 +172,10 @@ export class OfficialChatGPTClient {
]
async synthesis (opts = {}) {
const { messageId, conversationId } = opts
const { id, conversationId } = opts
let url = this._apiReverseUrl.replace('/conversation', '/synthesize')
let randomVoice = this.voices[Math.floor(Math.random() * this.voices.length)]
url = `${url}?message_id=${messageId}&conversation_id=${conversationId}?voice=${randomVoice}`
url = `${url}?message_id=${id}&conversation_id=${conversationId}?voice=${randomVoice}`
let res = await fetch(url, {
method: 'GET',
headers: {