|
|
@@ -10,7 +10,7 @@ import { apiV3FormValidator } from '~/server/middlewares/apiv3-form-validator';
|
|
|
import type { ApiV3Response } from '~/server/routes/apiv3/interfaces/apiv3-response';
|
|
|
import loggerFactory from '~/utils/logger';
|
|
|
|
|
|
-import { type AiAssistant, AiAssistantShareScope, AiAssistantAccessScope } from '../../interfaces/ai-assistant';
|
|
|
+import { type IApiv3AiAssistantCreateParams, AiAssistantShareScope, AiAssistantAccessScope } from '../../interfaces/ai-assistant';
|
|
|
import { getOpenaiService } from '../services/openai';
|
|
|
|
|
|
import { certifyAiService } from './middlewares/certify-ai-service';
|
|
|
@@ -19,9 +19,7 @@ const logger = loggerFactory('growi:routes:apiv3:openai:create-ai-assistant');
|
|
|
|
|
|
type CreateAssistantFactory = (crowi: Crowi) => RequestHandler[];
|
|
|
|
|
|
-type ReqBody = Omit<AiAssistant, 'vectorStore' | 'owner'>
|
|
|
-
|
|
|
-type Req = Request<undefined, Response, ReqBody> & {
|
|
|
+type Req = Request<undefined, Response, IApiv3AiAssistantCreateParams> & {
|
|
|
user: IUserHasId,
|
|
|
}
|
|
|
|