Skip to content

Commit c76d7b4

Browse files
committed
lint: fix auto-fixable issues
1 parent 9b269d0 commit c76d7b4

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

agent.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ func (a *agent) prepareTools(tools []AgentTool, activeTools []string, disableAll
868868
return preparedTools
869869
}
870870

871-
// validateAndRepairToolCall validates a tool call and attempts repair if validation fails
871+
// validateAndRepairToolCall validates a tool call and attempts repair if validation fails.
872872
func (a *agent) validateAndRepairToolCall(ctx context.Context, toolCall ToolCallContent, availableTools []AgentTool, systemPrompt string, messages []Message, repairFunc RepairToolCallFunction) ToolCallContent {
873873
if err := a.validateToolCall(toolCall, availableTools); err == nil {
874874
return toolCall
@@ -896,7 +896,7 @@ func (a *agent) validateAndRepairToolCall(ctx context.Context, toolCall ToolCall
896896
}
897897
}
898898

899-
// validateToolCall validates a tool call against available tools and their schemas
899+
// validateToolCall validates a tool call against available tools and their schemas.
900900
func (a *agent) validateToolCall(toolCall ToolCallContent, availableTools []AgentTool) error {
901901
var tool AgentTool
902902
for _, t := range availableTools {
@@ -1009,7 +1009,7 @@ func WithRepairToolCall(fn RepairToolCallFunction) AgentOption {
10091009
}
10101010
}
10111011

1012-
// processStepStream processes a single step's stream and returns the step result
1012+
// processStepStream processes a single step's stream and returns the step result.
10131013
func (a *agent) processStepStream(ctx context.Context, stream StreamResponse, opts AgentStreamCall, _ []StepResult) (StepResult, bool, error) {
10141014
var stepContent []Content
10151015
var stepToolCalls []ToolCallContent

content.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type ProviderOptions map[string]map[string]any
4545
// - `tool-calls`: model triggered tool calls
4646
// - `error`: model stopped because of an error
4747
// - `other`: model stopped for other reasons
48-
// - `unknown`: the model has not transmitted a finish reason
48+
// - `unknown`: the model has not transmitted a finish reason.
4949
type FinishReason string
5050

5151
const (
@@ -450,7 +450,7 @@ func (p ProviderDefinedTool) GetName() string {
450450
return p.Name
451451
}
452452

453-
// Helpers
453+
// Helpers.
454454
func NewUserMessage(prompt string, files ...FilePart) Message {
455455
content := []MessagePart{
456456
TextPart{

providers/anthropic.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ func toAnthropicTools(tools []ai.Tool, toolChoice *ai.ToolChoice, disableParalle
382382
},
383383
}
384384
}
385-
return
385+
return anthropicTools, anthropicToolChoice, warnings
386386
}
387387

388388
switch *toolChoice {
@@ -401,7 +401,7 @@ func toAnthropicTools(tools []ai.Tool, toolChoice *ai.ToolChoice, disableParalle
401401
},
402402
}
403403
case ai.ToolChoiceNone:
404-
return
404+
return anthropicTools, anthropicToolChoice, warnings
405405
default:
406406
anthropicToolChoice = &anthropic.ToolChoiceUnionParam{
407407
OfTool: &anthropic.ToolChoiceToolParam{
@@ -411,7 +411,7 @@ func toAnthropicTools(tools []ai.Tool, toolChoice *ai.ToolChoice, disableParalle
411411
},
412412
}
413413
}
414-
return
414+
return anthropicTools, anthropicToolChoice, warnings
415415
}
416416

417417
func toAnthropicPrompt(prompt ai.Prompt, sendReasoningData bool) ([]anthropic.TextBlockParam, []anthropic.MessageParam, []ai.CallWarning) {

providers/openai.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ func toOpenAiTools(tools []ai.Tool, toolChoice *ai.ToolChoice) (openAiTools []op
839839
})
840840
}
841841
if toolChoice == nil {
842-
return
842+
return openAiTools, openAiToolChoice, warnings
843843
}
844844

845845
switch *toolChoice {
@@ -861,7 +861,7 @@ func toOpenAiTools(tools []ai.Tool, toolChoice *ai.ToolChoice) (openAiTools []op
861861
},
862862
}
863863
}
864-
return
864+
return openAiTools, openAiToolChoice, warnings
865865
}
866866

867867
func toOpenAiPrompt(prompt ai.Prompt) ([]openai.ChatCompletionMessageParamUnion, []ai.CallWarning) {
@@ -1129,7 +1129,7 @@ func toOpenAiPrompt(prompt ai.Prompt) ([]openai.ChatCompletionMessageParamUnion,
11291129
return messages, warnings
11301130
}
11311131

1132-
// parseAnnotationsFromDelta parses annotations from the raw JSON of a delta
1132+
// parseAnnotationsFromDelta parses annotations from the raw JSON of a delta.
11331133
func parseAnnotationsFromDelta(delta openai.ChatCompletionChunkChoiceDelta) []openai.ChatCompletionMessageAnnotation {
11341134
var annotations []openai.ChatCompletionMessageAnnotation
11351135

0 commit comments

Comments
 (0)