Fixed gemini system prompt handling
This commit is contained in:
parent
60a474d516
commit
e1092e69ae
@ -158,8 +158,14 @@ func createGenerateContentRequest(
|
||||
}
|
||||
|
||||
request := &GenerateContentRequest{
|
||||
Contents: requestContents,
|
||||
SystemInstructions: system,
|
||||
Contents: requestContents,
|
||||
SystemInstruction: Content{
|
||||
Parts: []ContentPart{
|
||||
{
|
||||
Text: system,
|
||||
},
|
||||
},
|
||||
},
|
||||
GenerationConfig: &GenerationConfig{
|
||||
MaxOutputTokens: ¶ms.MaxTokens,
|
||||
Temperature: ¶ms.Temperature,
|
||||
|
@ -34,10 +34,10 @@ type GenerationConfig struct {
|
||||
}
|
||||
|
||||
type GenerateContentRequest struct {
|
||||
Contents []Content `json:"contents"`
|
||||
Tools []Tool `json:"tools,omitempty"`
|
||||
SystemInstructions string `json:"systemInstructions,omitempty"`
|
||||
GenerationConfig *GenerationConfig `json:"generationConfig,omitempty"`
|
||||
Contents []Content `json:"contents"`
|
||||
Tools []Tool `json:"tools,omitempty"`
|
||||
SystemInstruction Content `json:"systemInstruction,omitempty"`
|
||||
GenerationConfig *GenerationConfig `json:"generationConfig,omitempty"`
|
||||
}
|
||||
|
||||
type Candidate struct {
|
||||
|
Loading…
Reference in New Issue
Block a user