Skip to content

Commit c59277a

Browse files
committed
doc: added roles documentation
1 parent d1f79b9 commit c59277a

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

examples/agents/ollama/main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@ func main() {
7373
}
7474

7575
task := `
76-
Find all types in this codebase that implement the parser interface.
77-
For each type, show which package and file it is defined in.`
76+
Analyze the current Go code base and evaluate its maintainability. Produce a short report.`
77+
// task := `
78+
// Find all types in this codebase that implement the parser interface.
79+
// For each type, show which package and file it is defined in.`
7880
if err := agent.Task(ctx, task); err != nil {
7981
panic(err)
8082
}

inputs/roles/roles.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
// Package roles defines the standard message roles used in large language model (LLM) conversations.
12
package roles
23

4+
// Role represents a participant role in an LLM conversation.
5+
// Common roles include System, User, and Assistant, which correspond
6+
// to the standard roles supported by most LLM APIs.
37
type Role string
48

9+
// Common LLM conversation roles.
510
const (
6-
System Role = "system"
7-
User Role = "user"
11+
// System defines instructions or context that guide the assistant's behavior.
12+
System Role = "system"
13+
// User represents a message from the human participant in the conversation.
14+
User Role = "user"
15+
// Assistant represents a message from the LLM in the conversation.
816
Assistant Role = "assistant"
917
)
1018

0 commit comments

Comments
 (0)