diff --git a/trustgraph-flow/trustgraph/agent/react/agent_manager.py b/trustgraph-flow/trustgraph/agent/react/agent_manager.py index 24282031..82e73555 100644 --- a/trustgraph-flow/trustgraph/agent/react/agent_manager.py +++ b/trustgraph-flow/trustgraph/agent/react/agent_manager.py @@ -261,7 +261,8 @@ class AgentManager: **act.arguments ) - resp = resp.strip() + if isinstance(resp, str): + resp = resp.strip() logger.info(f"resp: {resp}") diff --git a/trustgraph-flow/trustgraph/extract/kg/agent/extract.py b/trustgraph-flow/trustgraph/extract/kg/agent/extract.py index f26cf80f..af2679e2 100644 --- a/trustgraph-flow/trustgraph/extract/kg/agent/extract.py +++ b/trustgraph-flow/trustgraph/extract/kg/agent/extract.py @@ -146,7 +146,10 @@ class Processor(FlowProcessor): print("Done?", response.answer is not None, flush=True) if response.error is not None: - raise RuntimeError(response.error) + if response.error.message: + raise RuntimeError(str(response.error.message)) + else: + raise RuntimeError(str(response.error)) if response.answer is not None: return True