Skip to content

Commit

Permalink
Merge branch '0.6_dev' of github.com:OpenSPG/KAG into 0.6_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
caszkgui committed Dec 25, 2024
2 parents 63308ff + 80b152f commit 2ecb439
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kag/bridge/spg_server_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ def run_reader(self, config, input_data):
chunks = []
for data in scanner.generate(input_data):
chunks += reader.invoke(data)
return chunks
return [x.to_dict() for x in chunks]

def run_component(self, component_name, component_config, input_data):
if isinstance(component_config, str):
component_config = json.loads(component_config)

cls = getattr(interface, component_name)
instance = cls.from_config(component_config)
return instance.invoke(input_data)
return [x.to_dict() for x in instance.invoke(input_data)]

0 comments on commit 2ecb439

Please sign in to comment.