mirror of
				https://github.com/langgenius/dify.git
				synced 2025-10-31 19:03:09 +00:00 
			
		
		
		
	Co-authored-by: tech <cto@sb>
This commit is contained in:
		
							parent
							
								
									dbae5b0564
								
							
						
					
					
						commit
						2eae7503e1
					
				| @ -208,7 +208,7 @@ class AnnotationBatchImportApi(Resource): | |||||||
|         if len(request.files) > 1: |         if len(request.files) > 1: | ||||||
|             raise TooManyFilesError() |             raise TooManyFilesError() | ||||||
|         # check file type |         # check file type | ||||||
|         if not file.filename or not file.filename.endswith(".csv"): |         if not file.filename or not file.filename.lower().endswith(".csv"): | ||||||
|             raise ValueError("Invalid file type. Only CSV files are allowed") |             raise ValueError("Invalid file type. Only CSV files are allowed") | ||||||
|         return AppAnnotationService.batch_import_app_annotations(app_id, file) |         return AppAnnotationService.batch_import_app_annotations(app_id, file) | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -374,7 +374,7 @@ class DatasetDocumentSegmentBatchImportApi(Resource): | |||||||
|         if len(request.files) > 1: |         if len(request.files) > 1: | ||||||
|             raise TooManyFilesError() |             raise TooManyFilesError() | ||||||
|         # check file type |         # check file type | ||||||
|         if not file.filename or not file.filename.endswith(".csv"): |         if not file.filename or not file.filename.lower().endswith(".csv"): | ||||||
|             raise ValueError("Invalid file type. Only CSV files are allowed") |             raise ValueError("Invalid file type. Only CSV files are allowed") | ||||||
| 
 | 
 | ||||||
|         try: |         try: | ||||||
|  | |||||||
| @ -251,7 +251,7 @@ class OpsTraceManager: | |||||||
|             provider_config_map[tracing_provider]["trace_instance"], |             provider_config_map[tracing_provider]["trace_instance"], | ||||||
|             provider_config_map[tracing_provider]["config_class"], |             provider_config_map[tracing_provider]["config_class"], | ||||||
|         ) |         ) | ||||||
|         decrypt_trace_config_key = str(decrypt_trace_config) |         decrypt_trace_config_key = json.dumps(decrypt_trace_config, sort_keys=True) | ||||||
|         tracing_instance = cls.ops_trace_instances_cache.get(decrypt_trace_config_key) |         tracing_instance = cls.ops_trace_instances_cache.get(decrypt_trace_config_key) | ||||||
|         if tracing_instance is None: |         if tracing_instance is None: | ||||||
|             # create new tracing_instance and update the cache if it absent |             # create new tracing_instance and update the cache if it absent | ||||||
|  | |||||||
| @ -104,7 +104,7 @@ class QAIndexProcessor(BaseIndexProcessor): | |||||||
| 
 | 
 | ||||||
|     def format_by_template(self, file: FileStorage, **kwargs) -> list[Document]: |     def format_by_template(self, file: FileStorage, **kwargs) -> list[Document]: | ||||||
|         # check file type |         # check file type | ||||||
|         if not file.filename or not file.filename.endswith(".csv"): |         if not file.filename or not file.filename.lower().endswith(".csv"): | ||||||
|             raise ValueError("Invalid file type. Only CSV files are allowed") |             raise ValueError("Invalid file type. Only CSV files are allowed") | ||||||
| 
 | 
 | ||||||
|         try: |         try: | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 NeatGuyCoding
						NeatGuyCoding