- Components: components can have a TemplateRepresentation object that contains tools.
- Context: depending on the context, the components in that context can be used as sources of additional tools in the exact same way they would if they were the current action.
ModelOptions.TOOLS: model options can include a tools parameter. The preferred way of passing these tools is as a list of function objects.
- Tools from the current component will always be included
- Tools from the context will be included if there are no name conflicts. A given context can decide what tools to surface, but in most cases, tools from the most recent component in the context will take priority over tools from older requests.
- Tools from
ModelOptions.TOOLSwill only be added if they do not conflict with any of the above functions.
Table object in richdocument.py.
Here’s an example of adding a tool through model options. This can be useful when you want to add a tool like web search that should almost always be available: