mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 12:20:34 +00:00
oenapi doc (#493)
* mongo init * perf: mongo connect * docs * fix: select file * format * remove seed * doc format * doc * perf: tts model type * doc * upload time * doc * doc * doc
This commit is contained in:
@@ -10,8 +10,7 @@ export async function text2Speech({
|
||||
input,
|
||||
model = defaultAudioSpeechModels[0].model,
|
||||
voice,
|
||||
speed = 1,
|
||||
props
|
||||
speed = 1
|
||||
}: {
|
||||
res: NextApiResponse;
|
||||
onSuccess: (e: { model: string; buffer: Buffer }) => void;
|
||||
@@ -20,9 +19,8 @@ export async function text2Speech({
|
||||
model: string;
|
||||
voice: string;
|
||||
speed?: number;
|
||||
props?: UserModelSchema['openaiAccount'];
|
||||
}) {
|
||||
const ai = getAIApi(props);
|
||||
const ai = getAIApi();
|
||||
const response = await ai.audio.speech.create({
|
||||
model,
|
||||
// @ts-ignore
|
||||
|
@@ -7,7 +7,10 @@ import {
|
||||
} from '@fastgpt/global/support/user/team/constant';
|
||||
import { DatasetCollectionName } from '../schema';
|
||||
import { DatasetColCollectionName } from '../collection/schema';
|
||||
import { DatasetDataIndexTypeMap } from '@fastgpt/global/core/dataset/constant';
|
||||
import {
|
||||
DatasetDataIndexTypeEnum,
|
||||
DatasetDataIndexTypeMap
|
||||
} from '@fastgpt/global/core/dataset/constant';
|
||||
|
||||
export const DatasetDataCollectionName = 'dataset.datas';
|
||||
|
||||
@@ -50,7 +53,7 @@ const DatasetDataSchema = new Schema({
|
||||
type: {
|
||||
type: String,
|
||||
enum: Object.keys(DatasetDataIndexTypeMap),
|
||||
required: true
|
||||
default: DatasetDataIndexTypeEnum.custom
|
||||
},
|
||||
dataId: {
|
||||
type: String,
|
||||
|
Reference in New Issue
Block a user