(t *testing.T)
| 1986 | } |
| 1987 | |
| 1988 | func TestEncodingForModel(t *testing.T) { |
| 1989 | tests := []struct { |
| 1990 | model string |
| 1991 | want string |
| 1992 | }{ |
| 1993 | {"gpt-4", "cl100k_base"}, |
| 1994 | {"claude-3-opus", "cl100k_base"}, |
| 1995 | {"", "cl100k_base"}, |
| 1996 | {"o1-preview", "o200k_base"}, |
| 1997 | {"o3-mini", "o200k_base"}, |
| 1998 | {"o4-mini", "o200k_base"}, |
| 1999 | {"GPT-O1", "o200k_base"}, |
| 2000 | } |
| 2001 | for _, tt := range tests { |
| 2002 | t.Run(tt.model, func(t *testing.T) { |
| 2003 | got := encodingForModel(tt.model) |
| 2004 | if got != tt.want { |
| 2005 | t.Errorf("encodingForModel(%q) = %q, want %q", tt.model, got, tt.want) |
| 2006 | } |
| 2007 | }) |
| 2008 | } |
| 2009 | } |
| 2010 | |
| 2011 | func TestNewLLMClient_Dispatch(t *testing.T) { |
| 2012 | tests := []struct { |
nothing calls this directly
no test coverage detected