@@ -32,14 +32,14 @@ async def import_chatgpt(
3232 importer : ChatGPTImporterV2ExternalDep ,
3333 file : UploadFile ,
3434 project_id : str = Path (..., description = "Project external UUID" ),
35- folder : str = Form ("conversations" ),
35+ directory : str = Form ("conversations" ),
3636) -> ChatImportResult :
3737 """Import conversations from ChatGPT JSON export.
3838
3939 Args:
4040 project_id: Project external UUID from URL path
4141 file: The ChatGPT conversations.json file.
42- folder : The folder to place the files in.
42+ directory : The directory to place the files in.
4343 importer: ChatGPT importer instance.
4444
4545 Returns:
@@ -49,22 +49,22 @@ async def import_chatgpt(
4949 HTTPException: If import fails.
5050 """
5151 logger .info (f"V2 Importing ChatGPT conversations for project { project_id } " )
52- return await import_file (importer , file , folder )
52+ return await import_file (importer , file , directory )
5353
5454
5555@router .post ("/claude/conversations" , response_model = ChatImportResult )
5656async def import_claude_conversations (
5757 importer : ClaudeConversationsImporterV2ExternalDep ,
5858 file : UploadFile ,
5959 project_id : str = Path (..., description = "Project external UUID" ),
60- folder : str = Form ("conversations" ),
60+ directory : str = Form ("conversations" ),
6161) -> ChatImportResult :
6262 """Import conversations from Claude conversations.json export.
6363
6464 Args:
6565 project_id: Project external UUID from URL path
6666 file: The Claude conversations.json file.
67- folder : The folder to place the files in.
67+ directory : The directory to place the files in.
6868 importer: Claude conversations importer instance.
6969
7070 Returns:
@@ -74,22 +74,22 @@ async def import_claude_conversations(
7474 HTTPException: If import fails.
7575 """
7676 logger .info (f"V2 Importing Claude conversations for project { project_id } " )
77- return await import_file (importer , file , folder )
77+ return await import_file (importer , file , directory )
7878
7979
8080@router .post ("/claude/projects" , response_model = ProjectImportResult )
8181async def import_claude_projects (
8282 importer : ClaudeProjectsImporterV2ExternalDep ,
8383 file : UploadFile ,
8484 project_id : str = Path (..., description = "Project external UUID" ),
85- folder : str = Form ("projects" ),
85+ directory : str = Form ("projects" ),
8686) -> ProjectImportResult :
8787 """Import projects from Claude projects.json export.
8888
8989 Args:
9090 project_id: Project external UUID from URL path
9191 file: The Claude projects.json file.
92- folder : The base folder to place the files in.
92+ directory : The base directory to place the files in.
9393 importer: Claude projects importer instance.
9494
9595 Returns:
@@ -99,22 +99,22 @@ async def import_claude_projects(
9999 HTTPException: If import fails.
100100 """
101101 logger .info (f"V2 Importing Claude projects for project { project_id } " )
102- return await import_file (importer , file , folder )
102+ return await import_file (importer , file , directory )
103103
104104
105105@router .post ("/memory-json" , response_model = EntityImportResult )
106106async def import_memory_json (
107107 importer : MemoryJsonImporterV2ExternalDep ,
108108 file : UploadFile ,
109109 project_id : str = Path (..., description = "Project external UUID" ),
110- folder : str = Form ("conversations" ),
110+ directory : str = Form ("conversations" ),
111111) -> EntityImportResult :
112112 """Import entities and relations from a memory.json file.
113113
114114 Args:
115115 project_id: Project external UUID from URL path
116116 file: The memory.json file.
117- folder : Optional destination folder within the project.
117+ directory : Optional destination directory within the project.
118118 importer: Memory JSON importer instance.
119119
120120 Returns:
@@ -132,7 +132,7 @@ async def import_memory_json(
132132 json_data = json .loads (line )
133133 file_data .append (json_data )
134134
135- result = await importer .import_data (file_data , folder )
135+ result = await importer .import_data (file_data , directory )
136136 if not result .success : # pragma: no cover
137137 raise HTTPException (
138138 status_code = status .HTTP_500_INTERNAL_SERVER_ERROR ,
@@ -147,13 +147,13 @@ async def import_memory_json(
147147 return result
148148
149149
150- async def import_file (importer : Importer , file : UploadFile , destination_folder : str ):
150+ async def import_file (importer : Importer , file : UploadFile , destination_directory : str ):
151151 """Helper function to import a file using an importer instance.
152152
153153 Args:
154154 importer: The importer instance to use
155155 file: The file to import
156- destination_folder : Destination folder for imported content
156+ destination_directory : Destination directory for imported content
157157
158158 Returns:
159159 Import result from the importer
@@ -164,7 +164,7 @@ async def import_file(importer: Importer, file: UploadFile, destination_folder:
164164 try :
165165 # Process file
166166 json_data = json .load (file .file )
167- result = await importer .import_data (json_data , destination_folder )
167+ result = await importer .import_data (json_data , destination_directory )
168168 if not result .success : # pragma: no cover
169169 raise HTTPException (
170170 status_code = status .HTTP_500_INTERNAL_SERVER_ERROR ,
0 commit comments