Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,794 changes: 1,794 additions & 0 deletions docs/colab_notebooks/5-multistep-toolcalling/multistep-toolcalling.ipynb

Large diffs are not rendered by default.

125 changes: 125 additions & 0 deletions docs/colab_notebooks/5-multistep-toolcalling/tools/analytics.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"database": "analytics",
"description": "Website analytics data for tracking visitor behavior and engagement.",
"data_schema": {
"columns": ["date_of_visit", "visitor_id", "page_views", "session_duration_seconds", "traffic_source", "user_engaged"],
"enums": {
"traffic_source": ["direct", "referral", "search engine", "social media"]
}
},
"tools": [
{
"type": "function",
"name": "analytics_get_visitor_information_by_id",
"description": "Returns the analytics data for a given visitor ID.",
"database": "analytics",
"operation_type": "read",
"parameters": {
"type": "object",
"properties": {
"visitor_id": {"type": "string", "description": "ID of the visitor"}
},
"required": ["visitor_id"],
"additionalProperties": false
},
"strict": false
},
{
"type": "function",
"name": "analytics_create_plot",
"description": "Plots the analytics data for a given time range and value.",
"database": "analytics",
"operation_type": "create",
"parameters": {
"type": "object",
"properties": {
"time_min": {"type": "string", "description": "Start date of the time range. Date format is YYYY-MM-DD"},
"time_max": {"type": "string", "description": "End date of the time range. Date format is YYYY-MM-DD"},
"value_to_plot": {
"type": "string",
"description": "Value to plot. Available values are: 'total_visits', 'session_duration_seconds', 'user_engaged', 'visits_direct', 'visits_referral', 'visits_search_engine', 'visits_social_media'"
},
"plot_type": {
"type": "string",
"description": "Type of plot. Can be 'bar', 'line', 'scatter' or 'histogram'"
}
},
"required": ["time_min", "time_max", "value_to_plot", "plot_type"],
"additionalProperties": false
},
"strict": false
},
{
"type": "function",
"name": "analytics_total_visits_count",
"description": "Returns the total number of visits within a specified time range.",
"database": "analytics",
"operation_type": "read",
"parameters": {
"type": "object",
"properties": {
"time_min": {"type": "string", "description": "Start date of the time range. Date format is YYYY-MM-DD"},
"time_max": {"type": "string", "description": "End date of the time range. Date format is YYYY-MM-DD"}
},
"required": [],
"additionalProperties": false
},
"strict": false
},
{
"type": "function",
"name": "analytics_engaged_users_count",
"description": "Returns the number of engaged users within a specified time range.",
"database": "analytics",
"operation_type": "read",
"parameters": {
"type": "object",
"properties": {
"time_min": {"type": "string", "description": "Start date of the time range. Date format is YYYY-MM-DD"},
"time_max": {"type": "string", "description": "End date of the time range. Date format is YYYY-MM-DD"}
},
"required": [],
"additionalProperties": false
},
"strict": false
},
{
"type": "function",
"name": "analytics_traffic_source_count",
"description": "Returns the number of visits from a specific traffic source within a specified time range.",
"database": "analytics",
"operation_type": "read",
"parameters": {
"type": "object",
"properties": {
"time_min": {"type": "string", "description": "Start date of the time range. Date format is YYYY-MM-DD"},
"time_max": {"type": "string", "description": "End date of the time range. Date format is YYYY-MM-DD"},
"traffic_source": {
"type": "string",
"description": "Traffic source to filter the visits. Available values are: 'direct', 'referral', 'search engine', 'social media'"
}
},
"required": [],
"additionalProperties": false
},
"strict": false
},
{
"type": "function",
"name": "analytics_get_average_session_duration",
"description": "Returns the average session duration within a specified time range.",
"database": "analytics",
"operation_type": "read",
"parameters": {
"type": "object",
"properties": {
"time_min": {"type": "string", "description": "Start date of the time range. Date format is YYYY-MM-DD"},
"time_max": {"type": "string", "description": "End date of the time range. Date format is YYYY-MM-DD"}
},
"required": [],
"additionalProperties": false
},
"strict": false
}
]
}
117 changes: 117 additions & 0 deletions docs/colab_notebooks/5-multistep-toolcalling/tools/calendar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"database": "calendar",
"description": "Calendar for managing meetings and events.",
"data_schema": {
"columns": ["event_id", "event_name", "participant_email", "event_start", "duration"]
},
"tools": [
{
"type": "function",
"name": "calendar_get_event_information_by_id",
"description": "Returns the event for a given ID.",
"database": "calendar",
"operation_type": "read",
"parameters": {
"type": "object",
"properties": {
"event_id": {"type": "string", "description": "8-digit ID of the event"},
"field": {
"type": "string",
"description": "Field to return. Available fields are: 'event_id', 'event_name', 'participant_email', 'event_start', 'duration'"
}
},
"required": ["event_id", "field"],
"additionalProperties": false
},
"strict": false
},
{
"type": "function",
"name": "calendar_search_events",
"description": "Returns the events for a given query with pagination support.",
"database": "calendar",
"operation_type": "read",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Query to search for. Terms will be matched in the event_name and participant_email fields"
},
"time_min": {
"type": "string",
"description": "Lower bound (inclusive) for an event's end time to filter by. Format: YYYY-MM-DD HH:MM:SS"
},
"time_max": {
"type": "string",
"description": "Upper bound (inclusive) for an event's start time to filter by. Format: YYYY-MM-DD HH:MM:SS"
},
"page": {"type": "integer", "description": "Page number of results to return"},
"page_size": {"type": "integer", "description": "Number of events per page"}
},
"required": [],
"additionalProperties": false
},
"strict": false
},
{
"type": "function",
"name": "calendar_create_event",
"description": "Creates a new event.",
"database": "calendar",
"operation_type": "create",
"parameters": {
"type": "object",
"properties": {
"event_name": {"type": "string", "description": "Name of the event"},
"participant_email": {"type": "string", "description": "Email of the participant"},
"event_start": {
"type": "string",
"description": "Start time of the event. Format: YYYY-MM-DD HH:MM:SS"
},
"duration": {"type": "string", "description": "Duration of the event in minutes"}
},
"required": ["event_name", "participant_email", "event_start", "duration"],
"additionalProperties": false
},
"strict": false
},
{
"type": "function",
"name": "calendar_delete_event",
"description": "Deletes an event.",
"database": "calendar",
"operation_type": "delete",
"parameters": {
"type": "object",
"properties": {
"event_id": {"type": "string", "description": "8-digit ID of the event"}
},
"required": ["event_id"],
"additionalProperties": false
},
"strict": false
},
{
"type": "function",
"name": "calendar_update_event",
"description": "Updates an event.",
"database": "calendar",
"operation_type": "update",
"parameters": {
"type": "object",
"properties": {
"event_id": {"type": "string", "description": "8-digit ID of the event"},
"field": {
"type": "string",
"description": "Field to update. Available fields are: 'event_name', 'participant_email', 'event_start', 'duration'"
},
"new_value": {"type": "string", "description": "New value for the field"}
},
"required": ["event_id", "field", "new_value"],
"additionalProperties": false
},
"strict": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"database": "company_directory",
"description": "Employee directory for looking up email addresses by name.",
"data_schema": {
"columns": ["email_address"]
},
"tools": [
{
"type": "function",
"name": "company_directory_find_email_address",
"description": "Finds all email addresses containing the given name (case-insensitive search).",
"database": "company_directory",
"operation_type": "read",
"parameters": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name or partial name to search for in email addresses"
}
},
"required": [],
"additionalProperties": false
},
"strict": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"database": "customer_relationship_manager",
"description": "CRM for managing customer records and sales pipeline.",
"data_schema": {
"columns": ["customer_id", "customer_name", "customer_email", "customer_phone", "last_contact_date", "product_interest", "status", "assigned_to_email", "notes", "follow_up_by"],
"enums": {
"status": ["Qualified", "Won", "Lost", "Lead", "Proposal"],
"product_interest": ["Software", "Hardware", "Services", "Consulting", "Training"]
}
},
"tools": [
{
"type": "function",
"name": "customer_relationship_manager_search_customers",
"description": "Searches for customers based on the given parameters with pagination support.",
"database": "customer_relationship_manager",
"operation_type": "read",
"parameters": {
"type": "object",
"properties": {
"customer_name": {"type": "string", "description": "Name of the customer"},
"customer_email": {"type": "string", "description": "Email address of the customer"},
"product_interest": {"type": "string", "description": "Product interest of the customer"},
"status": {"type": "string", "description": "Current status of the customer"},
"assigned_to_email": {"type": "string", "description": "Email address of the person assigned to the customer"},
"last_contact_date_min": {"type": "string", "description": "Minimum last contact date. Format: YYYY-MM-DD"},
"last_contact_date_max": {"type": "string", "description": "Maximum last contact date. Format: YYYY-MM-DD"},
"follow_up_by_min": {"type": "string", "description": "Minimum follow up date. Format: YYYY-MM-DD"},
"follow_up_by_max": {"type": "string", "description": "Maximum follow up date. Format: YYYY-MM-DD"},
"page": {"type": "integer", "description": "Page number of results to return"},
"page_size": {"type": "integer", "description": "Number of customers per page"}
},
"required": [],
"additionalProperties": false
},
"strict": false
},
{
"type": "function",
"name": "customer_relationship_manager_update_customer",
"description": "Updates a customer record by ID.",
"database": "customer_relationship_manager",
"operation_type": "update",
"parameters": {
"type": "object",
"properties": {
"customer_id": {"type": "string", "description": "ID of the customer"},
"field": {
"type": "string",
"description": "Field to update. Available fields are: 'customer_name', 'assigned_to_email', 'customer_email', 'customer_phone', 'last_contact_date', 'product_interest', 'status', 'notes', 'follow_up_by'"
},
"new_value": {"type": "string", "description": "New value for the field"}
},
"required": ["customer_id", "field", "new_value"],
"additionalProperties": false
},
"strict": false
},
{
"type": "function",
"name": "customer_relationship_manager_add_customer",
"description": "Adds a new customer record.",
"database": "customer_relationship_manager",
"operation_type": "create",
"parameters": {
"type": "object",
"properties": {
"customer_name": {"type": "string", "description": "Name of the customer"},
"assigned_to_email": {"type": "string", "description": "Email address of the person assigned to the customer"},
"status": {
"type": "string",
"description": "Current status of the customer. One of: 'Qualified', 'Won', 'Lost', 'Lead', 'Proposal'"
},
"customer_email": {"type": "string", "description": "Email address of the customer"},
"customer_phone": {"type": "string", "description": "Phone number of the customer"},
"last_contact_date": {"type": "string", "description": "The last date the customer was contacted. Format: YYYY-MM-DD"},
"product_interest": {
"type": "string",
"description": "Product interest of the customer. One of: 'Software', 'Hardware', 'Services', 'Consulting', 'Training'"
},
"notes": {"type": "string", "description": "Notes about the customer"},
"follow_up_by": {"type": "string", "description": "Date for the next follow up. Format: YYYY-MM-DD"}
},
"required": ["customer_name", "assigned_to_email", "status"],
"additionalProperties": false
},
"strict": false
},
{
"type": "function",
"name": "customer_relationship_manager_delete_customer",
"description": "Deletes a customer record by ID.",
"database": "customer_relationship_manager",
"operation_type": "delete",
"parameters": {
"type": "object",
"properties": {
"customer_id": {"type": "string", "description": "ID of the customer"}
},
"required": ["customer_id"],
"additionalProperties": false
},
"strict": false
}
]
}
Loading
Loading