✨ autodetect option in UI

This commit is contained in:
Nate Sesti 2024-02-07 21:57:27 -08:00
parent 638e20b3c6
commit 310b67abdc
3 changed files with 52 additions and 111 deletions

105
gui/package-lock.json generated
View file

@ -23,7 +23,6 @@
"core": "file:../core",
"dompurify": "^3.0.6",
"downshift": "^7.6.0",
"hast-util-select": "^6.0.2",
"lodash": "^4.17.21",
"minisearch": "^6.3.0",
"onigasm": "^2.2.5",
@ -44,7 +43,6 @@
"redux-persist-transform-filter": "^0.0.22",
"rehype-highlight": "^7.0.0",
"rehype-katex": "^7.0.0",
"rehype-rewrite": "^4.0.2",
"rehype-wrap-all": "^1.1.0",
"remark-math": "^6.0.0",
"seti-file-icons": "^0.0.8",
@ -2064,15 +2062,6 @@
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"dev": true
},
"node_modules/bcp-47-match": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/bcp-47-match/-/bcp-47-match-2.0.3.tgz",
"integrity": "sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
@ -2382,21 +2371,6 @@
"node": ">=4"
}
},
"node_modules/css-selector-parser": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-3.0.4.tgz",
"integrity": "sha512-pnmS1dbKsz6KA4EW4BznyPL2xxkNDRg62hcD0v8g6DEw2W7hxOln5M953jsp9hmw5Dg57S6o/A8GOn37mbAgcQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/mdevils"
},
{
"type": "patreon",
"url": "https://patreon.com/mdevils"
}
]
},
"node_modules/css-to-react-native": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.2.0.tgz",
@ -2500,18 +2474,6 @@
"integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==",
"dev": true
},
"node_modules/direction": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/direction/-/direction-2.0.1.tgz",
"integrity": "sha512-9S6m9Sukh1cZNknO1CWAr2QAWsbKLafQiyM5gZ7VgXHeuaoUwffKN4q6NC4A/Mf9iiPlOXQEKW/Mv/mh9/3YFA==",
"bin": {
"direction": "cli.js"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/dlv": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
@ -3100,18 +3062,6 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-has-property": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/hast-util-has-property/-/hast-util-has-property-3.0.0.tgz",
"integrity": "sha512-MNilsvEKLFpV604hwfhVStK0usFY/QmM5zX16bo7EjnAEGofr5YyI37kzopBlZJkHD4t887i+q/C8/tr5Q94cA==",
"dependencies": {
"@types/hast": "^3.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-is-element": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-3.0.0.tgz",
@ -3133,33 +3083,6 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-select": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/hast-util-select/-/hast-util-select-6.0.2.tgz",
"integrity": "sha512-hT/SD/d/Meu+iobvgkffo1QecV8WeKWxwsNMzcTJsKw1cKTQKSR/7ArJeURLNJF9HDjp9nVoORyNNJxrvBye8Q==",
"dependencies": {
"@types/hast": "^3.0.0",
"@types/unist": "^3.0.0",
"bcp-47-match": "^2.0.0",
"comma-separated-tokens": "^2.0.0",
"css-selector-parser": "^3.0.0",
"devlop": "^1.0.0",
"direction": "^2.0.0",
"hast-util-has-property": "^3.0.0",
"hast-util-to-string": "^3.0.0",
"hast-util-whitespace": "^3.0.0",
"not": "^0.1.0",
"nth-check": "^2.0.0",
"property-information": "^6.0.0",
"space-separated-tokens": "^2.0.0",
"unist-util-visit": "^5.0.0",
"zwitch": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-to-jsx-runtime": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.0.tgz",
@ -3186,18 +3109,6 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-to-string": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.0.tgz",
"integrity": "sha512-OGkAxX1Ua3cbcW6EJ5pT/tslVb90uViVkcJ4ZZIMW/R33DX/AkcJcRrPebPwJkHYwlDHXz4aIwvAAaAdtrACFA==",
"dependencies": {
"@types/hast": "^3.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-to-text": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.0.tgz",
@ -5805,22 +5716,6 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/rehype-rewrite": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/rehype-rewrite/-/rehype-rewrite-4.0.2.tgz",
"integrity": "sha512-rjLJ3z6fIV11phwCqHp/KRo8xuUCO8o9bFJCNw5o6O2wlLk6g8r323aRswdGBQwfXPFYeSuZdAjp4tzo6RGqEg==",
"dependencies": {
"hast-util-select": "^6.0.0",
"unified": "^11.0.3",
"unist-util-visit": "^5.0.0"
},
"engines": {
"node": ">=16.0.0"
},
"funding": {
"url": "https://jaywcjlove.github.io/#/sponsor"
}
},
"node_modules/rehype-wrap-all": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/rehype-wrap-all/-/rehype-wrap-all-1.1.0.tgz",

View file

@ -121,9 +121,10 @@ const StyledListboxOptions = styled(Listbox.Options)`
position: absolute;
bottom: calc(100% - 16px);
max-width: 100%;
max-height: 80vh;
border-radius: ${defaultBorderRadius};
overflow: hidden;
overflow: scroll;
`;
const StyledListboxOption = styled(Listbox.Option)<{ selected: boolean }>`

View file

@ -589,7 +589,19 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = {
"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],
packages: [
gpt4,
gpt35turbo,
gpt4turbo,
gpt4vision,
{
...AUTODETECT,
params: {
...AUTODETECT.params,
title: "OpenAI",
},
},
],
collectInputFor: [
{
inputType: CollectInputType.text,
@ -646,7 +658,16 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = {
'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, ...osModels],
packages: [
{
...AUTODETECT,
params: {
...AUTODETECT.params,
title: "Ollama",
},
},
...osModels,
],
collectInputFor: [
...completionParamsInputs,
{ ...apiBaseInput, defaultValue: "http://localhost:11434" },
@ -734,7 +755,16 @@ export const PROVIDER_INFO: { [key: string]: ModelInfo } = {
params: {
apiBase: "http://localhost:1234/v1",
},
packages: [AUTODETECT, ...osModels],
packages: [
{
...AUTODETECT,
params: {
...AUTODETECT.params,
title: "LM Studio",
},
},
...osModels,
],
collectInputFor: [...completionParamsInputs],
},
replicate: {
@ -840,7 +870,16 @@ After it's up and running, you can start using Continue.`,
],
icon: "openai.png",
tags: [ModelProviderTag.Local, ModelProviderTag["Open-Source"]],
packages: [AUTODETECT, ...osModels],
packages: [
{
...AUTODETECT,
params: {
...AUTODETECT.params,
title: "OpenAI",
},
},
...osModels,
],
},
freetrial: {
title: "Continue limited free trial",
@ -859,7 +898,13 @@ After it's up and running, you can start using Continue.`,
{ ...gpt4vision, title: "GPT-4 Vision (trial)" },
{ ...phindCodeLlama, title: "Phind CodeLlama (trial)" },
{ ...gemini, title: "Gemini Pro (trial)" },
AUTODETECT,
{
...AUTODETECT,
params: {
...AUTODETECT.params,
title: "Free Trial",
},
},
],
collectInputFor: [...completionParamsInputs],
},