You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f"Tool calling typically uses constrained generation, but you have specified a `format` in your generate call. NB: tool calling is superseded by format; we will NOT call tools for your request: {action}"
# invariant re: relationship between the model_options set of tools and the TemplateRepresentation set of tools
258
-
assertfn_namenotintools.keys(), (
259
-
f"Cannot add tool {fn_name} because that tool was already defined in the TemplateRepresentation for the action."
260
-
)
261
-
# type checking because ModelOptions is an untyped dict and the calling convention for tools isn't clearly documented at our abstraction boundaries.
262
-
asserttype(fn_name) isstr, (
263
-
"When providing a `ModelOption.TOOLS` parameter to `model_options`, always used the type Dict[str, Callable] where `str` is the function name and the callable is the function."
264
-
)
265
-
assertcallable(model_options_tools[fn_name]), (
266
-
"When providing a `ModelOption.TOOLS` parameter to `model_options`, always used the type Dict[str, Callable] where `str` is the function name and the callable is the function."
267
-
)
268
-
# Add the model_options tool to the existing set of tools.
0 commit comments