forked from continuedev/continue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
modelData.ts
911 lines (874 loc) · 25.1 KB
/
modelData.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
/*
This is the data that populates the model selection page.
*/
import { ModelName, ModelProvider } from "core";
import _ from "lodash";
export function updatedObj(old: any, pathToValue: { [key: string]: any }) {
const newObject = _.cloneDeep(old);
for (const key in pathToValue) {
if (typeof pathToValue[key] === "function") {
_.updateWith(newObject, key, pathToValue[key]);
} else {
_.updateWith(newObject, key, (__) => pathToValue[key]);
}
}
return newObject;
}
export enum ModelProviderTag {
"Requires API Key" = "Requires API Key",
"Local" = "Local",
"Free" = "Free",
"Open-Source" = "Open-Source",
}
export const MODEL_PROVIDER_TAG_COLORS: any = {};
MODEL_PROVIDER_TAG_COLORS[ModelProviderTag["Requires API Key"]] = "#FF0000";
MODEL_PROVIDER_TAG_COLORS[ModelProviderTag["Local"]] = "#00bb00";
MODEL_PROVIDER_TAG_COLORS[ModelProviderTag["Open-Source"]] = "#0033FF";
MODEL_PROVIDER_TAG_COLORS[ModelProviderTag["Free"]] = "#ffff00";
export enum CollectInputType {
"text" = "text",
"number" = "number",
"range" = "range",
}
export interface InputDescriptor {
inputType: CollectInputType;
key: string;
label: string;
placeholder?: string;
defaultValue?: string | number;
min?: number;
max?: number;
step?: number;
options?: string[];
required?: boolean;
description?: string;
[key: string]: any;
}
const contextLengthInput: InputDescriptor = {
inputType: CollectInputType.number,
key: "contextLength",
label: "Context Length",
defaultValue: undefined,
required: false,
};
const temperatureInput: InputDescriptor = {
inputType: CollectInputType.number,
key: "completionOptions.temperature",
label: "Temperature",
defaultValue: undefined,
required: false,
min: 0.0,
max: 1.0,
step: 0.01,
};
const topPInput: InputDescriptor = {
inputType: CollectInputType.number,
key: "completionOptions.topP",
label: "Top-P",
defaultValue: undefined,
required: false,
min: 0,
max: 1,
step: 0.01,
};
const topKInput: InputDescriptor = {
inputType: CollectInputType.number,
key: "completionOptions.topK",
label: "Top-K",
defaultValue: undefined,
required: false,
min: 0,
step: 1,
};
const presencePenaltyInput: InputDescriptor = {
inputType: CollectInputType.number,
key: "completionOptions.presencePenalty",
label: "Presence Penalty",
defaultValue: undefined,
required: false,
min: 0,
max: 1,
step: 0.01,
};
const FrequencyPenaltyInput: InputDescriptor = {
inputType: CollectInputType.number,
key: "completionOptions.frequencyPenalty",
label: "Frequency Penalty",
defaultValue: undefined,
required: false,
min: 0,
max: 1,
step: 0.01,
};
const completionParamsInputs = [
contextLengthInput,
temperatureInput,
topKInput,
topPInput,
presencePenaltyInput,
FrequencyPenaltyInput,
];
const apiBaseInput: InputDescriptor = {
inputType: CollectInputType.text,
key: "apiBase",
label: "API Base",
placeholder: "e.g. http://localhost:8080",
required: false,
};
export interface ModelInfo {
title: string;
provider: ModelProvider;
description: string;
longDescription?: string;
icon?: string;
tags?: ModelProviderTag[];
packages: ModelPackage[];
params?: any;
collectInputFor?: InputDescriptor[];
refPage?: string;
}
// A dimension is like parameter count - 7b, 13b, 34b, etc.
// You would set options to the field that should be changed for that option in the params field of ModelPackage
export interface PackageDimension {
name: string;
description: string;
options: { [key: string]: { [key: string]: any } };
}
export interface ModelPackage {
collectInputFor?: InputDescriptor[];
description: string;
title: string;
refUrl?: string;
tags?: ModelProviderTag[];
icon?: string;
params: {
model: ModelName;
templateMessages?: string;
contextLength: number;
stopTokens?: string[];
promptTemplates?: any;
replace?: [string, string][];
[key: string]: any;
};
dimensions?: PackageDimension[];
providerOptions?: string[];
}
const codeLlamaInstruct: ModelPackage = {
title: "CodeLlama Instruct",
description:
"A model from Meta, fine-tuned for code generation and conversation",
refUrl: "",
params: {
title: "CodeLlama-7b",
model: "codellama-7b",
contextLength: 4096,
},
icon: "meta.png",
dimensions: [
{
name: "Parameter Count",
description: "The number of parameters in the model",
options: {
"7b": {
model: "codellama-7b",
title: "CodeLlama-7b",
},
"13b": {
model: "codellama-13b",
title: "CodeLlama-13b",
},
"34b": {
model: "codellama-34b",
title: "CodeLlama-34b",
},
"70b": {
model: "codellama-70b",
title: "Codellama-70b",
},
},
},
],
providerOptions: ["ollama", "lmstudio", "together", "llamacpp", "replicate"],
};
const codellama70bTrial: ModelPackage = {
title: "Codellama 70b (Free Trial)",
description:
"The best code model from Meta, fine-tuned for code generation and conversation",
refUrl: "",
params: {
title: "CodeLlama-70b",
model: "codellama-70b",
contextLength: 4096,
},
icon: "meta.png",
providerOptions: ["freetrial"],
};
const llama2Chat: ModelPackage = {
title: "Llama2 Chat",
description: "The latest Llama model from Meta, fine-tuned for chat",
refUrl: "",
params: {
title: "Llama2-7b",
model: "llama2-7b",
contextLength: 4096,
},
icon: "meta.png",
dimensions: [
{
name: "Parameter Count",
description: "The number of parameters in the model",
options: {
"7b": {
model: "llama2-7b",
title: "Llama2-7b",
},
"13b": {
model: "llama2-13b",
title: "Llama2-13b",
},
"34b": {
model: "llama2-34b",
title: "Llama2-34b",
},
},
},
],
providerOptions: ["ollama", "lmstudio", "together", "llamacpp", "replicate"],
};
const wizardCoder: ModelPackage = {
title: "WizardCoder",
description:
"A CodeLlama-based code generation model from WizardLM, focused on Python",
refUrl: "",
params: {
title: "WizardCoder-7b",
model: "wizardcoder-7b",
contextLength: 4096,
},
icon: "wizardlm.png",
dimensions: [
{
name: "Parameter Count",
description: "The number of parameters in the model",
options: {
"7b": {
model: "wizardcoder-7b",
title: "WizardCoder-7b",
},
"13b": {
model: "wizardcoder-13b",
title: "WizardCoder-13b",
},
"34b": {
model: "wizardcoder-34b",
title: "WizardCoder-34b",
},
},
},
],
providerOptions: ["ollama", "lmstudio", "llamacpp", "replicate"],
};
const phindCodeLlama: ModelPackage = {
title: "Phind CodeLlama (34b)",
description: "A finetune of CodeLlama by Phind",
icon: "meta.png",
params: {
title: "Phind CodeLlama",
model: "phind-codellama-34b",
contextLength: 4096,
},
providerOptions: ["ollama", "lmstudio", "llamacpp", "replicate", "freetrial"],
};
const mistral: ModelPackage = {
title: "Mistral (7b)",
description:
"A 7b parameter base model created by Mistral AI, very competent for code generation and other tasks",
params: {
title: "Mistral",
model: "mistral-7b",
contextLength: 4096,
},
dimensions: [
{
name: "Parameter Count",
description: "The number of parameters in the model",
options: {
"7b": {
model: "mistral-7b",
title: "Mistral-7b",
},
"8x7b (MoE)": {
model: "mistral-8x7b",
title: "Mixtral",
},
},
},
],
icon: "mistral.png",
providerOptions: ["ollama", "lmstudio", "together", "llamacpp", "replicate"],
};
const mistralTiny: ModelPackage = {
title: "Mistral Tiny (7b)",
description: "An 7b parameter model created by Mistral AI",
params: {
title: "Mistral",
model: "mistral-tiny",
contextLength: 4096,
},
icon: "mistral.png",
providerOptions: [
"ollama",
"lmstudio",
"together",
"llamacpp",
"replicate",
"mistral",
],
};
const mistralSmall: ModelPackage = {
title: "Mixtral (8x7b)",
description:
"An 8x7b parameter Mixture of Experts model created by Mistral AI (a.k.a Mistral Small)",
params: {
title: "Mixtral",
model: "mistral-small",
contextLength: 4096,
},
icon: "mistral.png",
providerOptions: [
"ollama",
"lmstudio",
"together",
"llamacpp",
"replicate",
"mistral",
],
};
const mistralMedium: ModelPackage = {
title: "Mistral Medium",
description: "A highly capable model created by Mistral AI",
params: {
title: "Mistral Medium",
model: "mistral-medium",
contextLength: 4096,
},
icon: "mistral.png",
providerOptions: [
"ollama",
"lmstudio",
"together",
"llamacpp",
"replicate",
"mistral",
],
};
const gemini: ModelPackage = {
title: "Gemini Pro",
description: "A highly capable model created by Google DeepMind",
params: {
title: "Gemini Pro",
model: "gemini-pro",
contextLength: 32_000,
apiKey: "<API_KEY>",
},
icon: "gemini.png",
providerOptions: ["palm", "freetrial"],
};
const zephyr: ModelPackage = {
title: "Zephyr-Beta (7b)",
description:
"A fine-tune of Mistral, trained on publicly available and synthetic datasets.",
params: {
title: "Zephyr",
model: "zephyr-7b",
contextLength: 4096,
},
icon: "mistral.png",
providerOptions: ["ollama", "lmstudio", "llamacpp", "replicate"],
};
const deepseek: ModelPackage = {
title: "DeepSeek-Coder",
description:
"A model pre-trained on 2 trillion tokens including 80+ programming languages and a repo-level corpus.",
params: {
title: "DeepSeek-7b",
model: "deepseek-7b",
contextLength: 4096,
},
dimensions: [
{
name: "Parameter Count",
description: "The number of parameters in the model",
options: {
"1b": {
model: "deepseek-1b",
title: "DeepSeek-1b",
},
"7b": {
model: "deepseek-7b",
title: "DeepSeek-7b",
},
"33b": {
model: "deepseek-33b",
title: "DeepSeek-33b",
},
},
},
],
providerOptions: ["ollama", "lmstudio", "llamacpp"],
};
const codeup: ModelPackage = {
title: "CodeUp (13b)",
description: "An open-source coding model based on Llama2",
params: {
title: "CodeUp",
model: "codeup-13b",
contextLength: 4096,
},
providerOptions: ["ollama", "lmstudio", "llamacpp", "replicate"],
};
const neuralChat: ModelPackage = {
title: "Neural-Chat-v3-3 (7b)",
description:
"A fine-tuned 7B parameter LLM on the Intel Gaudi 2 processor from the Intel/neural-chat-7b-v3-1 on the meta-math/MetaMathQA dataset.",
params: {
title: "NeuralChat",
model: "neural-chat-7b",
contextLength: 4096,
},
providerOptions: ["ollama", "lmstudio", "llamacpp", "replicate"],
};
const osModels = [
codeLlamaInstruct,
llama2Chat,
wizardCoder,
phindCodeLlama,
mistral,
codeup,
zephyr,
neuralChat,
deepseek,
];
const gpt4turbo: ModelPackage = {
title: "GPT-4 Turbo",
description:
"A faster, cheaper version of GPT-4 with a longer context length",
params: {
model: "gpt-4-turbo-preview",
contextLength: 128_000,
title: "gpt-4-turbo-preview",
},
providerOptions: ["openai", "freetrial"],
icon: "openai.png",
};
const gpt4: ModelPackage = {
title: "GPT-4",
description: "The most powerful model from OpenAI",
params: {
model: "gpt-4",
contextLength: 8096,
title: "GPT-4",
},
providerOptions: ["openai", "freetrial"],
icon: "openai.png",
};
const gpt4vision: ModelPackage = {
title: "GPT-4 Vision",
description:
"A faster version of GPT-4 with longer context length and image support",
params: {
model: "gpt-4-vision-preview",
contextLength: 128_000,
title: "GPT-4 Vision",
},
providerOptions: ["openai", "freetrial"],
icon: "openai.png",
};
const gpt35turbo: ModelPackage = {
title: "GPT-3.5-Turbo",
description:
"A faster, cheaper OpenAI model with slightly lower capabilities",
params: {
model: "gpt-3.5-turbo",
contextLength: 8096,
title: "GPT-3.5-Turbo",
},
providerOptions: ["openai", "freetrial"],
icon: "openai.png",
};
const claude2: ModelPackage = {
title: "Claude-2",
description: "A highly capable model with a 100k context length",
params: {
model: "claude-2",
contextLength: 100000,
title: "Claude-2",
apiKey: "",
},
providerOptions: ["anthropic"],
icon: "anthropic.png",
};
const chatBison: ModelPackage = {
title: "chat-bison-001",
description:
"Google PaLM's chat-bison-001 model, fine-tuned for chatting about code",
params: {
model: "chat-bison-001",
contextLength: 8000,
apiKey: "",
title: "Chat Bison",
},
providerOptions: ["palm"],
icon: "google-palm.png",
};
const AUTODETECT: ModelPackage = {
title: "Autodetect",
description:
"Automatically populate the model list by calling the /models endpoint of the server",
params: {
model: "AUTODETECT",
} as any,
providerOptions: [],
};
export const MODEL_INFO: ModelPackage[] = [
gpt4,
gpt35turbo,
gpt4turbo,
gemini,
claude2,
mistral,
codellama70bTrial,
codeLlamaInstruct,
llama2Chat,
wizardCoder,
phindCodeLlama,
codeup,
chatBison,
zephyr,
deepseek,
];
export const PROVIDER_INFO: { [key: string]: ModelInfo } = {
openai: {
title: "OpenAI",
provider: "openai",
description: "Use gpt-4, gpt-3.5-turbo, or any other OpenAI model",
longDescription:
"Use gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.",
icon: "openai.png",
tags: [ModelProviderTag["Requires API Key"]],
packages: [
gpt4,
gpt35turbo,
gpt4turbo,
gpt4vision,
{
...AUTODETECT,
params: {
...AUTODETECT.params,
title: "OpenAI",
},
},
],
collectInputFor: [
{
inputType: CollectInputType.text,
key: "apiKey",
label: "API Key",
placeholder: "Enter your OpenAI API key",
required: true,
},
...completionParamsInputs,
],
},
anthropic: {
title: "Anthropic",
provider: "anthropic",
refPage: "anthropicllm",
description:
"Claude-2 is a highly capable model with a 100k context length",
icon: "anthropic.png",
tags: [ModelProviderTag["Requires API Key"]],
longDescription:
"To get started with Anthropic models, you first need to sign up for the open beta [here](https://claude.ai/login) to obtain an API key.",
collectInputFor: [
{
inputType: CollectInputType.text,
key: "apiKey",
label: "API Key",
placeholder: "Enter your Anthropic API key",
required: true,
},
...completionParamsInputs,
{
...contextLengthInput,
defaultValue: 100_000,
},
],
packages: [
{
title: "Claude-2",
description: "A highly capable model with a 100k context length",
params: {
model: "claude-2",
contextLength: 100000,
title: "Claude-2",
},
},
],
},
ollama: {
title: "Ollama",
provider: "ollama",
description:
"One of the fastest ways to get started with local models on Mac or Linux",
longDescription:
'To get started with Ollama, follow these steps:\n1. Download from [ollama.ai](https://ollama.ai/) and open the application\n2. Open a terminal and run `ollama pull <MODEL_NAME>`. Example model names are `codellama:7b-instruct` or `llama2:7b-text`. You can find the full list [here](https://ollama.ai/library).\n3. Make sure that the model name used in step 2 is the same as the one in config.py (e.g. `model="codellama:7b-instruct"`)\n4. Once the model has finished downloading, you can start asking questions through Continue.',
icon: "ollama.png",
tags: [ModelProviderTag["Local"], ModelProviderTag["Open-Source"]],
packages: [
{
...AUTODETECT,
params: {
...AUTODETECT.params,
title: "Ollama",
},
},
...osModels,
],
collectInputFor: [
...completionParamsInputs,
{ ...apiBaseInput, defaultValue: "http://localhost:11434" },
],
},
mistral: {
title: "Mistral API",
provider: "mistral",
description:
"The Mistral API provides hosted access to their models, including Mistral-7b, Mixtral, and the very capable mistral-medium",
icon: "mistral.png",
longDescription: `To get access to the Mistral API, obtain your API key from the [Mistral platform](https://docs.mistral.ai/)`,
tags: [
ModelProviderTag["Requires API Key"],
ModelProviderTag["Open-Source"],
],
params: {
apiKey: "",
},
collectInputFor: [
{
inputType: CollectInputType.text,
key: "apiKey",
label: "API Key",
placeholder: "Enter your Mistral API key",
required: true,
},
...completionParamsInputs,
],
packages: [mistralTiny, mistralSmall, mistralMedium].map((p) => {
p.params.contextLength = 4096;
return p;
}),
},
llamafile: {
title: "llamafile",
provider: "llamafile",
icon: "llamafile.png",
description:
"llamafiles are a self-contained binary to run an open-source LLM",
longDescription: `To get started with llamafiles, find and download a binary on their [GitHub repo](https://github.com/Mozilla-Ocho/llamafile#binary-instructions). Then run it with the following command:\n\n\`\`\`shell\nchmod +x ./llamafile\n./llamafile\n\`\`\``,
tags: [ModelProviderTag["Local"], ModelProviderTag["Open-Source"]],
packages: osModels,
collectInputFor: [...completionParamsInputs],
},
together: {
title: "TogetherAI",
provider: "together",
refPage: "togetherllm",
description:
"Use the TogetherAI API for extremely fast streaming of open-source models",
icon: "together.png",
longDescription: `Together is a hosted service that provides extremely fast streaming of open-source language models. To get started with Together:\n1. Obtain an API key from [here](https://together.ai)\n2. Paste below\n3. Select a model preset`,
tags: [
ModelProviderTag["Requires API Key"],
ModelProviderTag["Open-Source"],
],
params: {
apiKey: "",
},
collectInputFor: [
{
inputType: CollectInputType.text,
key: "apiKey",
label: "API Key",
placeholder: "Enter your TogetherAI API key",
required: true,
},
...completionParamsInputs,
],
packages: [llama2Chat, codeLlamaInstruct, mistral].map((p) => {
p.params.contextLength = 4096;
return p;
}),
},
lmstudio: {
title: "LM Studio",
provider: "lmstudio",
description:
"One of the fastest ways to get started with local models on Mac or Windows",
longDescription:
"LMStudio provides a professional and well-designed GUI for exploring, configuring, and serving LLMs. It is available on both Mac and Windows. To get started:\n1. Download from [lmstudio.ai](https://lmstudio.ai/) and open the application\n2. Search for and download the desired model from the home screen of LMStudio.\n3. In the left-bar, click the '<->' icon to open the Local Inference Server and press 'Start Server'.\n4. Once your model is loaded and the server has started, you can begin using Continue.",
icon: "lmstudio.png",
tags: [ModelProviderTag["Local"], ModelProviderTag["Open-Source"]],
params: {
apiBase: "http://localhost:1234/v1",
},
packages: [
{
...AUTODETECT,
params: {
...AUTODETECT.params,
title: "LM Studio",
},
},
...osModels,
],
collectInputFor: [...completionParamsInputs],
},
replicate: {
title: "Replicate",
provider: "replicate",
refPage: "replicatellm",
description: "Use the Replicate API to run open-source models",
longDescription: `Replicate is a hosted service that makes it easy to run ML models. To get started with Replicate:\n1. Obtain an API key from [here](https://replicate.com)\n2. Paste below\n3. Select a model preset`,
params: {
apiKey: "",
},
collectInputFor: [
{
inputType: CollectInputType.text,
key: "apiKey",
label: "API Key",
placeholder: "Enter your Replicate API key",
required: true,
},
...completionParamsInputs,
],
icon: "replicate.png",
tags: [
ModelProviderTag["Requires API Key"],
ModelProviderTag["Open-Source"],
],
packages: [codeLlamaInstruct, llama2Chat, wizardCoder, mistral, zephyr],
},
llamacpp: {
title: "llama.cpp",
provider: "llama.cpp",
refPage: "llamacpp",
description: "If you are running the llama.cpp server from source",
longDescription: `llama.cpp comes with a [built-in server](https://github.com/ggerganov/llama.cpp/tree/master/examples/server#llamacppexampleserver) that can be run from source. To do this:
1. Clone the repository with \`git clone https://github.com/ggerganov/llama.cpp\`.
2. \`cd llama.cpp\`
3. Run \`make\` to build the server.
4. Download the model you'd like to use and place it in the \`llama.cpp/models\` directory (the best place to find models is [The Bloke on HuggingFace](https://huggingface.co/TheBloke))
5. Run the llama.cpp server with the command below (replacing with the model you downloaded):
\`\`\`shell
.\\server.exe -c 4096 --host 0.0.0.0 -t 16 --mlock -m models/codellama-7b-instruct.Q8_0.gguf
\`\`\`
After it's up and running, you can start using Continue.`,
icon: "llamacpp.png",
tags: [ModelProviderTag.Local, ModelProviderTag["Open-Source"]],
packages: osModels,
collectInputFor: [...completionParamsInputs],
},
palm: {
title: "Google PaLM API",
provider: "google-palm",
refPage: "googlepalmapi",
description:
"Try out the Google PaLM API, which is currently in public preview, using an API key from Google Makersuite. Includes the Gemini Pro model",
longDescription: `To get started with Google Makersuite, obtain your API key from [here](https://makersuite.google.com) and paste it below.`,
icon: "google-palm.png",
tags: [ModelProviderTag["Requires API Key"]],
collectInputFor: [
{
inputType: CollectInputType.text,
key: "apiKey",
label: "API Key",
placeholder: "Enter your MakerSpace API key",
required: true,
},
],
packages: [
gemini,
{
title: "chat-bison-001",
description:
"Google PaLM's chat-bison-001 model, fine-tuned for chatting about code",
params: {
model: "chat-bison-001",
contextLength: 8000,
},
},
],
},
"openai-aiohttp": {
title: "Other OpenAI-compatible API",
provider: "openai",
description:
"If you are using any other OpenAI-compatible API, for example text-gen-webui, FastChat, LocalAI, or llama-cpp-python, you can simply enter your server URL",
longDescription: `If you are using any other OpenAI-compatible API, you can simply enter your server URL. If you still need to set up your model server, you can follow a guide below:
- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation)
- [LocalAI](https://localai.io/basics/getting_started/)
- [llama-cpp-python](https://github.com/continuedev/ggml-server-example)
- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md)`,
params: {
apiBase: "",
},
collectInputFor: [
{
...apiBaseInput,
defaultValue: "http://localhost:8000/v1",
},
...completionParamsInputs,
],
icon: "openai.png",
tags: [ModelProviderTag.Local, ModelProviderTag["Open-Source"]],
packages: [
{
...AUTODETECT,
params: {
...AUTODETECT.params,
title: "OpenAI",
},
},
...osModels,
],
},
freetrial: {
title: "Continue limited free trial",
provider: "free-trial",
refPage: "freetrial",
description:
"New users can try out Continue for free using a proxy server that securely makes calls to OpenAI, Google, or Together using our API key",
longDescription:
'New users can try out Continue for free using a proxy server that securely makes calls to OpenAI, Google, or Together using our API key. If you are ready to use your own API key or have used all 250 free uses, you can enter your API key in config.py where it says `apiKey=""` or select another model provider.',
icon: "openai.png",
tags: [ModelProviderTag.Free],
packages: [
codellama70bTrial,
{ ...gpt4, title: "GPT-4 (trial)" },
{ ...gpt35turbo, title: "GPT-3.5-Turbo (trial)" },
{ ...gpt4vision, title: "GPT-4 Vision (trial)" },
{ ...phindCodeLlama, title: "Phind CodeLlama (trial)" },
{ ...gemini, title: "Gemini Pro (trial)" },
{
...AUTODETECT,
params: {
...AUTODETECT.params,
title: "Free Trial",
},
},
],
collectInputFor: [...completionParamsInputs],
},
};