@@ -18,37 +18,38 @@ var DefaultModel = openai.GPT3Dot5Turbo
1818
1919// modelMaps maps model names to their corresponding model ID strings.
2020var modelMaps = map [string ]string {
21- "gpt-4-32k-0613" : openai .GPT432K0613 ,
22- "gpt-4-32k-0314" : openai .GPT432K0314 ,
23- "gpt-4-32k" : openai .GPT432K ,
24- "gpt-4-0613" : openai .GPT40613 ,
25- "gpt-4-0314" : openai .GPT40314 ,
26- "gpt-4-turbo" : openai .GPT4Turbo ,
27- "gpt-4-turbo-2024-04-09" : openai .GPT4Turbo20240409 ,
28- "gpt-4-0125-preview" : openai .GPT4Turbo0125 ,
29- "gpt-4-1106-preview" : openai .GPT4Turbo1106 ,
30- "gpt-4-turbo-preview" : openai .GPT4TurboPreview ,
31- "gpt-4-vision-preview" : openai .GPT4VisionPreview ,
32- "gpt-4" : openai .GPT4 ,
33- "gpt-3.5-turbo-0125" : openai .GPT3Dot5Turbo0125 ,
34- "gpt-3.5-turbo-1106" : openai .GPT3Dot5Turbo1106 ,
35- "gpt-3.5-turbo-0613" : openai .GPT3Dot5Turbo0613 ,
36- "gpt-3.5-turbo-0301" : openai .GPT3Dot5Turbo0301 ,
37- "gpt-3.5-turbo-16k" : openai .GPT3Dot5Turbo16K ,
38- "gpt-3.5-turbo-16k-0613" : openai .GPT3Dot5Turbo16K0613 ,
39- "gpt-3.5-turbo" : openai .GPT3Dot5Turbo ,
40- "gpt-3.5-turbo-instruct" : openai .GPT3Dot5TurboInstruct ,
41- "davinci" : openai .GPT3Davinci ,
42- "davinci-002" : openai .GPT3Davinci002 ,
43- "curie" : openai .GPT3Curie ,
44- "curie-002" : openai .GPT3Curie002 ,
45- "ada" : openai .GPT3Ada ,
46- "ada-002" : openai .GPT3Ada002 ,
47- "babbage" : openai .GPT3Babbage ,
48- "babbage-002" : openai .GPT3Babbage002 ,
49- groq .LLaMA270bChat .String (): groq .LLaMA270bChat .GetModel (),
50- groq .Mixtral8x7bInstructV01 .String (): groq .Mixtral8x7bInstructV01 .GetModel (),
51- groq .Gemma7bIt .String (): groq .Gemma7bIt .GetModel (),
21+ "gpt-4-32k-0613" : openai .GPT432K0613 ,
22+ "gpt-4-32k-0314" : openai .GPT432K0314 ,
23+ "gpt-4-32k" : openai .GPT432K ,
24+ "gpt-4-0613" : openai .GPT40613 ,
25+ "gpt-4-0314" : openai .GPT40314 ,
26+ "gpt-4-turbo" : openai .GPT4Turbo ,
27+ "gpt-4-turbo-2024-04-09" : openai .GPT4Turbo20240409 ,
28+ "gpt-4-0125-preview" : openai .GPT4Turbo0125 ,
29+ "gpt-4-1106-preview" : openai .GPT4Turbo1106 ,
30+ "gpt-4-turbo-preview" : openai .GPT4TurboPreview ,
31+ "gpt-4-vision-preview" : openai .GPT4VisionPreview ,
32+ "gpt-4" : openai .GPT4 ,
33+ "gpt-3.5-turbo-0125" : openai .GPT3Dot5Turbo0125 ,
34+ "gpt-3.5-turbo-1106" : openai .GPT3Dot5Turbo1106 ,
35+ "gpt-3.5-turbo-0613" : openai .GPT3Dot5Turbo0613 ,
36+ "gpt-3.5-turbo-0301" : openai .GPT3Dot5Turbo0301 ,
37+ "gpt-3.5-turbo-16k" : openai .GPT3Dot5Turbo16K ,
38+ "gpt-3.5-turbo-16k-0613" : openai .GPT3Dot5Turbo16K0613 ,
39+ "gpt-3.5-turbo" : openai .GPT3Dot5Turbo ,
40+ "gpt-3.5-turbo-instruct" : openai .GPT3Dot5TurboInstruct ,
41+ "davinci" : openai .GPT3Davinci ,
42+ "davinci-002" : openai .GPT3Davinci002 ,
43+ "curie" : openai .GPT3Curie ,
44+ "curie-002" : openai .GPT3Curie002 ,
45+ "ada" : openai .GPT3Ada ,
46+ "ada-002" : openai .GPT3Ada002 ,
47+ "babbage" : openai .GPT3Babbage ,
48+ "babbage-002" : openai .GPT3Babbage002 ,
49+ groq .LLaMA38b .String (): groq .LLaMA38b .String (),
50+ groq .LLaMA370b .String (): groq .LLaMA370b .String (),
51+ groq .Mixtral8x7b .String (): groq .Mixtral8x7b .String (),
52+ groq .Gemma7b .String (): groq .Gemma7b .String (),
5253}
5354
5455// GetModel returns the model ID corresponding to the given model name.
@@ -194,9 +195,10 @@ func (c *Client) Completion(
194195 openai .GPT4VisionPreview ,
195196 openai .GPT4Turbo ,
196197 openai .GPT4Turbo20240409 ,
197- groq .LLaMA270bChat .GetModel (),
198- groq .Mixtral8x7bInstructV01 .GetModel (),
199- groq .Gemma7bIt .GetModel ():
198+ groq .LLaMA38b .String (),
199+ groq .LLaMA370b .String (),
200+ groq .Mixtral8x7b .String (),
201+ groq .Gemma7b .String ():
200202 r , err := c .CreateChatCompletion (ctx , content )
201203 if err != nil {
202204 return nil , err
@@ -323,7 +325,11 @@ func (c *Client) allowFuncCall(cfg *config) bool {
323325 openai .GPT3Dot5Turbo ,
324326 openai .GPT3Dot5Turbo0125 ,
325327 openai .GPT3Dot5Turbo0613 ,
326- openai .GPT3Dot5Turbo1106 :
328+ openai .GPT3Dot5Turbo1106 ,
329+ groq .LLaMA38b .String (),
330+ groq .LLaMA370b .String (),
331+ groq .Mixtral8x7b .String (),
332+ groq .Gemma7b .String ():
327333 return true
328334 default :
329335 return false
0 commit comments