agentFunc adapts a simple function into the agent.Agent interface.
func(input []*proto.Message, tm agent.Executor, o agent.OutputHandler)
| 23 | |
| 24 | // agentFunc adapts a simple function into the agent.Agent interface. |
| 25 | type agentFunc func(input []*proto.Message, tm agent.Executor, o agent.OutputHandler) |
| 26 | |
| 27 | func (f agentFunc) Connect(ctx context.Context, conversationID string, execID string, start *proto.AgentStart, tm agent.Executor, o agent.OutputHandler) error { |
| 28 | f(start.Messages, tm, o) |