No longer include 'IncludeThoughts' parameter with Gemini API
Google no longer provides thinking output via the API :(
This commit is contained in:
@@ -41,18 +41,11 @@ type Content struct {
|
|||||||
Parts []ContentPart `json:"parts"`
|
Parts []ContentPart `json:"parts"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ThinkingConfig struct {
|
|
||||||
// Indicates whether to include thoughts in the response. If true, thoughts are returned
|
|
||||||
// only if the model supports thought and thoughts are available.
|
|
||||||
IncludeThoughts bool `json:"includeThoughts,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type GenerationConfig struct {
|
type GenerationConfig struct {
|
||||||
MaxOutputTokens *int `json:"maxOutputTokens,omitempty"`
|
MaxOutputTokens *int `json:"maxOutputTokens,omitempty"`
|
||||||
Temperature *float32 `json:"temperature,omitempty"`
|
Temperature *float32 `json:"temperature,omitempty"`
|
||||||
TopP *float32 `json:"topP,omitempty"`
|
TopP *float32 `json:"topP,omitempty"`
|
||||||
TopK *int `json:"topK,omitempty"`
|
TopK *int `json:"topK,omitempty"`
|
||||||
ThinkingConfig *ThinkingConfig `json:"thinkingConfig,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type GenerateContentRequest struct {
|
type GenerateContentRequest struct {
|
||||||
@@ -249,9 +242,6 @@ func createGenerateContentRequest(
|
|||||||
MaxOutputTokens: ¶ms.MaxTokens,
|
MaxOutputTokens: ¶ms.MaxTokens,
|
||||||
Temperature: ¶ms.Temperature,
|
Temperature: ¶ms.Temperature,
|
||||||
TopP: ¶ms.TopP,
|
TopP: ¶ms.TopP,
|
||||||
ThinkingConfig: &ThinkingConfig{
|
|
||||||
IncludeThoughts: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user