Skip to content

Commit f8e5509

Browse files
committed
fix: lint + missed variable rename
1 parent 8481690 commit f8e5509

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

packages/optimization/src/ldai_optimization/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

packages/optimization/src/ldai_optimization/util.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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

8988
def create_evaluation_tool() -> ToolDefinition:

0 commit comments

Comments
 (0)