mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-04 19:49:09 +00:00
chore(fix): linkup citation mapping
This commit is contained in:
parent
cc4e02183b
commit
f956a39498
1 changed files with 13 additions and 2 deletions
|
@ -684,13 +684,24 @@ class ConnectorService:
|
||||||
# Extract results from Linkup response - access as attribute instead of using .get()
|
# Extract results from Linkup response - access as attribute instead of using .get()
|
||||||
linkup_results = response.results if hasattr(response, 'results') else []
|
linkup_results = response.results if hasattr(response, 'results') else []
|
||||||
|
|
||||||
|
# Only proceed if we have results
|
||||||
|
if not linkup_results:
|
||||||
|
return {
|
||||||
|
"id": 10,
|
||||||
|
"name": "Linkup Search",
|
||||||
|
"type": "LINKUP_API",
|
||||||
|
"sources": [],
|
||||||
|
}, []
|
||||||
|
|
||||||
# Process each result and create sources directly without deduplication
|
# Process each result and create sources directly without deduplication
|
||||||
sources_list = []
|
sources_list = []
|
||||||
documents = []
|
documents = []
|
||||||
|
|
||||||
for i, result in enumerate(linkup_results):
|
for i, result in enumerate(linkup_results):
|
||||||
# Fix for UI
|
# Only process results that have content
|
||||||
linkup_results[i]['document']['id'] = self.source_id_counter
|
if not hasattr(result, 'content') or not result.content:
|
||||||
|
continue
|
||||||
|
|
||||||
# Create a source entry
|
# Create a source entry
|
||||||
source = {
|
source = {
|
||||||
"id": self.source_id_counter,
|
"id": self.source_id_counter,
|
||||||
|
|
Loading…
Add table
Reference in a new issue