Collapse RunWithOpts duplicates into variadic options
Run, RunStreamed, and Resume each shipped both a no-options form and a mirror *WithOpts form taking variadic RunOption. Variadic parameters are backward-compatible additions, so the wrappers were dead surface. Make Run, RunStreamed, and Resume directly variadic and update the two internal callers. Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user