Tutorial 3
Pydantic data classes are a blend of Python’s data classes with the validation power of Pydantic.
They offer a concise way to define data structures while ensuring that the data adheres to specified types and constraints.
{‘name’: ‘WeatherSearch’, ‘description’: ‘Call this with an airport code to get the weather at that airport’, ‘parameters’: {‘title’: ‘WeatherSearch’, ‘description’: ‘Call this with an airport code to get the weather at that airport’, ‘type’: ‘object’, ‘properties’: {‘airport_code’: {‘title’: ‘Airport Code’, ‘description’: ‘airport code to get weather for’, ‘type’: ‘string’}}, ‘required’: [‘airport_code’]}}
We can use this model bound to function in a chain as we normally would
Even better, we can pass a set of function and let the LLM decide which to use based on the question context.
Congratulations! You have completed this tutorial 👍
Next, you may want to go back to the lab’s website
Jan Kirenz