Find answers from the community

Updated 3 months ago

Hello, I'm trying to use Llama-Index

Hello, I'm trying to use Llama-Index with tool call. I'm wondering is it possible to annotate the parameter in the function with some description?
like:
Plain Text
def get_temperature(location: Annotated[str, "The location"]) -> Annotated[float, "Degree"]:
    pass
L
1 comment
You can use Field from pydantic

Plain Text
from pydantic.v1 import Field

def get_temperature(location: str = Field(description="a location.") -> str


I don't think it works for return types though. I would put the return type description in the overall function description
Add a reply
Sign up and join the conversation on Discord