Commit 9009a572 by Seefs Committed by GitHub

feat: support gpt-5.1 prompt_cache_retention (#2228)

parent 72402f0d
...@@ -16,6 +16,7 @@ new-api ...@@ -16,6 +16,7 @@ new-api
tiktoken_cache tiktoken_cache
.eslintcache .eslintcache
.gocache .gocache
.cache
electron/node_modules electron/node_modules
electron/dist electron/dist
...@@ -67,6 +67,7 @@ type GeneralOpenAIRequest struct { ...@@ -67,6 +67,7 @@ type GeneralOpenAIRequest struct {
Store json.RawMessage `json:"store,omitempty"` Store json.RawMessage `json:"store,omitempty"`
// Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the user field // Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the user field
PromptCacheKey string `json:"prompt_cache_key,omitempty"` PromptCacheKey string `json:"prompt_cache_key,omitempty"`
PromptCacheRetention json.RawMessage `json:"prompt_cache_retention,omitempty"`
LogitBias json.RawMessage `json:"logit_bias,omitempty"` LogitBias json.RawMessage `json:"logit_bias,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"` Metadata json.RawMessage `json:"metadata,omitempty"`
Prediction json.RawMessage `json:"prediction,omitempty"` Prediction json.RawMessage `json:"prediction,omitempty"`
...@@ -801,6 +802,7 @@ type OpenAIResponsesRequest struct { ...@@ -801,6 +802,7 @@ type OpenAIResponsesRequest struct {
ServiceTier string `json:"service_tier,omitempty"` ServiceTier string `json:"service_tier,omitempty"`
Store json.RawMessage `json:"store,omitempty"` Store json.RawMessage `json:"store,omitempty"`
PromptCacheKey json.RawMessage `json:"prompt_cache_key,omitempty"` PromptCacheKey json.RawMessage `json:"prompt_cache_key,omitempty"`
PromptCacheRetention json.RawMessage `json:"prompt_cache_retention,omitempty"`
Stream bool `json:"stream,omitempty"` Stream bool `json:"stream,omitempty"`
Temperature float64 `json:"temperature,omitempty"` Temperature float64 `json:"temperature,omitempty"`
Text json.RawMessage `json:"text,omitempty"` Text json.RawMessage `json:"text,omitempty"`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment