Skip to content

Commit 9d08573

Browse files
committed
yolo
1 parent 5a86b0f commit 9d08573

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

chatlab/registry.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,13 @@ def api_manifest(self, function_call_option: FunctionCall = "auto") -> APIManife
436436

437437
@property
438438
def tools(self) -> Iterable[ChatCompletionToolParam]:
439-
return [{"type": "function", "function": adapt_function_definition(f)} for f in self.__schemas.values()]
439+
return [
440+
ChatCompletionToolParam(
441+
type="function",
442+
function=adapt_function_definition(f), # type: ignore
443+
)
444+
for f in self.__schemas.values()
445+
]
440446

441447
async def call(self, name: str, arguments: Optional[str] = None) -> Any:
442448
"""Call a function by name with the given parameters."""

0 commit comments

Comments
 (0)