MCPcopy Create free account
hub / github.com/coder/coder / IsResponsesStoreEnabled

Function IsResponsesStoreEnabled

coderd/x/chatd/chatopenai/responses.go:76–89  ·  view source on GitHub ↗

IsResponsesStoreEnabled checks if the OpenAI Responses provider options are present and have Store set to true. When true, the provider stores conversation history server-side, enabling follow-up chaining via PreviousResponseID.

(opts fantasy.ProviderOptions)

Source from the content-addressed store, hash-verified

74// conversation history server-side, enabling follow-up chaining via
75// PreviousResponseID.
76func IsResponsesStoreEnabled(opts fantasy.ProviderOptions) bool {
77 if opts == nil {
78 return false
79 }
80 raw, ok := opts[fantasyopenai.Name]
81 if !ok {
82 return false
83 }
84 respOpts, ok := raw.(*fantasyopenai.ResponsesProviderOptions)
85 if !ok || respOpts == nil {
86 return false
87 }
88 return respOpts.Store != nil && *respOpts.Store
89}
90
91// WithPreviousResponseID shallow-clones the provider options map and the OpenAI
92// Responses entry, setting PreviousResponseID on the clone. The original map

Calls

no outgoing calls