Przeglądaj źródła

Merge branch 'main' into thinking

# Conflicts:
#	relay/channel/claude/dto.go
1808837298@qq.com 1 rok temu
rodzic
commit
607e3206b3
2 zmienionych plików z 4 dodań i 2 usunięć
  1. 2 0
      relay/channel/aws/dto.go
  2. 2 2
      relay/channel/claude/dto.go

+ 2 - 0
relay/channel/aws/dto.go

@@ -16,6 +16,7 @@ type AwsClaudeRequest struct {
 	StopSequences    []string               `json:"stop_sequences,omitempty"`
 	Tools            []claude.Tool          `json:"tools,omitempty"`
 	ToolChoice       any                    `json:"tool_choice,omitempty"`
+	Thinking         *claude.Thinking       `json:"thinking,omitempty"`
 }
 
 func copyRequest(req *claude.ClaudeRequest) *AwsClaudeRequest {
@@ -30,5 +31,6 @@ func copyRequest(req *claude.ClaudeRequest) *AwsClaudeRequest {
 		StopSequences:    req.StopSequences,
 		Tools:            req.Tools,
 		ToolChoice:       req.ToolChoice,
+		Thinking:         req.Thinking,
 	}
 }

+ 2 - 2
relay/channel/claude/dto.go

@@ -64,8 +64,8 @@ type ClaudeRequest struct {
 }
 
 type Thinking struct {
-	Type         string `json:"type,omitempty"`
-	BudgetTokens int    `json:"budget_tokens,omitempty"`
+	Type         string `json:"type"`
+	BudgetTokens int    `json:"budget_tokens"`
 }
 
 type ClaudeError struct {