File tree Expand file tree Collapse file tree
packages/uipath-openai-agents/src/uipath_openai_agents/runtime Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ def serialize_output(output: Any) -> Any:
2424 elif hasattr (output , "to_dict" ):
2525 return serialize_output (output .to_dict ())
2626
27- # Handle dataclasses
28- elif dataclasses .is_dataclass (output ):
27+ # Handle dataclasses (but not dataclass types)
28+ elif dataclasses .is_dataclass (output ) and not isinstance ( output , type ) :
2929 return serialize_output (dataclasses .asdict (output ))
3030
3131 # Handle dictionaries
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ async def _run_agent(
255255
256256 async def _run_agent_streamed (
257257 self ,
258- agent_input : str | list ,
258+ agent_input : str | list [ Any ] ,
259259 options : UiPathExecuteOptions | UiPathStreamOptions | None ,
260260 stream_events : bool ,
261261 ) -> AsyncGenerator [UiPathRuntimeEvent | UiPathRuntimeResult , None ]:
@@ -460,7 +460,7 @@ def _convert_stream_event_to_runtime_event(
460460 # Filter out raw response events (too granular)
461461 return None
462462
463- def _prepare_agent_input (self , input : dict [str , Any ] | None ) -> str | list :
463+ def _prepare_agent_input (self , input : dict [str , Any ] | None ) -> str | list [ Any ] :
464464 """
465465 Prepare agent input from UiPath input dictionary.
466466
You can’t perform that action at this time.
0 commit comments