HasPreviousResponseID checks whether the provider options contain an OpenAI Responses entry with a non-empty PreviousResponseID.
(providerOptions fantasy.ProviderOptions)
| 112 | // HasPreviousResponseID checks whether the provider options contain an OpenAI |
| 113 | // Responses entry with a non-empty PreviousResponseID. |
| 114 | func HasPreviousResponseID(providerOptions fantasy.ProviderOptions) bool { |
| 115 | if len(providerOptions) == 0 { |
| 116 | return false |
| 117 | } |
| 118 | |
| 119 | entry, ok := providerOptions[fantasyopenai.Name] |
| 120 | if !ok { |
| 121 | return false |
| 122 | } |
| 123 | options, ok := entry.(*fantasyopenai.ResponsesProviderOptions) |
| 124 | return ok && options != nil && options.PreviousResponseID != nil && |
| 125 | *options.PreviousResponseID != "" |
| 126 | } |
| 127 | |
| 128 | // ClearPreviousResponseID returns a clone of providerOptions with |
| 129 | // PreviousResponseID cleared on the OpenAI Responses options. The original |
no outgoing calls