(t *testing.T)
| 192 | } |
| 193 | |
| 194 | func TestStopReasonMapping(t *testing.T) { |
| 195 | t.Parallel() |
| 196 | |
| 197 | tests := []struct { |
| 198 | in chat.FinishReason |
| 199 | want string |
| 200 | }{ |
| 201 | {chat.FinishReasonStop, "endTurn"}, |
| 202 | {chat.FinishReasonLength, "maxTokens"}, |
| 203 | {chat.FinishReasonToolCalls, "toolUse"}, |
| 204 | {chat.FinishReasonNull, "endTurn"}, |
| 205 | {"", "endTurn"}, |
| 206 | } |
| 207 | |
| 208 | for _, tt := range tests { |
| 209 | t.Run(string(tt.in), func(t *testing.T) { |
| 210 | t.Parallel() |
| 211 | assert.Equal(t, tt.want, stopReason(tt.in)) |
| 212 | }) |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | func TestDataURL(t *testing.T) { |
| 217 | t.Parallel() |
nothing calls this directly
no test coverage detected