mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-08-29 02:36:11 -06:00
feat: speech to text default true
This commit is contained in:
parent
c5121ac063
commit
edb1dcf41f
@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE `OpenaiSetting` MODIFY COLUMN `speechToText` BOOLEAN NULL DEFAULT true;
|
||||
|
||||
-- Update existing records to use the new default
|
||||
UPDATE `OpenaiSetting` SET `speechToText` = true WHERE `speechToText` IS NULL OR `speechToText` = false;
|
@ -469,7 +469,7 @@ model OpenaiSetting {
|
||||
ignoreJids Json?
|
||||
splitMessages Boolean? @default(false)
|
||||
timePerChar Int? @default(50) @db.Int
|
||||
speechToText Boolean? @default(false)
|
||||
speechToText Boolean? @default(true)
|
||||
createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp
|
||||
updatedAt DateTime @updatedAt @db.Timestamp
|
||||
OpenaiCreds OpenaiCreds? @relation(fields: [openaiCredsId], references: [id])
|
||||
|
@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "OpenaiSetting" ALTER COLUMN "speechToText" SET DEFAULT true;
|
||||
|
||||
-- Update existing records to use the new default
|
||||
UPDATE "OpenaiSetting" SET "speechToText" = true WHERE "speechToText" IS NULL OR "speechToText" = false;
|
@ -476,7 +476,7 @@ model OpenaiSetting {
|
||||
ignoreJids Json?
|
||||
splitMessages Boolean? @default(false) @db.Boolean
|
||||
timePerChar Int? @default(50) @db.Integer
|
||||
speechToText Boolean? @default(false) @db.Boolean
|
||||
speechToText Boolean? @default(true) @db.Boolean
|
||||
createdAt DateTime? @default(now()) @db.Timestamp
|
||||
updatedAt DateTime @updatedAt @db.Timestamp
|
||||
OpenaiCreds OpenaiCreds? @relation(fields: [openaiCredsId], references: [id])
|
||||
|
@ -184,7 +184,7 @@ export class OpenaiController extends BaseChatbotController<OpenaiBot, OpenaiDto
|
||||
keepOpen: data.keepOpen !== undefined ? data.keepOpen : false,
|
||||
debounceTime: data.debounceTime || 1,
|
||||
ignoreJids: data.ignoreJids || [],
|
||||
speechToText: false,
|
||||
speechToText: true,
|
||||
});
|
||||
} else if (!existingSettings.openaiCredsId && data.openaiCredsId) {
|
||||
// Update settings with OpenAI credentials if they're missing
|
||||
|
Loading…
Reference in New Issue
Block a user