Shun Miyazawa 1 год назад
Родитель
Сommit
5da94007a3
1 измененных файлов с 11 добавлено и 11 удалено
  1. 11 11
      apps/app/src/features/openai/server/services/openai.ts

+ 11 - 11
apps/app/src/features/openai/server/services/openai.ts

@@ -571,6 +571,17 @@ class OpenaiService implements IOpenaiService {
     return aiAssistant;
   }
 
+  async updateAiAssistant(ownerId: string, aiAssistantId: string, data: AiAssistantUpdateData): Promise<AiAssistantDocument> {
+    const aiAssistant = await AiAssistantModel.findOne({ owner: ownerId, _id: aiAssistantId });
+    if (aiAssistant == null) {
+      throw new Error('AiAssistant document does not exist');
+    }
+
+    // Implement the logic to update AiAssistant
+
+    return aiAssistant;
+  }
+
   async getAccessibleAiAssistants(user: IUserHasId): Promise<AccessibleAiAssistants> {
     const userGroupIds = [
       ...(await UserGroupRelation.findAllUserGroupIdsRelatedToUser(user)),
@@ -607,17 +618,6 @@ class OpenaiService implements IOpenaiService {
     };
   }
 
-  async updateAiAssistant(ownerId: string, aiAssistantId: string, data: AiAssistantUpdateData): Promise<AiAssistantDocument> {
-    const aiAssistant = await AiAssistantModel.findOne({ owner: ownerId, _id: aiAssistantId });
-    if (aiAssistant == null) {
-      throw new Error('AiAssistant document does not exist');
-    }
-
-    // Implement the logic to update AiAssistant
-
-    return aiAssistant;
-  }
-
   async deleteAiAssistant(ownerId: string, aiAssistantId: string): Promise<AiAssistantDocument> {
     const aiAssistant = await AiAssistantModel.findOne({ owner: ownerId, _id: aiAssistantId });
     if (aiAssistant == null) {