File tree Expand file tree Collapse file tree
packages/optimization/src/ldai_optimization Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ def _serialize_scores(
215215 """
216216 return {key : result .to_json () for key , result in judge_results .items ()}
217217
218- def _extract_agent_tools (self , parameters : Dict [str , Any ]) -> List [StructuredOutputTool ]:
218+ def _extract_agent_tools (self , parameters : Dict [str , Any ]) -> List [ToolDefinition ]:
219219 """
220220 Extract and normalise the tools list from agent parameters.
221221
Original file line number Diff line number Diff line change @@ -80,10 +80,9 @@ async def await_if_needed(
8080 :param result: Either a string or an awaitable that returns a string
8181 :return: The string result
8282 """
83- if inspect .iscoroutine (result ):
84- return await result
85- else :
83+ if isinstance (result , str ):
8684 return result
85+ return await result
8786
8887
8988def create_evaluation_tool () -> ToolDefinition :
You can’t perform that action at this time.
0 commit comments