Tool/Function Calling
We have certain models that now support tool calling.
Overview
Supported Models
Model
Tools
Tool Choice
Quickstart Guide
Step 1: Define Your Tool Schema
tool_schema = {
"name": "get_weather",
"description": "Retrieve weather information for a given location and date.",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"},
"date": {"type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$"}
},
"required": ["location", "date"]
}
}Step 2: Example User Query
Using Parasail with OpenAI-Compatible REST Endpoint
Example Implementation
Expected Output
Using Parasail's vLLM Client
Example Implementation
Expected Output
Integrating Your Tool
Example Weather Service Implementation
Expected Service Output
Switching Between REST and vLLM
Last updated