From 8cb408fd08a5937ffe8d0f2bfe228663c4e613ec Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 4 Nov 2025 17:12:37 -0500 Subject: [PATCH] docs(readme,examples): add system prompt to simple example (#60) --- README.md | 6 +++++- examples/simple/main.go | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9b6de4060d90f8b41e3bea580d53360c2fb62c1b..e37aa8a21136c96703e44b1f9183eb69e2ccf285 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,11 @@ cuteDogTool := fantasy.NewAgentTool( ) // Equip your agent. -agent := fantasy.NewAgent(model, fantasy.WithTools(cuteDogTool)) +agent := fantasy.NewAgent( + model, + fantasy.WithSystemPrompt("You are a moderately helpful, dog-centric assistant."), + fantasy.WithTools(cuteDogTool), +) // Put that agent to work! const prompt = "Find all the cute dogs in Silver Lake, Los Angeles." diff --git a/examples/simple/main.go b/examples/simple/main.go index 67ffd64abf486ff4fbc49350ea7ee7ffed6624de..cc6b0f583b9dbaefe9c334138019263a30396445 100644 --- a/examples/simple/main.go +++ b/examples/simple/main.go @@ -47,7 +47,10 @@ func main() { cuteDogTool := fantasy.NewAgentTool("cute_dog_tool", "Provide up-to-date info on cute dogs.", fetchCuteDogInfo) // Equip your agent. - agent := fantasy.NewAgent(model, fantasy.WithTools(cuteDogTool)) + agent := fantasy.NewAgent(model, + fantasy.WithSystemPrompt("You are a moderately helpful, dog-centric assistant."), + fantasy.WithTools(cuteDogTool), + ) // Put that agent to work! const prompt = "Find all the cute dogs in Silver Lake, Los Angeles."