feat: enhance OpenAI request and response DTOs

- Add `Prefix` and `ReasoningContent` fields to Message struct
- Add getter and setter methods for `Prefix`
- Make `ToolCall.ID` field optional (fix #749)
This commit is contained in:
1808837298@qq.com
2025-02-11 19:54:13 +08:00
parent cad8a83260
commit 1f527ffc50
2 changed files with 19 additions and 6 deletions

View File

@@ -81,7 +81,7 @@ func (c *ChatCompletionsStreamResponseChoiceDelta) GetContentString() string {
type ToolCall struct {
// Index is not nil only in chat completion chunk object
Index *int `json:"index,omitempty"`
ID string `json:"id"`
ID string `json:"id,omitempty"`
Type any `json:"type"`
Function FunctionCall `json:"function"`
}