diff --git a/pkg/agent/restore_test.go b/pkg/agent/restore_test.go index 274064945..d5ba3ed05 100644 --- a/pkg/agent/restore_test.go +++ b/pkg/agent/restore_test.go @@ -480,7 +480,7 @@ func TestRestore(t *testing.T) { close(stopCh) ctx := agent.WithStopSignal(context.Background(), stopCh) - _, err := ag.RunWithOpts( + _, err := ag.Run( ctx, []llm.Message{ { diff --git a/pkg/agent/run.go b/pkg/agent/run.go index 7cfcf9050..ccac27aa0 100644 --- a/pkg/agent/run.go +++ b/pkg/agent/run.go @@ -115,11 +115,7 @@ func blockingCallLLM(ctx context.Context, agent *Agent, req *llm.ChatCompletionR return acc.Response(), nil } -func (a *Agent) Run(ctx context.Context, messages []llm.Message) (*Result, error) { - return a.RunWithOpts(ctx, messages) -} - -func (a *Agent) RunWithOpts(ctx context.Context, messages []llm.Message, opts ...RunOption) (*Result, error) { +func (a *Agent) Run(ctx context.Context, messages []llm.Message, opts ...RunOption) (*Result, error) { ro := runOpts{ callLLM: blockingCallLLM, onEvent: noopEvent, @@ -1244,11 +1240,7 @@ func runOutputGuardrails(ctx context.Context, agent *Agent, message llm.Message) // the provided ResumeInput, then re-enters the agent loop. Input guardrails // are not re-evaluated because the messages were already validated in the // original Run call. -func Resume(ctx context.Context, interrupted *InterruptedError, input ResumeInput) (*Result, error) { - return ResumeWithOpts(ctx, interrupted, input) -} - -func ResumeWithOpts(ctx context.Context, interrupted *InterruptedError, input ResumeInput, opts ...RunOption) (*Result, error) { +func Resume(ctx context.Context, interrupted *InterruptedError, input ResumeInput, opts ...RunOption) (*Result, error) { ro := runOpts{ callLLM: blockingCallLLM, onEvent: noopEvent, diff --git a/pkg/agent/stream.go b/pkg/agent/stream.go index 5743e4f0d..eaee2eb33 100644 --- a/pkg/agent/stream.go +++ b/pkg/agent/stream.go @@ -59,11 +59,7 @@ func (sr *StreamedRun) Wait() (*Result, error) { return sr.result, sr.err } -func (a *Agent) RunStreamed(ctx context.Context, messages []llm.Message) *StreamedRun { - return a.RunStreamedWithOpts(ctx, messages) -} - -func (a *Agent) RunStreamedWithOpts(ctx context.Context, messages []llm.Message, opts ...RunOption) *StreamedRun { +func (a *Agent) RunStreamed(ctx context.Context, messages []llm.Message, opts ...RunOption) *StreamedRun { events := make(chan StreamEvent, 64) sr := &StreamedRun{ Events: events, diff --git a/pkg/probo/agent_run_handler.go b/pkg/probo/agent_run_handler.go index 61c5d8e66..33db6cb12 100644 --- a/pkg/probo/agent_run_handler.go +++ b/pkg/probo/agent_run_handler.go @@ -228,7 +228,7 @@ func (h *agentRunHandler) executeRun(ctx context.Context, run *coredata.AgentRun if err := json.Unmarshal(run.InputMessages, &inputMsgs); err != nil { runErr = fmt.Errorf("cannot unmarshal input messages: %w", err) } else { - result, runErr = a.RunWithOpts( + result, runErr = a.Run( ctx, inputMsgs, agent.WithCheckpointer(h.store, runID),