Use internal API for services/actions when using the pool
Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
@@ -125,7 +125,7 @@ func Action(name string, config map[string]string, pool *state.AgentPool) (types
|
||||
case ActionCounter:
|
||||
a = actions.NewCounter(config)
|
||||
case ActionCallAgents:
|
||||
a = actions.NewCallAgent(config, pool)
|
||||
a = actions.NewCallAgent(config, pool.InternalAPI())
|
||||
case ActionShellcommand:
|
||||
a = actions.NewShell(config)
|
||||
default:
|
||||
|
||||
@@ -10,14 +10,14 @@ import (
|
||||
"github.com/sashabaranov/go-openai/jsonschema"
|
||||
)
|
||||
|
||||
func NewCallAgent(config map[string]string, pool *state.AgentPool) *CallAgentAction {
|
||||
func NewCallAgent(config map[string]string, pool *state.AgentPoolInternalAPI) *CallAgentAction {
|
||||
return &CallAgentAction{
|
||||
pool: pool,
|
||||
}
|
||||
}
|
||||
|
||||
type CallAgentAction struct {
|
||||
pool *state.AgentPool
|
||||
pool *state.AgentPoolInternalAPI
|
||||
}
|
||||
|
||||
func (a *CallAgentAction) Run(ctx context.Context, params types.ActionParams) (types.ActionResult, error) {
|
||||
|
||||
Reference in New Issue
Block a user