visuddhinanda 1 rok temu
rodzic
commit
0875076fad
1 zmienionych plików z 41 dodań i 0 usunięć
  1. 41 0
      dashboard-v4/dashboard/src/components/api/ai.ts

+ 41 - 0
dashboard-v4/dashboard/src/components/api/ai.ts

@@ -1,3 +1,8 @@
+import { IStudio } from "../auth/Studio";
+import { IUser } from "../auth/User";
+
+export type TPrivacy = "private" | "public";
+
 export interface IKimiResponse {
   id: string;
   object: string;
@@ -34,3 +39,39 @@ export interface IAiTranslateResponse {
   message: string;
   data: IKimiResponse;
 }
+
+export interface IAiModel {
+  uid: string;
+  name: string;
+  description?: string | null;
+  url?: string | null;
+  model?: string;
+  key?: string;
+  privacy: TPrivacy;
+  owner: IStudio;
+  editor: IUser;
+  created_at: string;
+  updated_at: string;
+}
+
+export interface IAiModelRequest {
+  name: string;
+  description?: string | null;
+  url?: string | null;
+  model?: string;
+  key?: string;
+  privacy: TPrivacy;
+  studio_name?: string;
+}
+
+export interface IAiModelListResponse {
+  ok: boolean;
+  message: string;
+  data: { rows: IAiModel[]; total: number };
+}
+
+export interface IAiModelResponse {
+  ok: boolean;
+  message: string;
+  data: IAiModel;
+}