fix: search-preview model web search billing

This commit is contained in:
creamlike1024
2025-05-26 18:53:41 +08:00
parent b564cac048
commit 30d5a11f46
2 changed files with 45 additions and 4 deletions

View File

@@ -53,6 +53,7 @@ type GeneralOpenAIRequest struct {
Audio any `json:"audio,omitempty"`
EnableThinking any `json:"enable_thinking,omitempty"` // ali
ExtraBody any `json:"extra_body,omitempty"`
WebSearchOptions *WebSearchOptions `json:"web_search_options,omitempty"`
}
type ToolCallRequest struct {
@@ -371,6 +372,11 @@ func (m *Message) ParseContent() []MediaContent {
return contentList
}
type WebSearchOptions struct {
SearchContextSize string `json:"search_context_size,omitempty"`
UserLocation json.RawMessage `json:"user_location,omitempty"`
}
type OpenAIResponsesRequest struct {
Model string `json:"model"`
Input json.RawMessage `json:"input,omitempty"`