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
defcalculator(a: int, b: int) ->int:
"""Multiply two integers."""returna*bprint(calculator.to_string())
I am not sure why the last line is there, and I found it confusing:
Using this code as is won't run (AttributeError: 'function' object has no attribute 'to_string')
I found it unclear why some kind of conversion to string would be needed. It looks like the idea is that we can convert this code to a string object like Tool Name: calculator, Description: Multiply two integers., Arguments: a: int, b: int, Outputs: int but IMHO it lacks clarity.
The second example makes more sense, as it introduces the decorator, which (I guess) implements the to_string method.
The text was updated successfully, but these errors were encountered:
The to_string version is is the decorator and is need to give the model a notion about which tool does it have access to. Indeed without the decorator the to_string() can't work
In unit one, there is this sample code:
I am not sure why the last line is there, and I found it confusing:
AttributeError: 'function' object has no attribute 'to_string'
)Tool Name: calculator, Description: Multiply two integers., Arguments: a: int, b: int, Outputs: int
but IMHO it lacks clarity.The second example makes more sense, as it introduces the decorator, which (I guess) implements the to_string method.
The text was updated successfully, but these errors were encountered: