Skip to content

Commit 36a780b

Browse files
committed
fix: replace empty content with space in system message handling
- Replace genai.Text("") with genai.Text(" ") to avoid empty content error - Empty content is not allowed in the API, using single space as minimum valid content - This change affects system message processing where an empty model response was previously used BREAKING CHANGE: None
1 parent 5590851 commit 36a780b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/adapter/struct.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (req *ChatCompletionRequest) toVisionGenaiContent() ([]*genai.Content, erro
7575
},
7676
{
7777
Parts: []genai.Part{
78-
genai.Text(""),
78+
genai.Text(" "),
7979
},
8080
Role: genaiRoleModel,
8181
},

0 commit comments

Comments
 (0)