feat: content check

This commit is contained in:
archer
2023-05-21 22:12:02 +08:00
parent 98444fd04b
commit 51a5d450b7
15 changed files with 310 additions and 65 deletions

20
src/types/plugin.d.ts vendored
View File

@@ -1,10 +1,12 @@
import type { kbSchema } from './mongoSchema';
import { PluginTypeEnum } from '@/constants/plugin';
/* kb type */
export interface KbItemType extends kbSchema {
totalData: number;
tags: string;
}
export interface KbDataItemType {
id: string;
status: 'waiting' | 'ready';
@@ -13,3 +15,21 @@ export interface KbDataItemType {
kbId: string;
userId: string;
}
/* plugin */
export interface PluginConfig {
name: string;
desc: string;
url: string;
category: `${PluginTypeEnum}`;
uniPrice: 22; // 1k token
params: [
{
type: '';
}
];
}
export type TextPluginRequestParams = {
input: string;
};