{"id":14964890,"url":"https://github.com/yomorun/llm-function-calling-examples","last_synced_at":"2025-10-25T10:30:39.624Z","repository":{"id":250851767,"uuid":"835658085","full_name":"yomorun/llm-function-calling-examples","owner":"yomorun","description":"Strongly-typed LLM Function Calling examples, run on OpenAI, Ollama, Mistral and others.","archived":false,"fork":false,"pushed_at":"2024-12-31T13:35:48.000Z","size":39,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-04T01:25:08.450Z","etag":null,"topics":["function-calling","llm","ollama","openai","yomo"],"latest_commit_sha":null,"homepage":"https://yomo.run","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yomorun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-30T09:22:31.000Z","updated_at":"2024-12-31T13:35:51.000Z","dependencies_parsed_at":"2024-08-07T12:59:17.450Z","dependency_job_id":"1cb6474a-ead1-4b90-9ae7-c73dd2468fea","html_url":"https://github.com/yomorun/llm-function-calling-examples","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"9797915f24ef3dddfc0d31499e5cdaab16ca9fe8"},"previous_names":["yomorun/llm-function-calling-examples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomorun%2Fllm-function-calling-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomorun%2Fllm-function-calling-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomorun%2Fllm-function-calling-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yomorun%2Fllm-function-calling-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yomorun","download_url":"https://codeload.github.com/yomorun/llm-function-calling-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238120374,"owners_count":19419761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["function-calling","llm","ollama","openai","yomo"],"created_at":"2024-09-24T13:33:54.467Z","updated_at":"2025-10-25T10:30:39.619Z","avatar_url":"https://github.com/yomorun.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 YoMo LLM Function Calling Examples\n\n**Build powerful AI agents with the best open-source serverless function calling framework.**\n\nThis repository showcases real-world examples of LLM Function Calling using [YoMo](https://github.com/yomorun/yomo) - the fastest, most developer-friendly way to create serverless functions that your AI agents can call.\n\n## Why YoMo for AI Agent Development?\n\n### 🎯 **Built for AI Agents**\n- **Type-Safe Development**: Write functions in TypeScript or Go with full type safety\n- **LLM-Ready**: Functions automatically generate JSON schemas for seamless LLM integration\n- **Real-Time Performance**: Ultra-low latency for responsive AI interactions\n\n### 🔄 **Write Once, Run Anywhere**\n- **Multi-Model Support**: Works with OpenAI, Claude, Llama, Mistral, Azure OpenAI, and more\n- **Provider Flexibility**: Switch between LLM providers without changing your functions\n- **No Vendor Lock-in**: Deploy on any cloud or self-host\n\n### ⚡ **Developer Experience**\n```bash\n# Install YoMo CLI\ncurl -fsSL https://get.yomo.run | sh\n\n# Run any example\ncd node-tool-get-weather\nyomo run -n get-weather\n```\n\n### 🌍 **Production Ready**\n- **Geo-Distributed**: Deploy globally for low latency worldwide\n- **Auto-Scaling**: Handle any load automatically  \n- **Self-Hosting**: Full control over your infrastructure\n\n## Quick Start\n\n**Try it in 2 minutes:**\n\n1. **Clone and run an example:**\n```bash\ngit clone https://github.com/yomorun/llm-function-calling-examples.git\ncd llm-function-calling-examples/node-tool-get-weather\nyomo run -n get-weather\n```\n\n2. **Test with your LLM:**\n\nYou can grab a free account on [vivgrid.com](https://console.vivgrid.com) to build your AI Agent:\n\n```bash\ncurl https://api.vivgrid.com/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer \u003cyour-vivgrid.com-token\u003e\" \\\n  -d '{\n    \"messages\": [{\"role\": \"user\", \"content\": \"What's the weather in Tokyo?\"}]\n  }'\n```\n\nThat's it! Your AI agent now has weather capabilities.\n\n## 📚 Function Examples\n\nExplore real-world serverless functions organized by category:\n\n### 🌦️ **Weather \u0026 Location**\n| Function | Language | Description |\n|----------|----------|-------------|\n| [node-tool-get-weather](./node-tool-get-weather) | TypeScript | Get weather by city using OpenWeatherMap API |\n| [node-tool-get-weather-google-api](./node-tool-get-weather-google-api) | TypeScript | Get weather using Google Weather API |\n| [golang-tool-get-weather](./golang-tool-get-weather) | Go | Weather information with geo-coordinates |\n| [node-tool-get-utc-time](./node-tool-get-utc-time) | TypeScript | Get UTC time by city name |\n| [golang-tool-get-utc-time](./golang-tool-get-utc-time) | Go | UTC time lookup |\n| [golang-tool-timezone-calculator](./golang-tool-timezone-calculator) | Go | Calculate timezone for specific time |\n\n### 💰 **Financial \u0026 Data**\n| Function | Language | Description |\n|----------|----------|-------------|\n| [node-tool-currency-converter](./node-tool-currency-converter) | TypeScript | Real-time currency conversion |\n| [golang-tool-currency-converter](./golang-tool-currency-converter) | Go | Currency calculator with live rates |\n\n### 🔍 **Web Search \u0026 Network**\n| Function | Language | Description |\n|----------|----------|-------------|\n| [node-tool-exa-web-search](./node-tool-exa-web-search) | TypeScript | Search using [Exa](https://exa.ai) |\n| [node-tool-google-web-search](./node-tool-google-web-search) | TypeScript | Search using Google Custom Search |\n| [node-tool-tavily-web-search](./node-tool-tavily-web-search) | TypeScript | Web search via [Tavily](https://tavily.com/) |\n| [node-tool-duckduckgo-web-search](./node-tool-duckduckgo-web-search) | TypeScript | Privacy-focused DuckDuckGo search |\n| [node-tool-get-ip-and-latency](./node-tool-get-ip-and-latency) | TypeScript | Get IP and latency for websites |\n| [golang-tool-get-ip-and-latency](./golang-tool-get-ip-and-latency) | Go | Network diagnostics with ping |\n\n### 📧 **Communication**\n| Function | Language | Description |\n|----------|----------|-------------|\n| [node-tool-send-mail-smtp](./node-tool-send-mail-smtp) | TypeScript | Send email via SMTP with nodemailer |\n| [node-tool-send-mail-resend](./node-tool-send-mail-resend) | TypeScript | Modern email via [Resend](https://resend.com/) API |\n| [golang-tool-send-mail-smtp](./golang-tool-send-mail-smtp) | Go | Email sending with Go SMTP |\n| [golang-tool-send-mail-resend](./golang-tool-send-mail-resend) | Go | Resend integration for Go |\n\n### 🗄️ **Database**\n| Function | Language | Description |\n|----------|----------|-------------|\n| [node-tool-postgres-db](./node-tool-postgres-db) | TypeScript | PostgreSQL database operations |\n\n## 💡 How It Works\n\nEach example demonstrates the YoMo pattern:\n\n**TypeScript Functions:**\n```typescript\n// 1. Define what your function does\nexport const description = 'Get current weather for a city'\n\n// 2. Define typed arguments\nexport type Argument = {\n  city: string\n  latitude: number\n  longitude: number\n}\n\n// 3. Implement your logic\nexport async function handler(args: Argument) {\n  // Your AI agent logic here\n  return weatherData\n}\n```\n\n**Go Functions:**\n```go\n// 1. Describe the function\nfunc Description() string {\n  return \"Get current weather for a city\"\n}\n\n// 2. Define schema\ntype LLMArguments struct {\n  City      string  `json:\"city\"`\n  Latitude  float64 `json:\"latitude\"`\n  Longitude float64 `json:\"longitude\"`  \n}\n\n// 3. Handle requests\nfunc Handler(ctx serverless.Context) {\n  // Your AI agent logic here\n}\n```\n\n## 🚀 Next Steps\n\n### 🏗️ **Build Your Own Function**\n```bash\n# Create new function from template\nyomo init my-awesome-function\n\n# Run locally\nyomo run\n```\n\n### 🌐 **Deploy Anywhere**\n\n**☁️ Managed Cloud**: Use [VivGrid](https://console.vivgrid.com/) for instant deployment with global edge locations.\n\n**🏠 Self-Host**: Deploy on your own infrastructure:\n- [Self-Hosting Guide](https://yomo.run/docs/self-hosting) - Full control over your deployment\n- [Geo-distributed Setup](https://yomo.run/docs/glossary) - Multi-region for global performance\n- Kubernetes, Docker, or bare metal support\n\n### 📖 **Resources**\n- **[YoMo Documentation](https://yomo.run/docs)** - Complete guides and API reference\n- **[LLM Providers](https://yomo.run/docs/llm-providers)** - Integrate with any LLM\n- **[GitHub](https://github.com/yomorun/yomo)** - Star us and contribute!\n\n---\n\n**Ready to build the future of AI agents?** Start with YoMo today! 🎉\n\n[![GitHub stars](https://img.shields.io/github/stars/yomorun/yomo?style=social)](https://github.com/yomorun/yomo)\n[![Documentation](https://img.shields.io/badge/docs-yomo.run-blue)](https://yomo.run/docs)\n[![Discord](https://img.shields.io/discord/770589787404640267?label=discord\u0026logo=discord)](https://discord.gg/CTH3wv9)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyomorun%2Fllm-function-calling-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyomorun%2Fllm-function-calling-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyomorun%2Fllm-function-calling-examples/lists"}