initial agent setup
This commit is contained in:
parent
8daa6e774a
commit
e7258e38ae
29 changed files with 2206 additions and 108 deletions
17
internal/llm/agent/agent.go
Normal file
17
internal/llm/agent/agent.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package agent
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/cloudwego/eino/flow/agent/react"
|
||||
)
|
||||
|
||||
func GetAgent(ctx context.Context, name string) (*react.Agent, string, error) {
|
||||
switch name {
|
||||
case "coder":
|
||||
agent, err := NewCoderAgent(ctx)
|
||||
return agent, CoderSystemPrompt(), err
|
||||
}
|
||||
return nil, "", fmt.Errorf("agent %s not found", name)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue