Spaces:
Runtime error
Runtime error
| tools = [{ | |
| "type": "function", | |
| "function": { | |
| "name": "get_weather", | |
| "description": "Get current temperature for a given location using latitude and longitude coordinates.", | |
| "parameters": { | |
| "type": "object", | |
| "properties": { | |
| "latitude": { | |
| "type": "string", | |
| "description": "Latitude coordinate (e.g., '23.0225')" | |
| }, | |
| "longitude": { | |
| "type": "string", | |
| "description": "Longitude coordinate (e.g., '72.5714')" | |
| } | |
| }, | |
| "required": [ | |
| "latitude", | |
| "longitude" | |
| ], | |
| "additionalProperties": False | |
| } | |
| } | |
| }, | |
| { | |
| "type": "function", | |
| "function": { | |
| "name": "web_search", | |
| "description": "Go to web and take information regarding the user query. always return the up to date real time information.", | |
| "parameters": { | |
| "type": "object", | |
| "properties": { | |
| "query": { | |
| "type": "string", | |
| "description": "Search query for web search" | |
| } | |
| }, | |
| "required": [ | |
| "query" | |
| ], | |
| "additionalProperties": False | |
| } | |
| } | |
| }, | |
| { | |
| "type": "function", | |
| "function": { | |
| "name": "get_time_in_location", | |
| "description": "Get current time for a specific location or city.", | |
| "parameters": { | |
| "type": "object", | |
| "properties": { | |
| "location": { | |
| "type": "string", | |
| "description": "Location name (e.g., 'Gujarat', 'Mumbai', 'Paris', 'New York')" | |
| } | |
| }, | |
| "required": ["location"], | |
| "additionalProperties": False | |
| } | |
| } | |
| }, | |
| { | |
| "type": "function", | |
| "function": { | |
| "name": "analyze_image", | |
| "description": "Describe what is visible in an image - people, objects, animals, scenes, actions, and what is happening. Focus on content description rather than technical properties. Use this when users ask about what they see in an image or provide image URLs.", | |
| "parameters": { | |
| "type": "object", | |
| "properties": { | |
| "image_url": { | |
| "type": "string", | |
| "description": "URL of the image to analyze (supports common formats like JPG, PNG, etc.)" | |
| } | |
| }, | |
| "required": ["image_url"] | |
| } | |
| } | |
| }, | |
| { | |
| "type": "function", | |
| "function": { | |
| "name": "analyze_video", | |
| "description": "Use this when users ask about video content and provide YouTube URLs or just youtube video url. give the title, description, channel, and transcript of the video or if ask something than just give strightforward answer of that question", | |
| "parameters": { | |
| "type": "object", | |
| "properties": { | |
| "video_url": { | |
| "type": "string", | |
| "description": "YouTube URL of the video to analyze (e.g., https://www.youtube.com/watch?v=..., https://youtu.be/..., or https://www.youtube.com/shorts/...)" | |
| } | |
| }, | |
| "required": ["video_url"] | |
| } | |
| } | |
| }, | |
| { | |
| "type": "function", | |
| "function": { | |
| "name": "transcribe_audio", | |
| "description": "Transcribe audio content from an audio file URL. Extract spoken words and convert them to text. Use this when users provide audio files (.mp3, .wav, .m4a, etc.) or ask about audio content.", | |
| "parameters": { | |
| "type": "object", | |
| "properties": { | |
| "audio_url": { | |
| "type": "string", | |
| "description": "URL of the audio file to transcribe (supports common formats like MP3, WAV, M4A, etc.)" | |
| } | |
| }, | |
| "required": ["audio_url"] | |
| } | |
| } | |
| } | |
| ] | |