Support elevenlabs 2.5 (#336)

* update elevenlab model

* wip

* wip

* wip
This commit is contained in:
Hoan Luu Huu authored and GitHub committed 2024-07-24 13:04:12 -04:00
1 parent 48e1a72ef3
commit b921cab867
2 files changed
+4 -2

No files matched your search

+3 -2
View File
@@ -23,10 +23,11 @@ class SpeechCredential extends Model {
static async getSpeechCredentialsByVendorAndLabel(service_provider_sid, account_sid, vendor, label) {
let sql;
if (account_sid) {
sql = `SELECT * FROM speech_credentials WHERE account_sid = ? AND vendor = ? ${label ? 'AND label = ?' : ''}`;
sql = `SELECT * FROM speech_credentials WHERE account_sid = ? AND vendor = ?
AND label ${label ? '= ?' : 'is NULL'}`;
} else {
sql = `SELECT * FROM speech_credentials WHERE service_provider_sid = ? AND vendor = ?
${label ? 'AND label = ?' : ''}`;
AND label ${label ? '= ?' : 'is NULL'}`;
}
const [rows] = await promisePool.query(sql, [account_sid ? account_sid : service_provider_sid, vendor, label]);
return rows;