mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-24 04:10:15 +01:00
refactor: replace getCustomConfig with getAppConfig in STTService, TTSService, and related files
This commit is contained in:
parent
b0256510b5
commit
c82c47ab6a
6 changed files with 37 additions and 40 deletions
|
|
@ -1,5 +1,5 @@
|
|||
const { TTSProviders } = require('librechat-data-provider');
|
||||
const { getCustomConfig } = require('~/server/services/Config');
|
||||
const { getAppConfig } = require('~/server/services/Config');
|
||||
const { getProvider } = require('./TTSService');
|
||||
|
||||
/**
|
||||
|
|
@ -14,13 +14,13 @@ const { getProvider } = require('./TTSService');
|
|||
*/
|
||||
async function getVoices(req, res) {
|
||||
try {
|
||||
const customConfig = await getCustomConfig();
|
||||
const appConfig = await getAppConfig();
|
||||
|
||||
if (!customConfig || !customConfig?.speech?.tts) {
|
||||
if (!appConfig || !appConfig?.speech?.tts) {
|
||||
throw new Error('Configuration or TTS schema is missing');
|
||||
}
|
||||
|
||||
const ttsSchema = customConfig?.speech?.tts;
|
||||
const ttsSchema = appConfig?.speech?.tts;
|
||||
const provider = await getProvider(ttsSchema);
|
||||
let voices;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue