mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 21:28:59 +08:00
Remove vector stored in component output. (#3908)
### What problem does this PR solve? Close #3805 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
311a475b6f
commit
f54a8d7748
@ -383,6 +383,9 @@ class ComponentBase(ABC):
|
|||||||
"params": {}
|
"params": {}
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
out = json.loads(str(self._param)).get("output", {})
|
||||||
|
if isinstance(out, dict) and "vector" in out:
|
||||||
|
del out["vector"]
|
||||||
return """{{
|
return """{{
|
||||||
"component_name": "{}",
|
"component_name": "{}",
|
||||||
"params": {},
|
"params": {},
|
||||||
@ -390,7 +393,7 @@ class ComponentBase(ABC):
|
|||||||
"inputs": {}
|
"inputs": {}
|
||||||
}}""".format(self.component_name,
|
}}""".format(self.component_name,
|
||||||
self._param,
|
self._param,
|
||||||
json.dumps(json.loads(str(self._param)).get("output", {}), ensure_ascii=False),
|
json.dumps(out, ensure_ascii=False),
|
||||||
json.dumps(json.loads(str(self._param)).get("inputs", []), ensure_ascii=False)
|
json.dumps(json.loads(str(self._param)).get("inputs", []), ensure_ascii=False)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user