(t *testing.T)
| 157 | } |
| 158 | |
| 159 | func TestIncludeFromChat(t *testing.T) { |
| 160 | t.Parallel() |
| 161 | |
| 162 | tests := []struct { |
| 163 | name string |
| 164 | values []string |
| 165 | want []fantasyopenai.IncludeType |
| 166 | }{ |
| 167 | {name: "Nil"}, |
| 168 | {name: "Empty", values: []string{}, want: []fantasyopenai.IncludeType{}}, |
| 169 | { |
| 170 | name: "ValidAndInvalid", |
| 171 | values: []string{ |
| 172 | " " + string(fantasyopenai.IncludeReasoningEncryptedContent) + " ", |
| 173 | string(fantasyopenai.IncludeFileSearchCallResults), |
| 174 | "unsupported", |
| 175 | string(fantasyopenai.IncludeMessageOutputTextLogprobs), |
| 176 | }, |
| 177 | want: []fantasyopenai.IncludeType{ |
| 178 | fantasyopenai.IncludeReasoningEncryptedContent, |
| 179 | fantasyopenai.IncludeFileSearchCallResults, |
| 180 | fantasyopenai.IncludeMessageOutputTextLogprobs, |
| 181 | }, |
| 182 | }, |
| 183 | } |
| 184 | |
| 185 | for _, tt := range tests { |
| 186 | t.Run(tt.name, func(t *testing.T) { |
| 187 | t.Parallel() |
| 188 | |
| 189 | got := chatopenai.IncludeFromChat(tt.values) |
| 190 | require.Equal(t, tt.want, got) |
| 191 | }) |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | func TestEnsureResponseIncludes(t *testing.T) { |
| 196 | t.Parallel() |
nothing calls this directly
no test coverage detected