mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
(feat:connector) provider metadata, separate fe nested display
This commit is contained in:
@@ -1022,7 +1022,8 @@ class PaginatedSources(Resource):
|
||||
"tokens": doc.get("tokens", ""),
|
||||
"retriever": doc.get("retriever", "classic"),
|
||||
"syncFrequency": doc.get("sync_frequency", ""),
|
||||
"isNested": bool(doc.get("directory_structure"))
|
||||
"isNested": bool(doc.get("directory_structure")),
|
||||
"type": doc.get("type", "file")
|
||||
}
|
||||
paginated_docs.append(doc_data)
|
||||
response = {
|
||||
@@ -1070,7 +1071,8 @@ class CombinedJson(Resource):
|
||||
"tokens": index.get("tokens", ""),
|
||||
"retriever": index.get("retriever", "classic"),
|
||||
"syncFrequency": index.get("sync_frequency", ""),
|
||||
"is_nested": bool(index.get("directory_structure"))
|
||||
"is_nested": bool(index.get("directory_structure")),
|
||||
"type": index.get("type", "file") # Add type field with default "file"
|
||||
}
|
||||
)
|
||||
except Exception as err:
|
||||
|
||||
@@ -981,8 +981,11 @@ def ingest_connector(
|
||||
"tokens": tokens,
|
||||
"retriever": retriever,
|
||||
"id": str(id),
|
||||
"type": source_type,
|
||||
"remote_data": json.dumps(api_source_config),
|
||||
"type": "connector",
|
||||
"remote_data": json.dumps({
|
||||
"provider": source_type,
|
||||
**api_source_config
|
||||
}),
|
||||
"directory_structure": json.dumps(directory_structure)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user