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:
Archer
2023-11-20 13:43:33 +08:00
committed by GitHub
parent 0df5152202
commit b05dd0fde1
37 changed files with 883 additions and 663 deletions

View File

@@ -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

View File

@@ -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,