(t *testing.T)
| 54 | } |
| 55 | |
| 56 | func TestMetadataKeyWords(t *testing.T) { |
| 57 | t.Parallel() |
| 58 | |
| 59 | tests := []struct { |
| 60 | key string |
| 61 | want []string |
| 62 | }{ |
| 63 | {"max_context_tokens", []string{"max", "context", "tokens"}}, |
| 64 | {"maxContextTokens", []string{"max", "context", "tokens"}}, |
| 65 | {"MAX_CONTEXT", []string{"max", "context"}}, |
| 66 | {"ContextWindow", []string{"context", "window"}}, |
| 67 | {"context2limit", []string{"context", "limit"}}, |
| 68 | {"", []string{}}, |
| 69 | } |
| 70 | for _, tt := range tests { |
| 71 | t.Run(tt.key, func(t *testing.T) { |
| 72 | t.Parallel() |
| 73 | got := metadataKeyWords(tt.key) |
| 74 | require.Equal(t, tt.want, got) |
| 75 | }) |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | func TestIsContextLimitKey(t *testing.T) { |
| 80 | t.Parallel() |
nothing calls this directly
no test coverage detected