Skip to content

yomorun/llm-function-calling-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ YoMo LLM Function Calling Examples

Build powerful AI agents with the best open-source serverless function calling framework.

This repository showcases real-world examples of LLM Function Calling using YoMo - the fastest, most developer-friendly way to create serverless functions that your AI agents can call.

Why YoMo for AI Agent Development?

🎯 Built for AI Agents

  • Type-Safe Development: Write functions in TypeScript or Go with full type safety
  • LLM-Ready: Functions automatically generate JSON schemas for seamless LLM integration
  • Real-Time Performance: Ultra-low latency for responsive AI interactions

πŸ”„ Write Once, Run Anywhere

  • Multi-Model Support: Works with OpenAI, Claude, Llama, Mistral, Azure OpenAI, and more
  • Provider Flexibility: Switch between LLM providers without changing your functions
  • No Vendor Lock-in: Deploy on any cloud or self-host

⚑ Developer Experience

# Install YoMo CLI
curl -fsSL https://get.yomo.run | sh

# Run any example
cd node-tool-get-weather
yomo run -n get-weather

🌍 Production Ready

  • Geo-Distributed: Deploy globally for low latency worldwide
  • Auto-Scaling: Handle any load automatically
  • Self-Hosting: Full control over your infrastructure

Quick Start

Try it in 2 minutes:

  1. Clone and run an example:
git clone https://github.com/yomorun/llm-function-calling-examples.git
cd llm-function-calling-examples/node-tool-get-weather
yomo run -n get-weather
  1. Test with your LLM:

You can grab a free account on vivgrid.com to build your AI Agent:

curl https://api.vivgrid.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-vivgrid.com-token>" \
  -d '{
    "model": "gpt-4o",  
    "messages": [{"role": "user", "content": "What's the weather in Tokyo?"}]
  }'

That's it! Your AI agent now has weather capabilities.

πŸ“š Function Examples

Explore real-world serverless functions organized by category:

🌦️ Weather & Location

Function Language Description
node-tool-get-weather TypeScript Get weather by city using OpenWeatherMap API
node-tool-get-weather-google-api TypeScript Get weather using Google Weather API
golang-tool-get-weather Go Weather information with geo-coordinates
node-tool-get-utc-time TypeScript Get UTC time by city name
golang-tool-get-utc-time Go UTC time lookup
golang-tool-timezone-calculator Go Calculate timezone for specific time

πŸ’° Financial & Data

Function Language Description
node-tool-currency-converter TypeScript Real-time currency conversion
golang-tool-currency-converter Go Currency calculator with live rates

πŸ” Web Search & Network

Function Language Description
node-tool-google-web-search TypeScript Search using Google Custom Search
node-tool-tavily-web-search TypeScript Web search via Tavily
node-tool-duckduckgo-web-search TypeScript Privacy-focused DuckDuckGo search
node-tool-get-ip-and-latency TypeScript Get IP and latency for websites
golang-tool-get-ip-and-latency Go Network diagnostics with ping

πŸ“§ Communication

Function Language Description
node-tool-send-mail-smtp TypeScript Send email via SMTP with nodemailer
node-tool-send-mail-resend TypeScript Modern email via Resend API
golang-tool-send-mail-smtp Go Email sending with Go SMTP
golang-tool-send-mail-resend Go Resend integration for Go

πŸ—„οΈ Database

Function Language Description
node-tool-postgres-db TypeScript PostgreSQL database operations

πŸ’‘ How It Works

Each example demonstrates the YoMo pattern:

TypeScript Functions:

// 1. Define what your function does
export const description = 'Get current weather for a city'

// 2. Define typed arguments
export type Argument = {
  city: string
  latitude: number
  longitude: number
}

// 3. Implement your logic
export async function handler(args: Argument) {
  // Your AI agent logic here
  return weatherData
}

Go Functions:

// 1. Describe the function
func Description() string {
  return "Get current weather for a city"
}

// 2. Define schema
type LLMArguments struct {
  City      string  `json:"city"`
  Latitude  float64 `json:"latitude"`
  Longitude float64 `json:"longitude"`  
}

// 3. Handle requests
func Handler(ctx serverless.Context) {
  // Your AI agent logic here
}

πŸš€ Next Steps

πŸ—οΈ Build Your Own Function

# Create new function from template
yomo init my-awesome-function

# Run locally
yomo run

🌐 Deploy Anywhere

☁️ Managed Cloud: Use VivGrid for instant deployment with global edge locations.

🏠 Self-Host: Deploy on your own infrastructure:

πŸ“– Resources


Ready to build the future of AI agents? Start with YoMo today! πŸŽ‰

GitHub stars Documentation Discord

About

Strongly-typed LLM Function Calling examples, run on OpenAI, Ollama, Mistral and others.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 7