Skip to content

Commit f60c7b4

Browse files
committed
fix: use mapstruct tag
1 parent efe4a66 commit f60c7b4

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

anthropic/provider_options.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
package anthropic
22

33
type ProviderOptions struct {
4-
SendReasoning *bool `json:"send_reasoning,omitempty"`
5-
Thinking *ThinkingProviderOption `json:"thinking,omitempty"`
6-
DisableParallelToolUse *bool `json:"disable_parallel_tool_use,omitempty"`
4+
SendReasoning *bool `mapstructure:"send_reasoning,omitempty"`
5+
Thinking *ThinkingProviderOption `mapstructure:"thinking,omitempty"`
6+
DisableParallelToolUse *bool `mapstructure"disable_parallel_tool_use,omitempty"`
77
}
88

99
type ThinkingProviderOption struct {
10-
BudgetTokens int64 `json:"budget_tokens"`
10+
BudgetTokens int64 `mapstructure:"budget_tokens"`
1111
}
1212

1313
type ReasoningMetadata struct {
14-
Signature string `json:"signature"`
15-
RedactedData string `json:"redacted_data"`
14+
Signature string `mapstructure"signature"`
15+
RedactedData string `mapstructure:"redacted_data"`
1616
}
1717

1818
type CacheControlProviderOptions struct {
19-
Type string `json:"type"`
19+
Type string `mapstructure:"type"`
2020
}

openai/provider_options.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ const (
1010
)
1111

1212
type ProviderOptions struct {
13-
LogitBias map[string]int64 `json:"logit_bias"`
14-
LogProbs *bool `json:"log_probes"`
15-
TopLogProbs *int64 `json:"top_log_probs"`
16-
ParallelToolCalls *bool `json:"parallel_tool_calls"`
17-
User *string `json:"user"`
18-
ReasoningEffort *ReasoningEffort `json:"reasoning_effort"`
19-
MaxCompletionTokens *int64 `json:"max_completion_tokens"`
20-
TextVerbosity *string `json:"text_verbosity"`
21-
Prediction map[string]any `json:"prediction"`
22-
Store *bool `json:"store"`
23-
Metadata map[string]any `json:"metadata"`
24-
PromptCacheKey *string `json:"prompt_cache_key"`
25-
SafetyIdentifier *string `json:"safety_identifier"`
26-
ServiceTier *string `json:"service_tier"`
27-
StructuredOutputs *bool `json:"structured_outputs"`
13+
LogitBias map[string]int64 `mapstructure:"logit_bias"`
14+
LogProbs *bool `mapstructure:"log_probes"`
15+
TopLogProbs *int64 `mapstructure:"top_log_probs"`
16+
ParallelToolCalls *bool `mapstructure:"parallel_tool_calls"`
17+
User *string `mapstructure:"user"`
18+
ReasoningEffort *ReasoningEffort `mapstructure:"reasoning_effort"`
19+
MaxCompletionTokens *int64 `mapstructure:"max_completion_tokens"`
20+
TextVerbosity *string `mapstructure:"text_verbosity"`
21+
Prediction map[string]any `mapstructure:"prediction"`
22+
Store *bool `mapstructure:"store"`
23+
Metadata map[string]any `mapstructure:"metadata"`
24+
PromptCacheKey *string `mapstructure:"prompt_cache_key"`
25+
SafetyIdentifier *string `mapstructure:"safety_identifier"`
26+
ServiceTier *string `mapstructure:"service_tier"`
27+
StructuredOutputs *bool `mapstructure:"structured_outputs"`
2828
}

0 commit comments

Comments
 (0)