mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 00:23:17 +00:00
(feat:connectors) type as connector:file
This commit is contained in:
@@ -173,7 +173,7 @@ class ConnectorSources(Resource):
|
|||||||
return make_response(jsonify({"success": False}), 401)
|
return make_response(jsonify({"success": False}), 401)
|
||||||
user = decoded_token.get("sub")
|
user = decoded_token.get("sub")
|
||||||
try:
|
try:
|
||||||
sources = sources_collection.find({"user": user, "type": "connector"}).sort("date", -1)
|
sources = sources_collection.find({"user": user, "type": {"$regex": "^connector:"}}).sort("date", -1)
|
||||||
connector_sources = []
|
connector_sources = []
|
||||||
for source in sources:
|
for source in sources:
|
||||||
connector_sources.append({
|
connector_sources.append({
|
||||||
|
|||||||
@@ -978,13 +978,13 @@ def ingest_connector(
|
|||||||
"tokens": tokens,
|
"tokens": tokens,
|
||||||
"retriever": retriever,
|
"retriever": retriever,
|
||||||
"id": str(id),
|
"id": str(id),
|
||||||
"type": "connector",
|
"type": "connector:file",
|
||||||
"remote_data": json.dumps({
|
"remote_data": json.dumps({
|
||||||
"provider": source_type,
|
"provider": source_type,
|
||||||
**api_source_config
|
**api_source_config
|
||||||
}),
|
}),
|
||||||
"directory_structure": json.dumps(directory_structure),
|
"directory_structure": json.dumps(directory_structure),
|
||||||
"sync_frequency": sync_frequency
|
"sync_frequency": sync_frequency
|
||||||
}
|
}
|
||||||
|
|
||||||
if operation_mode == "sync":
|
if operation_mode == "sync":
|
||||||
|
|||||||
Reference in New Issue
Block a user