02-tools

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 4 Imported by: 0

README

Example 02: Tools

Agent with a get_weather tool the model can call.

Run

From the repo root:

OPENAI_API_KEY="sk-..." go run ./examples/02-tools/main.go

Requires a valid OpenAI API key.

Documentation

Overview

Example 02: Tools — agent with a custom tool the model can call.

From the repo root:

OPENAI_API_KEY="sk-..." go run ./examples/02-tools/main.go

Or copy into a new module:

mkdir my-agent && cd my-agent && go mod init my-agent
cp main.go . && go get github.com/chinudotdev/pith-sdk@latest
OPENAI_API_KEY="sk-..." go run main.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL