Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chat ¶
type Chat struct {
// contains filtered or unexported fields
}
Chat shows off the basic chat example, where the user goes back and forth with an AI agent, that keeps track of the conversation in a thread. We will also add the browser tool to the agent, so that it can browse the web.
type Strawberry ¶
type Strawberry struct {
// contains filtered or unexported fields
}
Strawberry is an example of the infamous strawberry problem, where the user asks the agent to count the number of times the letter "r" appears in the word "strawberry". This is an especially good example, since all LLMs will get this wrong, and it's a good way to test the agent's ability to reason.
func NewStrawberry ¶
func NewStrawberry(ctx context.Context, role string) *Strawberry
NewStrawberry creates a new Strawberry instance with the specified context and role. It initializes an empty scratchpad for accumulating assistant responses and sets up the basic formatting configuration.
Parameters:
- ctx: The context for operations
- role: The role designation for the AI agent
func (*Strawberry) Run ¶
func (s *Strawberry) Run() error
Run starts the strawberry loop, which allows the user to interact with the agent. It initializes the agents and creates a worker pool to handle the different steps of the strawberry problem.