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)
| 74 | // conversation history server-side, enabling follow-up chaining via |
| 75 | // PreviousResponseID. |
| 76 | func 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 |
no outgoing calls