Skip to content

Commit 59a4dd3

Browse files
committed
fix docs
1 parent 871c3ea commit 59a4dd3

29 files changed

+54
-54
lines changed

src/content/docs/blades/agent-patterns/01-sequential-agents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func main() {
6969
writerAgent, err := blades.NewAgent(
7070
"WriterAgent",
7171
blades.WithModel(model),
72-
blades.WithInstructions("Draft a short paragraph on climate change."),
72+
blades.WithInstruction("Draft a short paragraph on climate change."),
7373
blades.WithOutputKey("draft"),
7474
)
7575
if err != nil {
@@ -78,7 +78,7 @@ func main() {
7878
reviewerAgent, err := blades.NewAgent(
7979
"ReviewerAgent",
8080
blades.WithModel(model),
81-
blades.WithInstructions(`Review the draft and suggest improvements.
81+
blades.WithInstruction(`Review the draft and suggest improvements.
8282
Draft: {{.draft}}`),
8383
)
8484
if err != nil {

src/content/docs/blades/agent-patterns/02-loop-agents.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ model := openai.NewModel(os.Getenv("OPENAI_MODEL"), openai.Config{
3939
writerAgent, err := blades.NewAgent(
4040
"WriterAgent",
4141
blades.WithModel(model),
42-
blades.WithInstructions(`Draft a short paragraph on climate change.
42+
blades.WithInstruction(`Draft a short paragraph on climate change.
4343
{{if .suggestions}}
4444
**Draft**
4545
{{.draft}}
@@ -53,7 +53,7 @@ writerAgent, err := blades.NewAgent(
5353
reviewerAgent, err := blades.NewAgent(
5454
"ReviewerAgent",
5555
blades.WithModel(model),
56-
blades.WithInstructions(`Review the draft and suggest improvements.
56+
blades.WithInstruction(`Review the draft and suggest improvements.
5757
If the draft is good, respond with "The draft is good".
5858
5959
**Draft**
@@ -120,7 +120,7 @@ func main() {
120120
writerAgent, err := blades.NewAgent(
121121
"WriterAgent",
122122
blades.WithModel(model),
123-
blades.WithInstructions(`Draft a short paragraph on climate change.
123+
blades.WithInstruction(`Draft a short paragraph on climate change.
124124
{{if .suggestions}}
125125
**Draft**
126126
{{.draft}}
@@ -137,7 +137,7 @@ func main() {
137137
reviewerAgent, err := blades.NewAgent(
138138
"ReviewerAgent",
139139
blades.WithModel(model),
140-
blades.WithInstructions(`Review the draft and suggest improvements.
140+
blades.WithInstruction(`Review the draft and suggest improvements.
141141
If the draft is good, respond with "The draft is good".
142142
143143
**Draft**

src/content/docs/blades/agent-patterns/03-parallel-agents.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Here we use an example to illustrate how to use **parallel Agents** in **Blades*
2626
editorAgent1, err := blades.NewAgent(
2727
"editorAgent1",
2828
blades.WithModel(model),
29-
blades.WithInstructions(`Edit the paragraph for grammar.
29+
blades.WithInstruction(`Edit the paragraph for grammar.
3030
**Paragraph:**
3131
{{.draft}}
3232
`),
@@ -35,7 +35,7 @@ editorAgent1, err := blades.NewAgent(
3535
editorAgent2, err := blades.NewAgent(
3636
"editorAgent1",
3737
blades.WithModel(model),
38-
blades.WithInstructions(`Edit the paragraph for style.
38+
blades.WithInstruction(`Edit the paragraph for style.
3939
**Paragraph:**
4040
{{.draft}}
4141
`),
@@ -91,7 +91,7 @@ func main() {
9191
editorAgent1, err := blades.NewAgent(
9292
"editorAgent1",
9393
blades.WithModel(model),
94-
blades.WithInstructions(`Edit the paragraph for grammar.
94+
blades.WithInstruction(`Edit the paragraph for grammar.
9595
**Paragraph:**
9696
{{.draft}}
9797
`),
@@ -103,7 +103,7 @@ func main() {
103103
editorAgent2, err := blades.NewAgent(
104104
"editorAgent1",
105105
blades.WithModel(model),
106-
blades.WithInstructions(`Edit the paragraph for style.
106+
blades.WithInstruction(`Edit the paragraph for style.
107107
**Paragraph:**
108108
{{.draft}}
109109
`),

src/content/docs/blades/agent-patterns/04-handoff-agents.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func main() {
5959
mathTutorAgent, err := blades.NewAgent(
6060
"MathTutor",
6161
blades.WithDescription("An agent that helps with math questions"),
62-
blades.WithInstructions("You are a helpful math tutor. Answer questions related to mathematics."),
62+
blades.WithInstruction("You are a helpful math tutor. Answer questions related to mathematics."),
6363
blades.WithModel(model),
6464
)
6565
if err != nil {
@@ -68,7 +68,7 @@ func main() {
6868
historyTutorAgent, err := blades.NewAgent(
6969
"HistoryTutor",
7070
blades.WithDescription("An agent that helps with history questions"),
71-
blades.WithInstructions("You are a helpful history tutor. Answer questions related to history."),
71+
blades.WithInstruction("You are a helpful history tutor. Answer questions related to history."),
7272
blades.WithModel(model),
7373
)
7474
if err != nil {
@@ -142,7 +142,7 @@ func NewRoutingWorkflow(routes map[string]string) (*RoutingWorkflow, error) {
142142
router, err := blades.NewAgent(
143143
"triage_agent",
144144
blades.WithModel(model),
145-
blades.WithInstructions("You determine which agent to use based on the user's homework question"),
145+
blades.WithInstruction("You determine which agent to use based on the user's homework question"),
146146
)
147147
if err != nil {
148148
return nil, err
@@ -152,7 +152,7 @@ func NewRoutingWorkflow(routes map[string]string) (*RoutingWorkflow, error) {
152152
agent, err := blades.NewAgent(
153153
name,
154154
blades.WithModel(model),
155-
blades.WithInstructions(instructions),
155+
blades.WithInstruction(instructions),
156156
)
157157
if err != nil {
158158
return nil, err

src/content/docs/blades/get-started/quick-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func main() {
3434
agent, err := blades.NewAgent(
3535
"Blades Agent",
3636
blades.WithModel(model),
37-
blades.WithInstructions("You are a helpful assistant that provides detailed and accurate information."),
37+
blades.WithInstruction("You are a helpful assistant that provides detailed and accurate information."),
3838
)
3939
if err != nil {
4040
log.Fatal(err)

src/content/docs/blades/get-started/run.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ NewAgent has two parameters, as follows:
1818
2. **`options`(Options, optional)**: Options used to configure the Agent instance. Supported configuration options include:
1919
- **`WithModel(model ModelProvider)`**: Set the model provider, such as OpenAI, Claude, and Gemini.
2020
- **`WithTools(tools ...tools.Tool)`**: Add available tools for the Agent
21-
- **`WithInstructions(instructions string)`**: Set the Agent's system instructions/role settings
21+
- **`WithInstruction(instructions string)`**: Set the Agent's system instructions/role settings
2222
- **`WithInputSchema(schema *jsonschema.Schema)`**: Set the input format
2323
- **`WithOutputSchema(schema *jsonschema.Schema)`**: Set the output format
2424

@@ -31,7 +31,7 @@ model := openai.NewModel("gpt-5", openai.Config{
3131
agent := blades.NewAgent(
3232
"Weather Agent",
3333
blades.WithModel(model),
34-
blades.WithInstructions("You are a helpful assistant that provides weather information."),
34+
blades.WithInstruction("You are a helpful assistant that provides weather information."),
3535
blades.WithTools(weatherTool),
3636
)
3737
// Run the agent

src/content/docs/blades/get-started/runstream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func main() {
3636
agent, err := blades.NewAgent(
3737
"Stream Agent",
3838
blades.WithModel(model),
39-
blades.WithInstructions("You are a helpful assistant that provides detailed answers."),
39+
blades.WithInstruction("You are a helpful assistant that provides detailed answers."),
4040
)
4141
if err != nil {
4242
log.Fatal(err)

src/content/docs/blades/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func main() {
9898
agent := blades.NewAgent(
9999
"Blades Agent",
100100
blades.WithModel(model),
101-
blades.WithInstructions("You are a helpful assistant that provides detailed and accurate information."),
101+
blades.WithInstruction("You are a helpful assistant that provides detailed and accurate information."),
102102
)
103103
// Create a Prompt with user message
104104
input := blades.UserMessage("What is the capital of France?")

src/content/docs/blades/tutorials/01-session.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func main() {
5252
agent, err := blades.NewAgent(
5353
"History Tutor",
5454
blades.WithModel(model),
55-
blades.WithInstructions("You are a knowledgeable history tutor. Provide detailed and accurate information on historical events."),
55+
blades.WithInstruction("You are a knowledgeable history tutor. Provide detailed and accurate information on historical events."),
5656
)
5757
if err != nil {
5858
log.Fatal(err)

src/content/docs/blades/tutorials/02-memory.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func main() {
5656
agent, err := blades.NewAgent(
5757
"History Tutor",
5858
blades.WithModel(model),
59-
blades.WithInstructions("You are a knowledgeable history tutor. Provide detailed and accurate information on historical events."),
59+
blades.WithInstruction("You are a knowledgeable history tutor. Provide detailed and accurate information on historical events."),
6060
)
6161
if err != nil {
6262
log.Fatal(err)
@@ -145,7 +145,7 @@ func main() {
145145
agent, err := blades.NewAgent(
146146
"MemoryRecallAgent",
147147
blades.WithModel(model),
148-
blades.WithInstructions("Answer the user's question. Use the 'Memory' tool if the answer might be in past conversations."),
148+
blades.WithInstruction("Answer the user's question. Use the 'Memory' tool if the answer might be in past conversations."),
149149
blades.WithTools(memoryTool),
150150
)
151151
if err != nil {

0 commit comments

Comments
 (0)