From 8a5f1eabc1432bdc863bd1138afbef58ce9c50e3 Mon Sep 17 00:00:00 2001 From: Peter Zaback Date: Mon, 20 Nov 2023 13:36:28 -0600 Subject: [PATCH 01/22] Fix template configuration docs (#638) --- docs/docs/customization/models.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/customization/models.md b/docs/docs/customization/models.md index f579afa6d..795e8510d 100644 --- a/docs/docs/customization/models.md +++ b/docs/docs/customization/models.md @@ -120,7 +120,7 @@ It can then be used like this: ```python title="~/.continue/config.py" def modify_config(config: ContinueConfig) -> ContinueConfig: - config.models[0].template_messages = template_alpaca_messages + config.models.default.template_messages = template_alpaca_messages return config ``` @@ -150,7 +150,7 @@ It can then be used like this in `config.py`: ```python title="~/.continue/config.py" def modify_config(config: ContinueConfig) -> ContinueConfig: - config.models[0].prompt_templates["edit"] = "" + config.models.edit.prompt_templates["edit"] = "" return config ``` From a0afbced6b47a384fb6e84065ffb6ba363a1dbf7 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 22 Nov 2023 09:29:38 -0700 Subject: [PATCH 02/22] =?UTF-8?q?=F0=9F=94=96=20update=20package.json=20ve?= =?UTF-8?q?rsion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index fafae218a..b71bbb60f 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.7.11", + "version": "0.6.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.7.11", + "version": "0.6.5", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 50e17af88..6aec52835 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.7.11", + "version": "0.6.5", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 80b80d8950064ee8fbdba9bb61b19fc64b6172ad Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 22 Nov 2023 18:23:05 +0000 Subject: [PATCH 03/22] =?UTF-8?q?ci:=20=F0=9F=8F=B7=20Update=20PyPI=20vers?= =?UTF-8?q?ion=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/pyproject.toml b/server/pyproject.toml index d971e0b7d..533860ca2 100644 --- a/server/pyproject.toml +++ b/server/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "continuedev" -version = "0.1.99" +version = "0.1.100" description = "" authors = ["Nate Sesti "] readme = "README.md" From f1a4ca81ba5172edd2448491af1dc28d9f175429 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 22 Nov 2023 18:35:05 +0000 Subject: [PATCH 04/22] =?UTF-8?q?=F0=9F=92=9A=20Update=20package.json=20ve?= =?UTF-8?q?rsion=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index b71bbb60f..22975efcd 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.6.5", + "version": "0.6.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.6.5", + "version": "0.6.6", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 6aec52835..53c7e1218 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.6.5", + "version": "0.6.6", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 2e248b93893c8b962ccb3fa274432224d11ff120 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 29 Nov 2023 18:59:28 -0800 Subject: [PATCH 05/22] =?UTF-8?q?=F0=9F=90=9B=20fix=20possible=20undefined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/src/components/modelSelection/ModelSelect.tsx | 2 +- gui/src/redux/selectors/configSelectors.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index 1a334991b..7e6517718 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -232,7 +232,7 @@ function ModelSelect(props: {}) { { - if (val === defaultModel.title) return; + if (val === defaultModel?.title) return; client?.setModelForRoleFromTitle("*", val); }} defaultValue={"GPT-4"} diff --git a/gui/src/redux/selectors/configSelectors.ts b/gui/src/redux/selectors/configSelectors.ts index e3c6226fe..3abcfd232 100644 --- a/gui/src/redux/selectors/configSelectors.ts +++ b/gui/src/redux/selectors/configSelectors.ts @@ -14,5 +14,7 @@ export const contextLengthSelector = (state: RootStore) => { export const defaultModelSelector = (state: RootStore) => { const title = state.serverState.config.model_roles?.default; - return state.serverState.config.models.find((model) => model.title === title); + return state.serverState.config.models?.find( + (model) => model.title === title + ); }; From 261f2d6e3dc2bef93debdcd0ddfa1ebe1c49a19d Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 30 Nov 2023 03:00:37 +0000 Subject: [PATCH 06/22] =?UTF-8?q?ci:=20=F0=9F=8F=B7=20Update=20PyPI=20vers?= =?UTF-8?q?ion=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/pyproject.toml b/server/pyproject.toml index f117ce517..57f05a396 100644 --- a/server/pyproject.toml +++ b/server/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "continuedev" -version = "0.1.100" +version = "0.1.101" description = "" authors = ["Nate Sesti "] readme = "README.md" From 07675122c8d29c892f1e6dd4639e6568c0276788 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 30 Nov 2023 03:13:18 +0000 Subject: [PATCH 07/22] =?UTF-8?q?=F0=9F=92=9A=20Update=20package.json=20ve?= =?UTF-8?q?rsion=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 22975efcd..88a50a43d 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.6.6", + "version": "0.6.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.6.6", + "version": "0.6.7", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 53c7e1218..5947a5a91 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.6.6", + "version": "0.6.7", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 1a8eda9798994ede32faac79b6e21b6cba499f52 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 30 Nov 2023 16:14:23 -0800 Subject: [PATCH 08/22] =?UTF-8?q?=F0=9F=94=96=20set=20preview=20to=20pre-r?= =?UTF-8?q?elease=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 88a50a43d..5c8ec0cc2 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.6.7", + "version": "0.7.19", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.6.7", + "version": "0.7.19", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 5947a5a91..a3a20309c 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.6.7", + "version": "0.7.19", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 8dd0453d61b7b305f2141e2357398d88bb03fc88 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 30 Nov 2023 17:21:53 -0800 Subject: [PATCH 09/22] =?UTF-8?q?=E2=9C=A8=20support=20for=20llamafiles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/docs/customization/models.md | 1 + .../Context Providers/filecontextprovider.md | 2 +- docs/docs/reference/Models/llamafile.md | 36 +++++++ extensions/vscode/config_schema.json | 28 +++++- .../continuedev/core/config_utils/shared.py | 3 + server/continuedev/core/models.py | 5 +- server/continuedev/libs/llm/llamafile.py | 93 +++++++++++++++++++ server/continuedev/libs/llm/ollama.py | 3 + .../continuedev/models/reference/generate.py | 1 + 9 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 docs/docs/reference/Models/llamafile.md create mode 100644 server/continuedev/libs/llm/llamafile.py diff --git a/docs/docs/customization/models.md b/docs/docs/customization/models.md index 795e8510d..aa1f286b7 100644 --- a/docs/docs/customization/models.md +++ b/docs/docs/customization/models.md @@ -21,6 +21,7 @@ Local Models - [OpenAI](../reference/Models/openai.md) - If you have access to an OpenAI-compatible server (e.g. llama-cpp-python, LocalAI, FastChat, TextGenWebUI, etc.), you can use the `OpenAI` class and just change the base URL. - [GGML](../reference/Models/ggml.md) - An alternative way to connect to OpenAI-compatible servers. Will use `aiohttp` directly instead of the `openai` Python package. - [LlamaCpp](../reference/Models/llamacpp.md) - Build llama.cpp from source and use its built-in API server. +- [Llamafile](../reference/Models/llamafile.md) - Use a self-contained llamafile Open-Source Models (not local) diff --git a/docs/docs/reference/Context Providers/filecontextprovider.md b/docs/docs/reference/Context Providers/filecontextprovider.md index f89fef58b..289ad7b76 100644 --- a/docs/docs/reference/Context Providers/filecontextprovider.md +++ b/docs/docs/reference/Context Providers/filecontextprovider.md @@ -15,6 +15,6 @@ The FileContextProvider is a ContextProvider that allows you to search files in - + diff --git a/docs/docs/reference/Models/llamafile.md b/docs/docs/reference/Models/llamafile.md new file mode 100644 index 000000000..3991b8f48 --- /dev/null +++ b/docs/docs/reference/Models/llamafile.md @@ -0,0 +1,36 @@ +import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; + +# Llamafile + +A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contained binary that can run an open-source LLM. You can configure this provider in your config.json as follows: + +```json title="~/.continue/config.json" +{ + "models": [{ + "title": "Llamafile", + "provider": "llamafile", + "model": "mistral-7b", + }] +} +``` + +[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/llamafile.py) + +## Properties + + + + + +### Inherited Properties + + + + + + + + + + + diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 6f77b4d18..50efe8964 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -107,7 +107,8 @@ "replicate", "text-gen-webui", "google-palm", - "lmstudio" + "lmstudio", + "llamafile" ], "type": "string" }, @@ -460,7 +461,8 @@ "huggingface-tgi", "huggingface-inference-api", "llama.cpp", - "text-gen-webui" + "text-gen-webui", + "llamafile" ] } }, @@ -514,7 +516,10 @@ "wizardcoder-13b", "wizardcoder-34b", "zephyr-7b", - "codeup-13b" + "codeup-13b", + "deepseek-1b", + "deepseek-7b", + "deepseek-33b" ] } } @@ -550,6 +555,23 @@ } } }, + { + "if": { + "properties": { + "provider": { + "const": "llamafile" + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "llamafile_command": { + "type": "string" + } + } + } + }, { "if": { "properties": { diff --git a/server/continuedev/core/config_utils/shared.py b/server/continuedev/core/config_utils/shared.py index f5931e4d6..c65a35435 100644 --- a/server/continuedev/core/config_utils/shared.py +++ b/server/continuedev/core/config_utils/shared.py @@ -118,6 +118,7 @@ ModelProvider = Literal[ "text-gen-webui", "google-palm", "lmstudio", + "llamafile", ] MODEL_PROVIDER_TO_MODEL_CLASS = { @@ -134,6 +135,7 @@ MODEL_PROVIDER_TO_MODEL_CLASS = { "text-gen-webui": "TextGenWebUI", "google-palm": "GooglePaLMAPI", "lmstudio": "LMStudio", + "llamafile": "Llamafile", } MODEL_CLASS_TO_MODEL_PROVIDER: Dict[str, ModelProvider] = { @@ -149,6 +151,7 @@ MODEL_CLASS_TO_MODEL_PROVIDER: Dict[str, ModelProvider] = { "TextGenWebUI": "text-gen-webui", "GooglePaLMAPI": "google-palm", "LMStudio": "lmstudio", + "Llamafile": "llamafile", } MODELS = [ diff --git a/server/continuedev/core/models.py b/server/continuedev/core/models.py index 74f5a838b..36587a047 100644 --- a/server/continuedev/core/models.py +++ b/server/continuedev/core/models.py @@ -1,7 +1,7 @@ import uuid from typing import Any, Callable, Dict, List, Optional, Type -from pydantic import BaseModel, Field, validator +from pydantic import BaseModel, validator from ..libs.llm.anthropic import AnthropicLLM from ..libs.llm.base import LLM @@ -10,6 +10,7 @@ from ..libs.llm.google_palm_api import GooglePaLMAPI from ..libs.llm.hf_inference_api import HuggingFaceInferenceAPI from ..libs.llm.hf_tgi import HuggingFaceTGI from ..libs.llm.llamacpp import LlamaCpp +from ..libs.llm.llamafile import Llamafile from ..libs.llm.lmstudio import LMStudio from ..libs.llm.ollama import Ollama from ..libs.llm.openai import OpenAI @@ -46,6 +47,7 @@ MODEL_CLASSES: Dict[str, Type[LLM]] = { GooglePaLMAPI, TextGenWebUI, LMStudio, + Llamafile, ] } @@ -63,6 +65,7 @@ MODEL_MODULE_NAMES = { "GooglePaLMAPI": "google_palm_api", "TextGenWebUI": "text_gen_webui", "LMStudio": "lmstudio", + "Llamafile": "llamafile", } diff --git a/server/continuedev/libs/llm/llamafile.py b/server/continuedev/libs/llm/llamafile.py new file mode 100644 index 000000000..89cad006e --- /dev/null +++ b/server/continuedev/libs/llm/llamafile.py @@ -0,0 +1,93 @@ +import asyncio +import socket +import subprocess +from typing import Any, AsyncGenerator, Coroutine, List, Optional + +from continuedev.core.main import ChatMessage +from continuedev.models.llm import CompletionOptions + +from .llamacpp import LlamaCpp + + +def test_port(PORT): + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + try: + s.bind(("", PORT)) ## Try to open port + except OSError as e: + if e.errno == 98: ## Errorno 98 means address already bound + return True + elif e.errno == 48: ## Errorno 48 means address already in use + return True + return False + s.close() + return False + + +STARTUP_DELAY = 3.0 + + +class Llamafile(LlamaCpp): + """ + A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contained binary that can run an open-source LLM. You can configure this provider in your config.json as follows: + + ```json title="~/.continue/config.json" + { + "models": [{ + "title": "Llamafile", + "provider": "llamafile", + "model": "mistral-7b", + }] + } + ``` + + Optionally, you can set the `llamafile_command` property, which will be run to start the llamafile if it isn't already running on port 8080. Be sure to use an absolute path to the llamafile binary. For example: `/Users/yourusername/mistral-7b-instruct-v0.1-Q4_K_M-server.llamafile`. + """ + + llamafile_command: Optional[str] = None + + def check_and_start(self) -> bool: + # Try to start the llamafile if it's not already started on port 8080 + if not self.llamafile_command: + return False + + port = int((self.api_base or ":8080").split(":")[-1]) + + if not test_port(port): + subprocess.Popen( + self.llamafile_command.split(" "), + stdout=subprocess.DEVNULL, + stderr=subprocess.STDOUT, + close_fds=True, + start_new_session=True, + shell=True, + ) + + return True + + return False + + def start(self, unique_id: str | None = None): + super().start(unique_id) + self.check_and_start() + + async def _stream_chat( + self, messages: List[ChatMessage], options: CompletionOptions + ): + if self.check_and_start(): + await asyncio.sleep(STARTUP_DELAY) + + async for message in super()._stream_chat(messages, options): + yield message + + async def _stream_complete(self, prompt, options): + if self.check_and_start(): + await asyncio.sleep(STARTUP_DELAY) + + async for message in super()._stream_complete(prompt, options): + yield message + + async def _complete(self, prompt: str, options: CompletionOptions): + if self.check_and_start(): + await asyncio.sleep(STARTUP_DELAY) + + return await super()._complete(prompt, options) diff --git a/server/continuedev/libs/llm/ollama.py b/server/continuedev/libs/llm/ollama.py index 61aba2873..886783126 100644 --- a/server/continuedev/libs/llm/ollama.py +++ b/server/continuedev/libs/llm/ollama.py @@ -60,6 +60,9 @@ class Ollama(LLM): "wizardcoder-34b": "wizardcoder:34b-python", "zephyr-7b": "zephyr:7b", "codeup-13b": "codeup:13b", + "deepseek-1b": "deepseek-coder:1.3b", + "deepseek-7b": "deepseek-coder:6.7b", + "deepseek-33b": "deepseek-coder:33b", }.get(self.model, self.model) def start(self, *args, **kwargs): diff --git a/server/continuedev/models/reference/generate.py b/server/continuedev/models/reference/generate.py index 792526ad5..b8e6677dc 100644 --- a/server/continuedev/models/reference/generate.py +++ b/server/continuedev/models/reference/generate.py @@ -17,6 +17,7 @@ LLM_MODULES = [ ("openai_free_trial", "OpenAIFreeTrial"), ("google_palm_api", "GooglePaLMAPI"), ("queued", "QueuedLLM"), + ("llamafile", "Llamafile"), ] CONTEXT_PROVIDER_MODULES = [ From 16db808cff7a973d5f255d746f73afe881e46050 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 30 Nov 2023 17:31:14 -0800 Subject: [PATCH 10/22] =?UTF-8?q?=E2=9C=A8=20update=20modelData.ts=20with?= =?UTF-8?q?=20llamafile=20info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/schema/ContinueConfig.d.ts | 3 ++- extensions/vscode/schema/ModelDescription.d.ts | 3 ++- extensions/vscode/schema/ModelProvider.d.ts | 3 ++- .../vscode/schema/SerializedContinueConfig.d.ts | 3 ++- gui/public/logos/llamafile.png | Bin 0 -> 50579 bytes gui/src/schema/ContinueConfig.d.ts | 3 ++- gui/src/schema/ModelDescription.d.ts | 3 ++- gui/src/schema/ModelProvider.d.ts | 3 ++- gui/src/schema/SerializedContinueConfig.d.ts | 3 ++- gui/src/util/modelData.ts | 11 +++++++++++ schema/json/ContinueConfig.json | 3 ++- schema/json/ModelDescription.json | 3 ++- schema/json/ModelProvider.json | 3 ++- schema/json/SerializedContinueConfig.json | 3 ++- 14 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 gui/public/logos/llamafile.png diff --git a/extensions/vscode/schema/ContinueConfig.d.ts b/extensions/vscode/schema/ContinueConfig.d.ts index 694458fbd..48f7e28fc 100644 --- a/extensions/vscode/schema/ContinueConfig.d.ts +++ b/extensions/vscode/schema/ContinueConfig.d.ts @@ -51,7 +51,8 @@ export type Provider = | "replicate" | "text-gen-webui" | "google-palm" - | "lmstudio"; + | "lmstudio" + | "llamafile"; /** * The name of the model. Used to autodetect prompt template. */ diff --git a/extensions/vscode/schema/ModelDescription.d.ts b/extensions/vscode/schema/ModelDescription.d.ts index 2602a8cb3..7b30ae8ba 100644 --- a/extensions/vscode/schema/ModelDescription.d.ts +++ b/extensions/vscode/schema/ModelDescription.d.ts @@ -26,7 +26,8 @@ export type Provider = | "replicate" | "text-gen-webui" | "google-palm" - | "lmstudio"; + | "lmstudio" + | "llamafile"; /** * The name of the model. Used to autodetect prompt template. */ diff --git a/extensions/vscode/schema/ModelProvider.d.ts b/extensions/vscode/schema/ModelProvider.d.ts index e1fb74eba..10d71a774 100644 --- a/extensions/vscode/schema/ModelProvider.d.ts +++ b/extensions/vscode/schema/ModelProvider.d.ts @@ -18,4 +18,5 @@ export type ModelProvider = | "replicate" | "text-gen-webui" | "google-palm" - | "lmstudio"; + | "lmstudio" + | "llamafile"; diff --git a/extensions/vscode/schema/SerializedContinueConfig.d.ts b/extensions/vscode/schema/SerializedContinueConfig.d.ts index b5fff520b..c366a4905 100644 --- a/extensions/vscode/schema/SerializedContinueConfig.d.ts +++ b/extensions/vscode/schema/SerializedContinueConfig.d.ts @@ -34,7 +34,8 @@ export type Provider = | "replicate" | "text-gen-webui" | "google-palm" - | "lmstudio"; + | "lmstudio" + | "llamafile"; /** * The name of the model. Used to autodetect prompt template. */ diff --git a/gui/public/logos/llamafile.png b/gui/public/logos/llamafile.png new file mode 100644 index 0000000000000000000000000000000000000000..98863d8901796866269ebb9a923cc90f749a2ebb GIT binary patch literal 50579 zcmZ5nV{|4w({AtDw%e_Zt+uvp+qP}n*4DOd+qP|d`}};rGbhR4WUdTy%_Lk-MidSj z8yW}*2u@r~Na5f5{@;KE|2KzSYH$Mq4QYrA@hiElUoP+i0};Xk1}BwA1(P?*jr51bl#nf<3`U!(O2y z;ccgP*su_h(X|_Dc}aBy4YtyAASWVsA8v_%A6|b|uE0dV;Qyc)8ZxAv*4@ornarf2 zer>jp<8>tIrks>UqI}qi_>bb!tXh4T!)7M`yzc^a~)O<45Gh z5x#=I_HRw#(b>@1*|`K&bra2$7%MrMV_^s zpkj^xdTGdfUXTr0?OVt`7J3AmZ zSLFCK)JRkv;_IT4xF;h{S;-S3k_-52?ool}U0_g-AT1t;hlY6Fw7`G@E!0%>yvlmW zqoDG2g~hOOd6F`rszzu5b=pBDqF>NNMbL~!R8WUhlq}%CvE?9ujNmocDV!bLJla~u zudlDUuGt2M^%&;9K)fL;)w&mtW=5NI3BBI-EKk?oBp!A(*9(!Zpdb{L#rZ~9wr~==R|GlS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cVhH`yI1-i1LU`3+g6?;EFZOQ7GcF^4~Guz!*s%q;l_>|m2I>0P@soas1!J`^ZNhA z27vO*GjZZ))!s)!wrS&flS&sYu=QLUz@J$)YE(15a6_Gl`wgf*>ie~_U^;&4I6)n& z1{^S2rUIh+I(L{=wxRgUQ>J@Y#%w6TMn@krT!4$Vo7Y||r+ Date: Thu, 30 Nov 2023 17:32:23 -0800 Subject: [PATCH 11/22] =?UTF-8?q?=F0=9F=90=9B=20fix=20color=20on=20config.?= =?UTF-8?q?json=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gui/src/pages/settings.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/src/pages/settings.tsx b/gui/src/pages/settings.tsx index bf4a4ee19..ad1eebde3 100644 --- a/gui/src/pages/settings.tsx +++ b/gui/src/pages/settings.tsx @@ -11,6 +11,7 @@ import { lightGray, secondaryDark, vscBackground, + vscForeground, } from "../components"; import styled from "styled-components"; import { ArrowLeftIcon } from "@heroicons/react/24/outline"; @@ -85,7 +86,7 @@ const ConfigJsonButton = styled(Button)` margin-left: auto; margin-right: 4px; background-color: transparent; - color: white; + color: ${vscForeground}; border: 1px solid ${lightGray}; &:hover { background-color: ${lightGray}; From c699e619e2c73a8818672d9c6821275acb1f90a7 Mon Sep 17 00:00:00 2001 From: Ty Dunn Date: Thu, 30 Nov 2023 17:48:04 -0800 Subject: [PATCH 12/22] make model docs more accessible (#644) * make model docs more accessible * making build pass --- docs/docs/customization/overview.md | 4 +- .../configuration.md} | 34 +++--------- docs/docs/model-setup/select-model.md | 45 ++++++++++++++++ docs/docs/model-setup/select-provider.md | 53 +++++++++++++++++++ .../anthropicllm.md | 0 .../{Models => Model Providers}/ggml.md | 0 .../googlepalmapi.md | 0 .../huggingfaceinferenceapi.md | 0 .../huggingfacetgi.md | 0 .../{Models => Model Providers}/llamacpp.md | 0 .../{Models => Model Providers}/ollama.md | 0 .../{Models => Model Providers}/openai.md | 0 .../openaifreetrial.md | 0 .../{Models => Model Providers}/queuedllm.md | 0 .../replicatellm.md | 0 .../textgenwebui.md | 0 .../togetherllm.md | 0 .../running-continue-without-internet.md | 2 +- docs/sidebars.js | 12 ++++- server/continuedev/libs/llm/ggml.py | 2 + server/continuedev/libs/llm/openai.py | 44 +++++++++++---- 21 files changed, 154 insertions(+), 42 deletions(-) rename docs/docs/{customization/models.md => model-setup/configuration.md} (68%) create mode 100644 docs/docs/model-setup/select-model.md create mode 100644 docs/docs/model-setup/select-provider.md rename docs/docs/reference/{Models => Model Providers}/anthropicllm.md (100%) rename docs/docs/reference/{Models => Model Providers}/ggml.md (100%) rename docs/docs/reference/{Models => Model Providers}/googlepalmapi.md (100%) rename docs/docs/reference/{Models => Model Providers}/huggingfaceinferenceapi.md (100%) rename docs/docs/reference/{Models => Model Providers}/huggingfacetgi.md (100%) rename docs/docs/reference/{Models => Model Providers}/llamacpp.md (100%) rename docs/docs/reference/{Models => Model Providers}/ollama.md (100%) rename docs/docs/reference/{Models => Model Providers}/openai.md (100%) rename docs/docs/reference/{Models => Model Providers}/openaifreetrial.md (100%) rename docs/docs/reference/{Models => Model Providers}/queuedllm.md (100%) rename docs/docs/reference/{Models => Model Providers}/replicatellm.md (100%) rename docs/docs/reference/{Models => Model Providers}/textgenwebui.md (100%) rename docs/docs/reference/{Models => Model Providers}/togetherllm.md (100%) diff --git a/docs/docs/customization/overview.md b/docs/docs/customization/overview.md index f87cbc286..c81e4fc89 100644 --- a/docs/docs/customization/overview.md +++ b/docs/docs/customization/overview.md @@ -10,7 +10,7 @@ Continue can be deeply customized by editing `~/.continue/config.json` (`%userpr Currently, you can customize the following: -- [Models](./models.md) - Use Continue with any LLM, including local models, Azure OpenAI service, any OpenAI-compatible API, and more. +- [Models](../model-setup/select-model.md) and [proivders](../model-setup/select-provider.md) - [Context Providers](./context-providers.md) - Just type '@' to easily add attachments to your prompt. Define which sources you want to easily reference, including GitHub Issues, terminal output, and preset URLs. - [Slash Commands](./slash-commands.md) - Call custom prompts or programs written with our SDK by typing `/`. -- [Other Configuration](./other-configuration.md) - Configure other settings like the system message and temperature. +- [Other Configuration](./other-configuration.md) - Configure other settings like the system message and temperature. \ No newline at end of file diff --git a/docs/docs/customization/models.md b/docs/docs/model-setup/configuration.md similarity index 68% rename from docs/docs/customization/models.md rename to docs/docs/model-setup/configuration.md index 795e8510d..5652fa6bf 100644 --- a/docs/docs/customization/models.md +++ b/docs/docs/model-setup/configuration.md @@ -1,32 +1,10 @@ --- -title: Models -description: Swap out different LLM providers -keywords: [openai, anthropic, PaLM, ollama, ggml] +title: Configuration +description: Configure your LLM and model provider +keywords: [configure, llm, provider] --- -# Models - -Continue makes it easy to swap out different LLM providers. You can either click the "+" button next to the model dropdown to configure in the UI or manually add them to your `config.json`. Once you've done this, you will be able to switch between them with the model selection dropdown. - -Commercial Models - -- [OpenAIFreeTrial](../reference/Models/openaifreetrial.md) (default) - Use gpt-4 or gpt-3.5-turbo free with our API key, or with your API key. gpt-4 is probably the most capable model of all options. -- [OpenAI](../reference/Models/openai.md) - Use any OpenAI model with your own key. Can also change the base URL if you have a server that uses the OpenAI API format, including using the Azure OpenAI service, LocalAI, etc. -- [AnthropicLLM](../reference/Models/anthropicllm.md) - Use claude-2 with your Anthropic API key. Claude 2 is also highly capable, and has a 100,000 token context window. -- [GooglePaLMAPI](../reference/Models/googlepalmapi.md) - Try out the `chat-bison-001` model, which is currently in public preview, after creating an API key in [Google MakerSuite](https://makersuite.google.com/u/2/app/apikey) - -Local Models - -- [Ollama](../reference/Models/ollama.md) - If you are on Mac or Linux, Ollama is the simplest way to run open-source models like Code Llama. -- [OpenAI](../reference/Models/openai.md) - If you have access to an OpenAI-compatible server (e.g. llama-cpp-python, LocalAI, FastChat, TextGenWebUI, etc.), you can use the `OpenAI` class and just change the base URL. -- [GGML](../reference/Models/ggml.md) - An alternative way to connect to OpenAI-compatible servers. Will use `aiohttp` directly instead of the `openai` Python package. -- [LlamaCpp](../reference/Models/llamacpp.md) - Build llama.cpp from source and use its built-in API server. - -Open-Source Models (not local) - -- [TogetherLLM](../reference/Models/togetherllm.md) - Use any model from the [Together Models list](https://docs.together.ai/docs/inference-models) with your Together API key. -- [ReplicateLLM](../reference/Models/replicatellm.md) - Use any open-source model from the [Replicate Streaming List](https://replicate.com/collections/streaming-language-models) with your Replicate API key. -- [HuggingFaceInferenceAPI](../reference/Models/huggingfaceinferenceapi.md) - Use any open-source model from the [Hugging Face Inference API](https://huggingface.co/inference-api) with your Hugging Face token. +# Configuration ## Change the default LLM @@ -97,7 +75,7 @@ If by chance the provider has the exact same API interface as OpenAI, the `OpenA Most open-source models expect a specific chat format, for example llama2 and codellama expect the input to look like `"[INST] How do I write bubble sort in Rust? [/INST]"`. Continue will automatically attempt to detect the correct prompt format based on the `model`value that you provide, but if you are receiving nonsense responses, you can use the`template`property to explicitly set the format that you expect. The options are:`["llama2", "alpaca", "zephyr", "phind", "anthropic", "chatml"]`. -If you want to create an entirely new chat template, this can be done in [config.py](./code-config.md) by defining a function and adding it to the `template_messages` property of your `LLM`. Here is an example of `template_messages` for the Alpaca/Vicuna format: +If you want to create an entirely new chat template, this can be done in [config.py](../customization/code-config.md) by defining a function and adding it to the `template_messages` property of your `LLM`. Here is an example of `template_messages` for the Alpaca/Vicuna format: ```python def template_alpaca_messages(msgs: List[Dict[str, str]]) -> str: @@ -154,4 +132,4 @@ def modify_config(config: ContinueConfig) -> ContinueConfig: return config ``` -A few pre-made templates are available in [`continuedev.libs.llm.prompts.edit`](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/prompts/edit.py). +A few pre-made templates are available in [`continuedev.libs.llm.prompts.edit`](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/prompts/edit.py). \ No newline at end of file diff --git a/docs/docs/model-setup/select-model.md b/docs/docs/model-setup/select-model.md new file mode 100644 index 000000000..e1aca5ad6 --- /dev/null +++ b/docs/docs/model-setup/select-model.md @@ -0,0 +1,45 @@ +--- +title: Select model +description: Swap out different LLMs +keywords: [gpt-4, codellama, claude-2, wizardcoder, wizardcoder] +--- + +# Select a Large Language Model + +Continue makes it easy to swap out different LLMs. You can either click the "+" button next to the model dropdown to configure in the GUI or manually add them to your `config.json`. Once you've done this, you will be able to switch between them in the model selection dropdown. + +**In addition to selecting a LLM, you will need to figure out [what model provider to use](./select-provider.md).** + +## Open-source LLMs + +Models available for configuration in the GUI: +- [Code Llama-Instruct-7B](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#1-code-llama) +- [Code Llama-Instruct-13B](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#1-code-llama) +- [Code Llama-Instruct-34B](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#1-code-llama) +- [WizardCoder-7B](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#2-wizardcoder) +- [WizardCoder-13B](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#2-wizardcoder) +- [WizardCoder-34B](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#2-wizardcoder) +- [Phind-CodeLlama-34B](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#3-phind-codellama) +- [Mistral-Instruct-7B](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#4-mistral) +- [StarCoder-15B](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#5-starcoder) +- [Deepseek-Coder-1.3b-Instruct](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#6-deepseek-coder) +- [Deepseek-Coder-6.7b-Instruct](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#6-deepseek-coder) +- [Deepseek-Coder-33b-Instruct](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#6-deepseek-coder) +- [Llama2-Chat-7B](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#7-llama2) +- [Llama2-Chat-13B](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#7-llama2) +- [Llama2-Chat-70B](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#7-llama2) +- [CodeUp-13B](https://huggingface.co/deepse/CodeUp-Llama-2-13b-chat-hf) +- [Zephyr-7B](https://huggingface.co/huggingfaceh4/zephyr-7b-beta) + +**You can also use other open-source models**, but you will need to manually add them to your `config.json`. + +## Commercial LLMs + +Models available for configuration in the GUI: +- [GPT-4](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#1-gpt-4) +- [GPT-4-Turbo](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#2-gpt-4-turbo) +- [GPT-3.5-Turbo](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#3-gpt-35-turbo) +- [Claude-2](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#4-claude-2) +- [PaLM-2](https://github.com/continuedev/what-llm-to-use/blob/main/README.md#5-palm-2) + +**You can also use other commercial models**, but you will need to manually add them to your `config.json`. \ No newline at end of file diff --git a/docs/docs/model-setup/select-provider.md b/docs/docs/model-setup/select-provider.md new file mode 100644 index 000000000..bc7e97979 --- /dev/null +++ b/docs/docs/model-setup/select-provider.md @@ -0,0 +1,53 @@ +--- +title: Select a provider +description: Swap out different LLM providers +keywords: [openai, anthropic, PaLM, ollama, ggml] +--- + +# Select a model provider + +Continue makes it easy to swap out different LLM providers. You can either click the "+" button next to the model dropdown to configure in the GUI or manually add them to your `config.json`. Once you've done this, you will be able to switch between them in the model selection dropdown. + +**In addition to selecting a model provider, you will need to figure out [what LLM to use](./select-model.md).** + +## Local + +You can run a model on your local computer using: +- [Ollama](../reference/Model%20Providers/ollama.md) +- [LM Studio](../reference/Model%20Providers/ggml.md) +- [Llama.cpp](../reference/Model%20Providers/llamacpp.md) +- [LocalAI](../reference/Model%20Providers/openai.md) (OpenAI compatible server) +- [Text generation web UI](../reference/Model%20Providers/openai.md) (OpenAI compatible server) +- [FastChat](../reference/Model%20Providers/openai.md) (OpenAI compatible server) +- [llama-cpp-python](../reference/Model%20Providers/openai.md) (OpenAI compatible server) + +Once you have it running, you will need to configure it in the GUI or manually add it to your `config.json`. + +## Cloud + +You can deploy a model in your [AWS](https://github.com/continuedev/deploy-os-code-llm#aws), [GCP](https://github.com/continuedev/deploy-os-code-llm#gcp), [Azure](https://github.com/continuedev/deploy-os-code-llm#azure), or [other clouds](https://github.com/continuedev/deploy-os-code-llm#others-2) using: +- [HuggingFace TGI](https://github.com/continuedev/deploy-os-code-llm#tgi) +- [vLLM](https://github.com/continuedev/deploy-os-code-llm#vllm) +- [SkyPilot](https://github.com/continuedev/deploy-os-code-llm#skypilot) +- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) (OpenAI compatible API) + +Once you have it deloyed, you will need to wire up a new LLM class and manually add it to your `config.json`. This requires you to implement the `stream_complete`, `complete`, and `stream_chat` methods. You can see examples in [`server/continuedev/libs/llm`](https://github.com/continuedev/continue/tree/main/server/continuedev/libs/llm). However, if the provider has the exact same API interface as OpenAI, the `OpenAI` class will work for you. You will just need to change the `api_base` parameter. + +## SaaS + +### Open-source LLMs + +You can deploy open-source LLMs on a service using: +- [Together](../reference/Model%20Providers/togetherllm.md) +- [HuggingFace Inference Endpoints](../reference/Model%20Providers/huggingfaceinferenceapi.md) +- [Anyscale Endpoints](../reference/Model%20Providers/openai.md) (OpenAI compatible API) +- [Replicate](../reference/Model%20Providers/replicatellm.md) + +### Commercial LLMs + +You can use commercial LLMs via APIs using: +- [OpenAI API](../reference/Model%20Providers/openai.md) +- [Azure OpenAI Service](../reference/Model%20Providers/openai.md) (OpenAI compatible API) +- [Anthrophic API](../reference/Model%20Providers/anthropicllm.md) +- [Google PaLM API](../reference/Model%20Providers/googlepalmapi.md) +- [OpenAI free trial](../reference/Model%20Providers/openaifreetrial.md) \ No newline at end of file diff --git a/docs/docs/reference/Models/anthropicllm.md b/docs/docs/reference/Model Providers/anthropicllm.md similarity index 100% rename from docs/docs/reference/Models/anthropicllm.md rename to docs/docs/reference/Model Providers/anthropicllm.md diff --git a/docs/docs/reference/Models/ggml.md b/docs/docs/reference/Model Providers/ggml.md similarity index 100% rename from docs/docs/reference/Models/ggml.md rename to docs/docs/reference/Model Providers/ggml.md diff --git a/docs/docs/reference/Models/googlepalmapi.md b/docs/docs/reference/Model Providers/googlepalmapi.md similarity index 100% rename from docs/docs/reference/Models/googlepalmapi.md rename to docs/docs/reference/Model Providers/googlepalmapi.md diff --git a/docs/docs/reference/Models/huggingfaceinferenceapi.md b/docs/docs/reference/Model Providers/huggingfaceinferenceapi.md similarity index 100% rename from docs/docs/reference/Models/huggingfaceinferenceapi.md rename to docs/docs/reference/Model Providers/huggingfaceinferenceapi.md diff --git a/docs/docs/reference/Models/huggingfacetgi.md b/docs/docs/reference/Model Providers/huggingfacetgi.md similarity index 100% rename from docs/docs/reference/Models/huggingfacetgi.md rename to docs/docs/reference/Model Providers/huggingfacetgi.md diff --git a/docs/docs/reference/Models/llamacpp.md b/docs/docs/reference/Model Providers/llamacpp.md similarity index 100% rename from docs/docs/reference/Models/llamacpp.md rename to docs/docs/reference/Model Providers/llamacpp.md diff --git a/docs/docs/reference/Models/ollama.md b/docs/docs/reference/Model Providers/ollama.md similarity index 100% rename from docs/docs/reference/Models/ollama.md rename to docs/docs/reference/Model Providers/ollama.md diff --git a/docs/docs/reference/Models/openai.md b/docs/docs/reference/Model Providers/openai.md similarity index 100% rename from docs/docs/reference/Models/openai.md rename to docs/docs/reference/Model Providers/openai.md diff --git a/docs/docs/reference/Models/openaifreetrial.md b/docs/docs/reference/Model Providers/openaifreetrial.md similarity index 100% rename from docs/docs/reference/Models/openaifreetrial.md rename to docs/docs/reference/Model Providers/openaifreetrial.md diff --git a/docs/docs/reference/Models/queuedllm.md b/docs/docs/reference/Model Providers/queuedllm.md similarity index 100% rename from docs/docs/reference/Models/queuedllm.md rename to docs/docs/reference/Model Providers/queuedllm.md diff --git a/docs/docs/reference/Models/replicatellm.md b/docs/docs/reference/Model Providers/replicatellm.md similarity index 100% rename from docs/docs/reference/Models/replicatellm.md rename to docs/docs/reference/Model Providers/replicatellm.md diff --git a/docs/docs/reference/Models/textgenwebui.md b/docs/docs/reference/Model Providers/textgenwebui.md similarity index 100% rename from docs/docs/reference/Models/textgenwebui.md rename to docs/docs/reference/Model Providers/textgenwebui.md diff --git a/docs/docs/reference/Models/togetherllm.md b/docs/docs/reference/Model Providers/togetherllm.md similarity index 100% rename from docs/docs/reference/Models/togetherllm.md rename to docs/docs/reference/Model Providers/togetherllm.md diff --git a/docs/docs/walkthroughs/running-continue-without-internet.md b/docs/docs/walkthroughs/running-continue-without-internet.md index 16d1cbe83..4775e7d0b 100644 --- a/docs/docs/walkthroughs/running-continue-without-internet.md +++ b/docs/docs/walkthroughs/running-continue-without-internet.md @@ -12,5 +12,5 @@ Continue can be run even on an air-gapped computer if you use a local model. You 2. In VS Code settings, search "continue" and check the box that says "Manually Running Server". This will stop Continue from trying to kill and redownload the server binary. 3. Follow instructions to [run Continue manually](./manually-run-continue.md). 4. Open `~/.continue/config.json` and set `"allow_anonymous_telemetry": false`. This will stop Continue from attempting requests to PostHog. -5. Also in `config.json`, set the default model to a local model. You can read about the available options [here](../customization/models.md). +5. Also in `config.json`, set the default model to a local model. You can read about the available options [here](../model-setup/select-model.md). 6. Restart VS Code to ensure that the changes to `config.json` take effect. diff --git a/docs/sidebars.js b/docs/sidebars.js index ed27521ae..bfd360c27 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -18,6 +18,17 @@ const sidebars = { "quickstart", "how-to-use-continue", "how-continue-works", + { + type: "category", + label: "🌉 Model setup", + collapsible: true, + collapsed: true, + items: [ + "model-setup/select-provider", + "model-setup/select-model", + "model-setup/configuration", + ], + }, { type: "category", label: "🎨 Customization", @@ -25,7 +36,6 @@ const sidebars = { collapsed: true, items: [ "customization/overview", - "customization/models", "customization/context-providers", "customization/slash-commands", "customization/other-configuration", diff --git a/server/continuedev/libs/llm/ggml.py b/server/continuedev/libs/llm/ggml.py index 226749603..b8343d550 100644 --- a/server/continuedev/libs/llm/ggml.py +++ b/server/continuedev/libs/llm/ggml.py @@ -13,6 +13,8 @@ class GGML(LLM): """ See our [5 minute quickstart](https://github.com/continuedev/ggml-server-example) to run any model locally with ggml. While these models don't yet perform as well, they are free, entirely private, and run offline. + You can also use this class for [LM Studio](https://lmstudio.ai). + Once the model is running on localhost:8000, change `~/.continue/config.json` to look like this: ```json title="~/.continue/config.json" diff --git a/server/continuedev/libs/llm/openai.py b/server/continuedev/libs/llm/openai.py index bcd7f3c7e..d645e152d 100644 --- a/server/continuedev/libs/llm/openai.py +++ b/server/continuedev/libs/llm/openai.py @@ -39,14 +39,45 @@ NON_CHAT_MODELS = { class OpenAI(LLM): """ - The OpenAI class can be used to access OpenAI models like gpt-4 and gpt-3.5-turbo. + The OpenAI class can be used to access OpenAI models like GPT-4, GPT-4 Turbo, and GPT-3.5 Turbo. - If you are locally serving a model that uses an OpenAI-compatible server, you can simply change the `api_base` like this: + ### Azure OpenAI Service + + If you'd like to use OpenAI models but are concerned about privacy, you can use the Azure OpenAI service, which is GDPR and HIPAA compliant. After applying for access [here](https://azure.microsoft.com/en-us/products/ai-services/openai-service), you will typically hear back within only a few days. Once you have access, set up a model in `config.json` like so: + + ```json + "models": [{ + "title": "Azure OpenAI", + "provider": "openai", + "model": "gpt-4", + "api_base": "https://my-azure-openai-instance.openai.azure.com/", + "engine": "my-azure-openai-deployment", + "api_version": "2023-07-01-preview", + "api_type": "azure", + "api_key": "" + }] + ``` + + The easiest way to find this information is from the chat playground in the Azure OpenAI portal. Under the "Chat Session" section, click "View Code" to see each of these parameters. + + ### OpenAI compatible servers / APIs + + OpenAI compatible servers + - [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation) + - [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md) + - [LocalAI](https://localai.io/basics/getting_started/) + - [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) + + OpenAI compatible APIs + - [Anyscale Endpoints](https://github.com/continuedev/deploy-os-code-llm#others) + - [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) + + If you are [using an OpenAI compatible server / API](../model-setup/select-provider#local), you can change the `api_base` like this: ```json title="~/.continue/config.json" { "models": [{ - "title": "OpenAI-compatible server", + "title": "OpenAI-compatible server / API", "provider": "openai", "model": "MODEL_NAME", "api_key": "EMPTY", @@ -54,13 +85,6 @@ class OpenAI(LLM): }] } ``` - - Options for serving models locally with an OpenAI-compatible server include: - - - [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation) - - [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md) - - [LocalAI](https://localai.io/basics/getting_started/) - - [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) """ api_key: str = Field( From ab68318d961cded5a55d17596195378da1cca2b5 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 30 Nov 2023 21:32:03 -0800 Subject: [PATCH 13/22] =?UTF-8?q?=F0=9F=94=96=20bump=20package.json=20vers?= =?UTF-8?q?ion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index a3a20309c..4d034a750 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.7.19", + "version": "0.7.20", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From ce8097cd8f62428c77fda25de3344e6b9d24bb2f Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 1 Dec 2023 05:44:41 +0000 Subject: [PATCH 14/22] =?UTF-8?q?=F0=9F=92=9A=20Update=20package.json=20ve?= =?UTF-8?q?rsion=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 5c8ec0cc2..0b4f10a45 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.7.19", + "version": "0.7.21", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.7.19", + "version": "0.7.21", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 4d034a750..facd4d0c4 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.7.20", + "version": "0.7.21", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 879991ee96d363fa5f484df4aa49420bb6304c78 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 1 Dec 2023 09:50:34 -0800 Subject: [PATCH 15/22] =?UTF-8?q?=F0=9F=9A=B8=20use=20LLM=20instead=20of?= =?UTF-8?q?=20ModelDescription=20in=20config.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/modelSelection/ModelSelect.tsx | 2 +- gui/src/redux/selectors/configSelectors.ts | 1 + server/continuedev/core/config.py | 74 +++++++++++++------ server/continuedev/core/models.py | 12 +-- server/continuedev/libs/llm/base.py | 16 +++- server/continuedev/libs/util/paths.py | 8 +- .../context_providers/highlighted_code.py | 2 +- 7 files changed, 82 insertions(+), 33 deletions(-) diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index 7e6517718..e32750cf5 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -233,7 +233,7 @@ function ModelSelect(props: {}) { value={"GPT-4"} onChange={(val: string) => { if (val === defaultModel?.title) return; - client?.setModelForRoleFromTitle("*", val); + client?.setModelForRoleFromTitle("default", val); }} defaultValue={"GPT-4"} > diff --git a/gui/src/redux/selectors/configSelectors.ts b/gui/src/redux/selectors/configSelectors.ts index 3abcfd232..8d1cbf1db 100644 --- a/gui/src/redux/selectors/configSelectors.ts +++ b/gui/src/redux/selectors/configSelectors.ts @@ -14,6 +14,7 @@ export const contextLengthSelector = (state: RootStore) => { export const defaultModelSelector = (state: RootStore) => { const title = state.serverState.config.model_roles?.default; + if (!Array.isArray(state.serverState.config.models)) return; return state.serverState.config.models?.find( (model) => model.title === title ); diff --git a/server/continuedev/core/config.py b/server/continuedev/core/config.py index 905da4b1b..32436a680 100644 --- a/server/continuedev/core/config.py +++ b/server/continuedev/core/config.py @@ -8,18 +8,21 @@ from pydantic import BaseModel, Field, validator from ..libs.constants.default_config import default_config_json from ..libs.llm.base import LLM +from ..libs.llm.openai_free_trial import OpenAIFreeTrial from ..libs.util.logging import logger -from ..libs.util.paths import getConfigFilePath, getGlobalFolderPath +from ..libs.util.paths import getConfigFilePath, getGlobalFolderPath, sync_migrate from ..libs.util.telemetry import posthog_logger from ..models.llm import BaseCompletionOptions, RequestOptions from .config_utils.context import CONTEXT_PROVIDER_NAME_TO_CLASS, ContextProviderName from .config_utils.shared import ( + MODEL_CLASS_TO_MODEL_PROVIDER, MODEL_PROVIDER_TO_MODEL_CLASS, ModelProvider, StepName, TemplateType, autodetect_prompt_templates, autodetect_template_function, + autodetect_template_type, ) from .context import ContextProvider from .main import ContextProviderDescription, Policy, SlashCommandDescription, Step @@ -273,6 +276,12 @@ class SerializedContinueConfig(BaseModel): else: config.model_roles.__setattr__(role, title) + def migrate_func(): + if role == "default" and config.model_roles.chat is not None: + config.model_roles.chat = None + + sync_migrate("select_default_model_001", migrate_func) + @staticmethod def add_model(model: ModelDescription): with SerializedContinueConfig.edit_config() as config: @@ -314,11 +323,10 @@ class ContinueConfig(BaseModel): default=True, description="If this field is set to True, we will collect anonymous telemetry as described in the documentation page on telemetry. If set to False, we will not collect any data.", ) - models: List[ModelDescription] = Field( + models: List[LLM] = Field( default=[ - ModelDescription( + OpenAIFreeTrial( title="GPT-4 (trial)", - provider="openai-free-trial", model="gpt-4", api_key="", ) @@ -393,7 +401,10 @@ class ContinueConfig(BaseModel): allow_anonymous_telemetry=config.allow_anonymous_telemetry if config.allow_anonymous_telemetry is not None else True, - models=config.models, + models=[ + ContinueConfig.create_llm(config.completion_options, model) + for model in config.models + ], model_roles=config.model_roles, system_message=config.system_message, completion_options=config.completion_options, @@ -583,7 +594,9 @@ class ContinueConfig(BaseModel): return SerializedContinueConfig( disallowed_steps=self.disallowed_steps, allow_anonymous_telemetry=self.allow_anonymous_telemetry, - models=self.models, + models=[ + ContinueConfig.model_description_from(model) for model in self.models + ], model_roles=self.model_roles, system_message=self.system_message, completion_options=self.completion_options, @@ -604,28 +617,46 @@ class ContinueConfig(BaseModel): retrieval_settings=self.retrieval_settings, ) - def create_llm(self, model: ModelDescription) -> LLM: + @staticmethod + def create_llm( + completion_options: BaseCompletionOptions, model: ModelDescription + ) -> LLM: model_class = MODEL_CLASSES[MODEL_PROVIDER_TO_MODEL_CLASS[model.provider]] - completion_options = self.completion_options.dict( - exclude_none=True, exclude_defaults=True - ) - completion_options.update( + options = completion_options.dict(exclude_none=True, exclude_defaults=True) + options.update( model.completion_options.dict(exclude_none=True, exclude_defaults=True) ) - if "max_tokens" not in completion_options: - completion_options["max_tokens"] = min(2048, model.context_length // 2) + if "max_tokens" not in options: + options["max_tokens"] = min(2048, model.context_length // 2) # Allow extra fields to be passed through kwargs = {**model.dict(exclude_none=True)} - kwargs["completion_options"] = completion_options + kwargs["completion_options"] = options kwargs["template_messages"] = autodetect_template_function(model.model) kwargs["prompt_templates"] = autodetect_prompt_templates(model.model) return model_class(**kwargs) + @staticmethod + def model_description_from(llm: LLM) -> ModelDescription: + return ModelDescription( + title=llm.title or "LLM", + provider=MODEL_CLASS_TO_MODEL_PROVIDER.get( + llm.__class__.__name__, "custom" # type: ignore + ), + model=llm.model, + api_key=llm.api_key, + api_base=llm.api_base, + context_length=llm.context_length, + template=autodetect_template_type(llm.model), + completion_options=llm.completion_options, + system_message=llm.system_message, + request_options=llm.request_options, + ) + def construct_models(self) -> Models: - def model_with_title(title: Optional[str], fallback: ModelDescription): + def model_with_title(title: Optional[str], fallback: LLM): return next(filter(lambda x: x.title == title, self.models), fallback) default = model_with_title(self.model_roles.default, self.models[0]) @@ -640,11 +671,10 @@ class ContinueConfig(BaseModel): not in [default.title, chat.title, edit.title, summarize.title] ] - models = Models( - default=self.create_llm(default), - chat=self.create_llm(chat), - edit=self.create_llm(edit), - summarize=self.create_llm(summarize), - saved=[self.create_llm(model) for model in saved], + return Models( + default=default, + chat=chat, + edit=edit, + summarize=summarize, + saved=saved, ) - return models diff --git a/server/continuedev/core/models.py b/server/continuedev/core/models.py index 36587a047..cb1da7d80 100644 --- a/server/continuedev/core/models.py +++ b/server/continuedev/core/models.py @@ -1,5 +1,5 @@ import uuid -from typing import Any, Callable, Dict, List, Optional, Type +from typing import Any, Callable, Dict, List, Optional, Type, Union from pydantic import BaseModel, validator @@ -72,12 +72,12 @@ MODEL_MODULE_NAMES = { class Models(BaseModel): """Main class that holds the current model configuration""" - default: LLM - summarize: LLM - edit: LLM - chat: LLM + default: Union[Any, LLM] + summarize: Union[Any, LLM] + edit: Union[Any, LLM] + chat: Union[Any, LLM] - saved: List[LLM] = [] + saved: List[Union[Any, LLM]] = [] temperature: Optional[float] = None system_message: Optional[str] = None diff --git a/server/continuedev/libs/llm/base.py b/server/continuedev/libs/llm/base.py index da3bf3a1e..b3674dab5 100644 --- a/server/continuedev/libs/llm/base.py +++ b/server/continuedev/libs/llm/base.py @@ -5,8 +5,12 @@ from typing import Any, AsyncGenerator, Callable, Coroutine, Dict, List, Optiona import aiohttp import certifi -from pydantic import Field +from pydantic import Field, validator +from ...core.config_utils.shared import ( + autodetect_prompt_templates, + autodetect_template_function, +) from ...core.main import ChatMessage from ...models.llm import BaseCompletionOptions, CompletionOptions, RequestOptions from ...models.main import ContinueBaseModel @@ -58,7 +62,7 @@ class LLM(ContinueBaseModel): ) prompt_templates: dict = Field( - default={}, + default=None, description='A dictionary of prompt templates that can be used to customize the behavior of the LLM in certain situations. For example, set the "edit" key in order to change the prompt that is used for the /edit slash command. Each value in the dictionary is a string templated in mustache syntax, and filled in at runtime with the variables specific to the situation. See the documentation for more information.', ) @@ -103,6 +107,14 @@ class LLM(ContinueBaseModel): }, } + @validator("template_messages", pre=True, always=True) + def set_template_messages(cls, template_messages, values): + return template_messages or autodetect_template_function(values["model"]) + + @validator("prompt_templates", pre=True, always=True) + def set_prompt_templates(cls, prompt_templates, values): + return prompt_templates or autodetect_prompt_templates(values["model"]) + def dict(self, **kwargs): original_dict = super().dict(**kwargs) original_dict.pop("write_log") diff --git a/server/continuedev/libs/util/paths.py b/server/continuedev/libs/util/paths.py index 6fd38a675..8114f8061 100644 --- a/server/continuedev/libs/util/paths.py +++ b/server/continuedev/libs/util/paths.py @@ -1,6 +1,6 @@ import os import re -from typing import Awaitable, Callable, Optional +from typing import Any, Awaitable, Callable, Optional from ..constants.default_config import default_config from ..constants.main import ( @@ -44,6 +44,12 @@ async def migrate(migration_id: str, migrate_func: Callable[[], Awaitable]): markMigrated(migration_id) +def sync_migrate(migration_id: str, migrate_func: Callable[[], Any]): + if not hasMigrated(migration_id): + migrate_func() + markMigrated(migration_id) + + def getSessionsFolderPath(): path = os.path.join(getGlobalFolderPath(), CONTINUE_SESSIONS_FOLDER) os.makedirs(path, exist_ok=True) diff --git a/server/continuedev/plugins/context_providers/highlighted_code.py b/server/continuedev/plugins/context_providers/highlighted_code.py index 8f0bac9be..82d3b5f92 100644 --- a/server/continuedev/plugins/context_providers/highlighted_code.py +++ b/server/continuedev/plugins/context_providers/highlighted_code.py @@ -99,7 +99,7 @@ class HighlightedCodeContextProvider(ContextProvider): ) return ChatMessage( role="user", - content=f"Code in this file is highlighted ({item.description.name}):\n```\n{rif.contents}\n```", + content=f"```{item.description.name}\n{rif.contents}\n```", summary=f"Code in this file is highlighted: {item.description.name}", ) From caf2a94f7420150b81cd4a6fcb6c5dc5260111f2 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 1 Dec 2023 09:51:44 -0800 Subject: [PATCH 16/22] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20update=20types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/schema/ContinueConfig.d.ts | 70 +++++------ extensions/vscode/schema/Models.d.ts | 10 +- gui/src/schema/ContinueConfig.d.ts | 70 +++++------ gui/src/schema/Models.d.ts | 10 +- schema/json/ContinueConfig.json | 121 ++++++++++--------- schema/json/LLM.json | 1 - schema/json/Models.json | 48 ++++++-- 7 files changed, 164 insertions(+), 166 deletions(-) diff --git a/extensions/vscode/schema/ContinueConfig.d.ts b/extensions/vscode/schema/ContinueConfig.d.ts index 48f7e28fc..c326e3752 100644 --- a/extensions/vscode/schema/ContinueConfig.d.ts +++ b/extensions/vscode/schema/ContinueConfig.d.ts @@ -32,47 +32,25 @@ export type DisallowedSteps = string[]; */ export type AllowAnonymousTelemetry = boolean; /** - * The title you wish to give your model. + * A title that will identify this model in the model selection dropdown */ export type Title = string; /** - * The provider of the model. This is used to determine the type of model, and how to interact with it. + * The unique ID of the user. */ -export type Provider = - | "openai" - | "openai-free-trial" - | "openai-aiohttp" - | "anthropic" - | "together" - | "ollama" - | "huggingface-tgi" - | "huggingface-inference-api" - | "llama.cpp" - | "replicate" - | "text-gen-webui" - | "google-palm" - | "lmstudio" - | "llamafile"; +export type UniqueId = string; /** - * The name of the model. Used to autodetect prompt template. + * The name of the model to be used (e.g. gpt-4, codellama) */ export type Model = string; /** - * OpenAI, Anthropic, Together, or other API key + * A system message that will always be followed by the LLM */ -export type ApiKey = string; -/** - * The base URL of the LLM API. - */ -export type ApiBase = string; +export type SystemMessage1 = string; /** * The maximum context length of the LLM in tokens, as counted by count_tokens. */ export type ContextLength = number; -/** - * The chat template used to format messages. This is auto-detected for most models, but can be overridden here. - */ -export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml" | "deepseek"; /** * Options for the completion endpoint. Read more about the completion options in the documentation. */ @@ -105,10 +83,6 @@ export type Stop = string[]; * The maximum number of tokens to generate. */ export type MaxTokens = number; -/** - * A system message that will always be followed by the LLM - */ -export type SystemMessage1 = string; /** * Options for the HTTP request to the LLM. */ @@ -129,7 +103,15 @@ export type CaBundlePath = string; * Proxy URL to use when making the HTTP request */ export type Proxy = string; -export type Models = ModelDescription[]; +/** + * The API key for the LLM provider. + */ +export type ApiKey = string; +/** + * The base URL of the LLM API. + */ +export type ApiBase = string; +export type Models = LLM[]; /** * Roles for models. Each entry should be the title of a model in the models array. */ @@ -334,17 +316,17 @@ export interface FunctionCall { arguments: Arguments; [k: string]: unknown; } -export interface ModelDescription { - title: Title; - provider: Provider; +export interface LLM { + title?: Title; + unique_id?: UniqueId; model: Model; + system_message?: SystemMessage1; + context_length?: ContextLength; + completion_options?: CompletionOptions; + request_options?: RequestOptions; + prompt_templates?: PromptTemplates; api_key?: ApiKey; api_base?: ApiBase; - context_length?: ContextLength; - template?: Template; - completion_options?: CompletionOptions; - system_message?: SystemMessage1; - request_options?: RequestOptions; [k: string]: unknown; } export interface BaseCompletionOptions { @@ -371,6 +353,12 @@ export interface RequestOptions1 { export interface Headers { [k: string]: string; } +/** + * A dictionary of prompt templates that can be used to customize the behavior of the LLM in certain situations. For example, set the "edit" key in order to change the prompt that is used for the /edit slash command. Each value in the dictionary is a string templated in mustache syntax, and filled in at runtime with the variables specific to the situation. See the documentation for more information. + */ +export interface PromptTemplates { + [k: string]: unknown; +} export interface ModelRoles1 { default: Default; chat?: Chat; diff --git a/extensions/vscode/schema/Models.d.ts b/extensions/vscode/schema/Models.d.ts index e24d6d587..a1592ae0a 100644 --- a/extensions/vscode/schema/Models.d.ts +++ b/extensions/vscode/schema/Models.d.ts @@ -86,7 +86,7 @@ export type ApiKey = string; * The base URL of the LLM API. */ export type ApiBase = string; -export type Saved = LLM[]; +export type Saved = (unknown | LLM)[]; export type Temperature1 = number; export type SystemMessage1 = string; @@ -94,10 +94,10 @@ export type SystemMessage1 = string; * Main class that holds the current model configuration */ export interface Models1 { - default: LLM; - summarize: LLM; - edit: LLM; - chat: LLM; + default?: unknown; + summarize?: unknown; + edit?: unknown; + chat?: unknown; saved?: Saved; temperature?: Temperature1; system_message?: SystemMessage1; diff --git a/gui/src/schema/ContinueConfig.d.ts b/gui/src/schema/ContinueConfig.d.ts index 48f7e28fc..c326e3752 100644 --- a/gui/src/schema/ContinueConfig.d.ts +++ b/gui/src/schema/ContinueConfig.d.ts @@ -32,47 +32,25 @@ export type DisallowedSteps = string[]; */ export type AllowAnonymousTelemetry = boolean; /** - * The title you wish to give your model. + * A title that will identify this model in the model selection dropdown */ export type Title = string; /** - * The provider of the model. This is used to determine the type of model, and how to interact with it. + * The unique ID of the user. */ -export type Provider = - | "openai" - | "openai-free-trial" - | "openai-aiohttp" - | "anthropic" - | "together" - | "ollama" - | "huggingface-tgi" - | "huggingface-inference-api" - | "llama.cpp" - | "replicate" - | "text-gen-webui" - | "google-palm" - | "lmstudio" - | "llamafile"; +export type UniqueId = string; /** - * The name of the model. Used to autodetect prompt template. + * The name of the model to be used (e.g. gpt-4, codellama) */ export type Model = string; /** - * OpenAI, Anthropic, Together, or other API key + * A system message that will always be followed by the LLM */ -export type ApiKey = string; -/** - * The base URL of the LLM API. - */ -export type ApiBase = string; +export type SystemMessage1 = string; /** * The maximum context length of the LLM in tokens, as counted by count_tokens. */ export type ContextLength = number; -/** - * The chat template used to format messages. This is auto-detected for most models, but can be overridden here. - */ -export type Template = "llama2" | "alpaca" | "zephyr" | "phind" | "anthropic" | "chatml" | "deepseek"; /** * Options for the completion endpoint. Read more about the completion options in the documentation. */ @@ -105,10 +83,6 @@ export type Stop = string[]; * The maximum number of tokens to generate. */ export type MaxTokens = number; -/** - * A system message that will always be followed by the LLM - */ -export type SystemMessage1 = string; /** * Options for the HTTP request to the LLM. */ @@ -129,7 +103,15 @@ export type CaBundlePath = string; * Proxy URL to use when making the HTTP request */ export type Proxy = string; -export type Models = ModelDescription[]; +/** + * The API key for the LLM provider. + */ +export type ApiKey = string; +/** + * The base URL of the LLM API. + */ +export type ApiBase = string; +export type Models = LLM[]; /** * Roles for models. Each entry should be the title of a model in the models array. */ @@ -334,17 +316,17 @@ export interface FunctionCall { arguments: Arguments; [k: string]: unknown; } -export interface ModelDescription { - title: Title; - provider: Provider; +export interface LLM { + title?: Title; + unique_id?: UniqueId; model: Model; + system_message?: SystemMessage1; + context_length?: ContextLength; + completion_options?: CompletionOptions; + request_options?: RequestOptions; + prompt_templates?: PromptTemplates; api_key?: ApiKey; api_base?: ApiBase; - context_length?: ContextLength; - template?: Template; - completion_options?: CompletionOptions; - system_message?: SystemMessage1; - request_options?: RequestOptions; [k: string]: unknown; } export interface BaseCompletionOptions { @@ -371,6 +353,12 @@ export interface RequestOptions1 { export interface Headers { [k: string]: string; } +/** + * A dictionary of prompt templates that can be used to customize the behavior of the LLM in certain situations. For example, set the "edit" key in order to change the prompt that is used for the /edit slash command. Each value in the dictionary is a string templated in mustache syntax, and filled in at runtime with the variables specific to the situation. See the documentation for more information. + */ +export interface PromptTemplates { + [k: string]: unknown; +} export interface ModelRoles1 { default: Default; chat?: Chat; diff --git a/gui/src/schema/Models.d.ts b/gui/src/schema/Models.d.ts index e24d6d587..a1592ae0a 100644 --- a/gui/src/schema/Models.d.ts +++ b/gui/src/schema/Models.d.ts @@ -86,7 +86,7 @@ export type ApiKey = string; * The base URL of the LLM API. */ export type ApiBase = string; -export type Saved = LLM[]; +export type Saved = (unknown | LLM)[]; export type Temperature1 = number; export type SystemMessage1 = string; @@ -94,10 +94,10 @@ export type SystemMessage1 = string; * Main class that holds the current model configuration */ export interface Models1 { - default: LLM; - summarize: LLM; - edit: LLM; - chat: LLM; + default?: unknown; + summarize?: unknown; + edit?: unknown; + chat?: unknown; saved?: Saved; temperature?: Temperature1; system_message?: SystemMessage1; diff --git a/schema/json/ContinueConfig.json b/schema/json/ContinueConfig.json index a2c4f0f18..8ef88047a 100644 --- a/schema/json/ContinueConfig.json +++ b/schema/json/ContinueConfig.json @@ -177,49 +177,28 @@ } } }, - "ModelDescription": { - "title": "ModelDescription", + "LLM": { + "title": "LLM", "type": "object", "properties": { "title": { "title": "Title", - "description": "The title you wish to give your model.", + "description": "A title that will identify this model in the model selection dropdown", "type": "string" }, - "provider": { - "title": "Provider", - "description": "The provider of the model. This is used to determine the type of model, and how to interact with it.", - "enum": [ - "openai", - "openai-free-trial", - "openai-aiohttp", - "anthropic", - "together", - "ollama", - "huggingface-tgi", - "huggingface-inference-api", - "llama.cpp", - "replicate", - "text-gen-webui", - "google-palm", - "lmstudio", - "llamafile" - ], + "unique_id": { + "title": "Unique Id", + "description": "The unique ID of the user.", "type": "string" }, "model": { "title": "Model", - "description": "The name of the model. Used to autodetect prompt template.", + "description": "The name of the model to be used (e.g. gpt-4, codellama)", "type": "string" }, - "api_key": { - "title": "Api Key", - "description": "OpenAI, Anthropic, Together, or other API key", - "type": "string" - }, - "api_base": { - "title": "Api Base", - "description": "The base URL of the LLM API.", + "system_message": { + "title": "System Message", + "description": "A system message that will always be followed by the LLM", "type": "string" }, "context_length": { @@ -228,20 +207,6 @@ "default": 2048, "type": "integer" }, - "template": { - "title": "Template", - "description": "The chat template used to format messages. This is auto-detected for most models, but can be overridden here.", - "enum": [ - "llama2", - "alpaca", - "zephyr", - "phind", - "anthropic", - "chatml", - "deepseek" - ], - "type": "string" - }, "completion_options": { "title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", @@ -260,11 +225,6 @@ } ] }, - "system_message": { - "title": "System Message", - "description": "A system message that will always be followed by the LLM", - "type": "string" - }, "request_options": { "title": "Request Options", "description": "Options for the HTTP request to the LLM.", @@ -280,11 +240,24 @@ "$ref": "#/definitions/RequestOptions" } ] + }, + "prompt_templates": { + "title": "Prompt Templates", + "description": "A dictionary of prompt templates that can be used to customize the behavior of the LLM in certain situations. For example, set the \"edit\" key in order to change the prompt that is used for the /edit slash command. Each value in the dictionary is a string templated in mustache syntax, and filled in at runtime with the variables specific to the situation. See the documentation for more information.", + "type": "object" + }, + "api_key": { + "title": "Api Key", + "description": "The API key for the LLM provider.", + "type": "string" + }, + "api_base": { + "title": "Api Base", + "description": "The base URL of the LLM API.", + "type": "string" } }, "required": [ - "title", - "provider", "model" ] }, @@ -611,12 +584,9 @@ "default": [ { "title": "GPT-4 (trial)", - "provider": "openai-free-trial", "model": "gpt-4", - "api_key": "", - "api_base": null, - "context_length": 2048, - "template": null, + "system_message": null, + "context_length": 8192, "completion_options": { "temperature": null, "top_p": null, @@ -626,19 +596,50 @@ "stop": null, "max_tokens": 1023 }, - "system_message": null, "request_options": { "timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null - } + }, + "prompt_templates": {}, + "template_messages": null, + "api_key": "", + "api_base": null, + "llm": { + "title": null, + "model": "gpt-4", + "system_message": null, + "context_length": 2048, + "completion_options": { + "temperature": null, + "top_p": null, + "top_k": null, + "presence_penalty": null, + "frequency_penalty": null, + "stop": null, + "max_tokens": 1023 + }, + "request_options": { + "timeout": 300, + "verify_ssl": null, + "ca_bundle_path": null, + "proxy": null, + "headers": null + }, + "prompt_templates": {}, + "template_messages": null, + "api_key": null, + "api_base": null, + "class_name": "ProxyServer" + }, + "class_name": "OpenAIFreeTrial" } ], "type": "array", "items": { - "$ref": "#/definitions/ModelDescription" + "$ref": "#/definitions/LLM" } }, "model_roles": { diff --git a/schema/json/LLM.json b/schema/json/LLM.json index 6dcf550f9..8003a66a1 100644 --- a/schema/json/LLM.json +++ b/schema/json/LLM.json @@ -149,7 +149,6 @@ "prompt_templates": { "title": "Prompt Templates", "description": "A dictionary of prompt templates that can be used to customize the behavior of the LLM in certain situations. For example, set the \"edit\" key in order to change the prompt that is used for the /edit slash command. Each value in the dictionary is a string templated in mustache syntax, and filled in at runtime with the variables specific to the situation. See the documentation for more information.", - "default": {}, "type": "object" }, "api_key": { diff --git a/schema/json/Models.json b/schema/json/Models.json index 68cc9d9e8..677a39a5c 100644 --- a/schema/json/Models.json +++ b/schema/json/Models.json @@ -149,7 +149,6 @@ "prompt_templates": { "title": "Prompt Templates", "description": "A dictionary of prompt templates that can be used to customize the behavior of the LLM in certain situations. For example, set the \"edit\" key in order to change the prompt that is used for the /edit slash command. Each value in the dictionary is a string templated in mustache syntax, and filled in at runtime with the variables specific to the situation. See the documentation for more information.", - "default": {}, "type": "object" }, "api_key": { @@ -173,23 +172,52 @@ "type": "object", "properties": { "default": { - "$ref": "#/definitions/LLM" + "title": "Default", + "anyOf": [ + {}, + { + "$ref": "#/definitions/LLM" + } + ] }, "summarize": { - "$ref": "#/definitions/LLM" + "title": "Summarize", + "anyOf": [ + {}, + { + "$ref": "#/definitions/LLM" + } + ] }, "edit": { - "$ref": "#/definitions/LLM" + "title": "Edit", + "anyOf": [ + {}, + { + "$ref": "#/definitions/LLM" + } + ] }, "chat": { - "$ref": "#/definitions/LLM" + "title": "Chat", + "anyOf": [ + {}, + { + "$ref": "#/definitions/LLM" + } + ] }, "saved": { "title": "Saved", "default": [], "type": "array", "items": { - "$ref": "#/definitions/LLM" + "anyOf": [ + {}, + { + "$ref": "#/definitions/LLM" + } + ] } }, "temperature": { @@ -200,13 +228,7 @@ "title": "System Message", "type": "string" } - }, - "required": [ - "default", - "summarize", - "edit", - "chat" - ] + } } } } \ No newline at end of file From 9f3c0d9d97046bed35952912a45e21c710a9052e Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 1 Dec 2023 18:18:43 +0000 Subject: [PATCH 17/22] =?UTF-8?q?=F0=9F=92=9A=20Update=20package.json=20ve?= =?UTF-8?q?rsion=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 0b4f10a45..0ba25e7c1 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.7.21", + "version": "0.7.22", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.7.21", + "version": "0.7.22", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index facd4d0c4..7a664115e 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.7.21", + "version": "0.7.22", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From f1acf9528192a42afbf5f3dca2634098b8c7447b Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 1 Dec 2023 11:11:05 -0800 Subject: [PATCH 18/22] =?UTF-8?q?=F0=9F=90=9B=20fixing=20a=20few=20misc=20?= =?UTF-8?q?bugs=20with=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reference/Model Providers/llamacpp.md | 15 ++++++------ .../reference/Model Providers/llamafile.md | 13 +++++----- gui/src/pages/gui.tsx | 4 ++-- server/continuedev/core/config.py | 18 +++++++++++--- .../continuedev/core/config_utils/shared.py | 24 +++++++++++++++---- 5 files changed, 52 insertions(+), 22 deletions(-) diff --git a/docs/docs/reference/Model Providers/llamacpp.md b/docs/docs/reference/Model Providers/llamacpp.md index 6d5cdc0c3..71ebb5f05 100644 --- a/docs/docs/reference/Model Providers/llamacpp.md +++ b/docs/docs/reference/Model Providers/llamacpp.md @@ -12,12 +12,14 @@ After it's up and running, change `~/.continue/config.json` to look like this: ```json title="~/.continue/config.json" { - "models": [{ - "title": "Llama CPP", - "provider": "llama.cpp", - "model": "MODEL_NAME", - "api_base": "http://localhost:8080" - }] + "models": [ + { + "title": "Llama CPP", + "provider": "llama.cpp", + "model": "MODEL_NAME", + "api_base": "http://localhost:8080" + } + ] } ``` @@ -27,7 +29,6 @@ After it's up and running, change `~/.continue/config.json` to look like this: - ### Inherited Properties diff --git a/docs/docs/reference/Model Providers/llamafile.md b/docs/docs/reference/Model Providers/llamafile.md index 3991b8f48..021f1933f 100644 --- a/docs/docs/reference/Model Providers/llamafile.md +++ b/docs/docs/reference/Model Providers/llamafile.md @@ -6,11 +6,13 @@ A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contai ```json title="~/.continue/config.json" { - "models": [{ - "title": "Llamafile", - "provider": "llamafile", - "model": "mistral-7b", - }] + "models": [ + { + "title": "Llamafile", + "provider": "llamafile", + "model": "mistral-7b" + } + ] } ``` @@ -21,7 +23,6 @@ A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contai - ### Inherited Properties diff --git a/gui/src/pages/gui.tsx b/gui/src/pages/gui.tsx index accad00b1..8396ccb14 100644 --- a/gui/src/pages/gui.tsx +++ b/gui/src/pages/gui.tsx @@ -428,7 +428,7 @@ function GUI(props: GUIProps) { client?.stopSession(); persistSession(); dispatch(newSession()); - mainTextInputRef.current?.focus(); + mainTextInputRef.current?.focus?.(); } }; @@ -737,7 +737,7 @@ function GUI(props: GUIProps) { value={step.description as string} active={active && isLastUserInput(index)} onEnter={(e, value) => { - if (value) { + if (value && client) { client?.stopSession(); const newHistory = [ ...sessionState.history.slice(0, index), diff --git a/server/continuedev/core/config.py b/server/continuedev/core/config.py index 32436a680..c3f4e33fe 100644 --- a/server/continuedev/core/config.py +++ b/server/continuedev/core/config.py @@ -17,6 +17,7 @@ from .config_utils.context import CONTEXT_PROVIDER_NAME_TO_CLASS, ContextProvide from .config_utils.shared import ( MODEL_CLASS_TO_MODEL_PROVIDER, MODEL_PROVIDER_TO_MODEL_CLASS, + STEP_NAMES, ModelProvider, StepName, TemplateType, @@ -50,7 +51,11 @@ class SlashCommand(BaseModel): def step_is_string(cls, v): if isinstance(v, str): return v - elif isinstance(v, object) and v.__class__.__name__ == "ModelMetaclass": + elif ( + isinstance(v, object) + and v.__class__.__name__ == "ModelMetaclass" + and v.__class__.__name__ in STEP_NAMES + ): return str(v).split(".")[-1].split("'")[0] else: return v @@ -458,6 +463,9 @@ class ContinueConfig(BaseModel): serialized_config = json.loads(contents) + except json.JSONDecodeError as e: + raise e + except ValueError as e: logger.warning(f"Found empty config.json at {filepath}: {e}") with open(filepath, "w") as f: @@ -633,8 +641,12 @@ class ContinueConfig(BaseModel): # Allow extra fields to be passed through kwargs = {**model.dict(exclude_none=True)} kwargs["completion_options"] = options - kwargs["template_messages"] = autodetect_template_function(model.model) - kwargs["prompt_templates"] = autodetect_prompt_templates(model.model) + kwargs["template_messages"] = autodetect_template_function( + model.model, model.template + ) + kwargs["prompt_templates"] = autodetect_prompt_templates( + model.model, model.template + ) return model_class(**kwargs) diff --git a/server/continuedev/core/config_utils/shared.py b/server/continuedev/core/config_utils/shared.py index c65a35435..8e4417ca7 100644 --- a/server/continuedev/core/config_utils/shared.py +++ b/server/continuedev/core/config_utils/shared.py @@ -18,6 +18,18 @@ from ...libs.llm.prompts.edit import ( zephyr_edit_prompt, ) +STEP_NAMES = [ + "AnswerQuestionChroma", + "GenerateShellCommandStep", + "EditHighlightedCodeStep", + "ShareSessionStep", + "CommentCodeStep", + "ClearHistoryStep", + "StackOverflowStep", + "OpenConfigStep", + "GenerateShellCommandStep", +] + StepName = Literal[ "AnswerQuestionChroma", "GenerateShellCommandStep", @@ -64,8 +76,10 @@ def autodetect_template_type(model: str) -> Optional[TemplateType]: return "chatml" -def autodetect_template_function(model: str): - if template_type := autodetect_template_type(model): +def autodetect_template_function( + model: str, explicit_template: Optional[TemplateType] = None +): + if template_type := explicit_template or autodetect_template_type(model): mapping: Dict[TemplateType, Any] = { "llama2": llama2_template_messages, "alpaca": template_alpaca_messages, @@ -79,8 +93,10 @@ def autodetect_template_function(model: str): return None -def autodetect_prompt_templates(model: str): - template_type = autodetect_template_type(model) +def autodetect_prompt_templates( + model: str, explicit_template: Optional[TemplateType] = None +): + template_type = explicit_template or autodetect_template_type(model) templates = {} From 412376370ab4c8cb0e8444e5cf2661a170942071 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 1 Dec 2023 11:36:03 -0800 Subject: [PATCH 19/22] =?UTF-8?q?=F0=9F=90=9B=20fix=20broken=20link=20in?= =?UTF-8?q?=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reference/Model Providers/anthropicllm.md | 4 +- docs/docs/reference/Model Providers/ggml.md | 8 +++- .../Model Providers/googlepalmapi.md | 4 +- .../huggingfaceinferenceapi.md | 4 +- .../Model Providers/huggingfacetgi.md | 4 +- .../reference/Model Providers/llamacpp.md | 21 ++++---- .../reference/Model Providers/llamafile.md | 19 ++++---- docs/docs/reference/Model Providers/ollama.md | 4 +- docs/docs/reference/Model Providers/openai.md | 48 ++++++++++++++----- .../Model Providers/openaifreetrial.md | 6 +-- .../reference/Model Providers/queuedllm.md | 4 +- .../reference/Model Providers/replicatellm.md | 4 +- .../reference/Model Providers/textgenwebui.md | 4 +- .../reference/Model Providers/togetherllm.md | 4 +- docs/docs/reference/config.md | 4 +- server/continuedev/libs/llm/llamacpp.py | 2 +- server/continuedev/libs/llm/openai.py | 14 +++--- 17 files changed, 93 insertions(+), 65 deletions(-) diff --git a/docs/docs/reference/Model Providers/anthropicllm.md b/docs/docs/reference/Model Providers/anthropicllm.md index 61e419b0b..97af029d4 100644 --- a/docs/docs/reference/Model Providers/anthropicllm.md +++ b/docs/docs/reference/Model Providers/anthropicllm.md @@ -30,8 +30,8 @@ Claude 2 is not yet publicly released. You can request early access [here](https - + - + diff --git a/docs/docs/reference/Model Providers/ggml.md b/docs/docs/reference/Model Providers/ggml.md index 7bfddcf9c..9aae2ed8f 100644 --- a/docs/docs/reference/Model Providers/ggml.md +++ b/docs/docs/reference/Model Providers/ggml.md @@ -4,6 +4,8 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; See our [5 minute quickstart](https://github.com/continuedev/ggml-server-example) to run any model locally with ggml. While these models don't yet perform as well, they are free, entirely private, and run offline. +You can also use this class for [LM Studio](https://lmstudio.ai). + Once the model is running on localhost:8000, change `~/.continue/config.json` to look like this: ```json title="~/.continue/config.json" @@ -24,6 +26,8 @@ Once the model is running on localhost:8000, change `~/.continue/config.json` to + + ### Inherited Properties @@ -33,8 +37,8 @@ Once the model is running on localhost:8000, change `~/.continue/config.json` to - + - + diff --git a/docs/docs/reference/Model Providers/googlepalmapi.md b/docs/docs/reference/Model Providers/googlepalmapi.md index eacb40958..e10091ebe 100644 --- a/docs/docs/reference/Model Providers/googlepalmapi.md +++ b/docs/docs/reference/Model Providers/googlepalmapi.md @@ -29,7 +29,7 @@ The Google PaLM API is currently in public preview, so production applications a - + - + diff --git a/docs/docs/reference/Model Providers/huggingfaceinferenceapi.md b/docs/docs/reference/Model Providers/huggingfaceinferenceapi.md index 2b2d65ee6..8d7ea897f 100644 --- a/docs/docs/reference/Model Providers/huggingfaceinferenceapi.md +++ b/docs/docs/reference/Model Providers/huggingfaceinferenceapi.md @@ -30,7 +30,7 @@ Hugging Face Inference API is a great option for newly released language models. - + - + diff --git a/docs/docs/reference/Model Providers/huggingfacetgi.md b/docs/docs/reference/Model Providers/huggingfacetgi.md index feb20ec79..919199fd2 100644 --- a/docs/docs/reference/Model Providers/huggingfacetgi.md +++ b/docs/docs/reference/Model Providers/huggingfacetgi.md @@ -17,8 +17,8 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; - + - + diff --git a/docs/docs/reference/Model Providers/llamacpp.md b/docs/docs/reference/Model Providers/llamacpp.md index 71ebb5f05..d1b494409 100644 --- a/docs/docs/reference/Model Providers/llamacpp.md +++ b/docs/docs/reference/Model Providers/llamacpp.md @@ -12,14 +12,12 @@ After it's up and running, change `~/.continue/config.json` to look like this: ```json title="~/.continue/config.json" { - "models": [ - { - "title": "Llama CPP", - "provider": "llama.cpp", - "model": "MODEL_NAME", - "api_base": "http://localhost:8080" - } - ] + "models": [{ + "title": "Llama CPP", + "provider": "llama.cpp", + "model": "MODEL_NAME", + "api_base": "http://localhost:8080" + }] } ``` @@ -27,7 +25,8 @@ After it's up and running, change `~/.continue/config.json` to look like this: ## Properties - + + ### Inherited Properties @@ -36,8 +35,8 @@ After it's up and running, change `~/.continue/config.json` to look like this: - + - + diff --git a/docs/docs/reference/Model Providers/llamafile.md b/docs/docs/reference/Model Providers/llamafile.md index 021f1933f..855e32770 100644 --- a/docs/docs/reference/Model Providers/llamafile.md +++ b/docs/docs/reference/Model Providers/llamafile.md @@ -6,23 +6,24 @@ A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contai ```json title="~/.continue/config.json" { - "models": [ - { - "title": "Llamafile", - "provider": "llamafile", - "model": "mistral-7b" - } - ] + "models": [{ + "title": "Llamafile", + "provider": "llamafile", + "model": "mistral-7b", + }] } ``` +Optionally, you can set the `llamafile_command` property, which will be run to start the llamafile if it isn't already running on port 8080. Be sure to use an absolute path to the llamafile binary. For example: `/Users/yourusername/mistral-7b-instruct-v0.1-Q4_K_M-server.llamafile`. + [View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/llamafile.py) ## Properties - + + ### Inherited Properties @@ -32,6 +33,6 @@ A [llamafile](https://github.com/Mozilla-Ocho/llamafile#readme) is a self-contai - + diff --git a/docs/docs/reference/Model Providers/ollama.md b/docs/docs/reference/Model Providers/ollama.md index 63d96057b..ead7be799 100644 --- a/docs/docs/reference/Model Providers/ollama.md +++ b/docs/docs/reference/Model Providers/ollama.md @@ -27,8 +27,8 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; - + - + diff --git a/docs/docs/reference/Model Providers/openai.md b/docs/docs/reference/Model Providers/openai.md index 046817fd4..5d8c3af71 100644 --- a/docs/docs/reference/Model Providers/openai.md +++ b/docs/docs/reference/Model Providers/openai.md @@ -2,14 +2,45 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; # OpenAI -The OpenAI class can be used to access OpenAI models like gpt-4 and gpt-3.5-turbo. +The OpenAI class can be used to access OpenAI models like GPT-4, GPT-4 Turbo, and GPT-3.5 Turbo. -If you are locally serving a model that uses an OpenAI-compatible server, you can simply change the `api_base` like this: +### Azure OpenAI Service + +If you'd like to use OpenAI models but are concerned about privacy, you can use the Azure OpenAI service, which is GDPR and HIPAA compliant. After applying for access [here](https://azure.microsoft.com/en-us/products/ai-services/openai-service), you will typically hear back within only a few days. Once you have access, set up a model in `config.json` like so: + +```json +"models": [{ + "title": "Azure OpenAI", + "provider": "openai", + "model": "gpt-4", + "api_base": "https://my-azure-openai-instance.openai.azure.com/", + "engine": "my-azure-openai-deployment", + "api_version": "2023-07-01-preview", + "api_type": "azure", + "api_key": "" +}] +``` + +The easiest way to find this information is from the chat playground in the Azure OpenAI portal. Under the "Chat Session" section, click "View Code" to see each of these parameters. + +### OpenAI compatible servers / APIs + +OpenAI compatible servers +- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation) +- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md) +- [LocalAI](https://localai.io/basics/getting_started/) +- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) + +OpenAI compatible APIs +- [Anyscale Endpoints](https://github.com/continuedev/deploy-os-code-llm#others) +- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) + +If you are [using an OpenAI compatible server / API](../../model-setup/select-provider#local), you can change the `api_base` like this: ```json title="~/.continue/config.json" { "models": [{ - "title": "OpenAI-compatible server", + "title": "OpenAI-compatible server / API", "provider": "openai", "model": "MODEL_NAME", "api_key": "EMPTY", @@ -18,13 +49,6 @@ If you are locally serving a model that uses an OpenAI-compatible server, you ca } ``` -Options for serving models locally with an OpenAI-compatible server include: - -- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation) -- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md) -- [LocalAI](https://localai.io/basics/getting_started/) -- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) - [View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/openai.py) ## Properties @@ -43,7 +67,7 @@ Options for serving models locally with an OpenAI-compatible server include: - + - + diff --git a/docs/docs/reference/Model Providers/openaifreetrial.md b/docs/docs/reference/Model Providers/openaifreetrial.md index 307a86ab1..d5538d42c 100644 --- a/docs/docs/reference/Model Providers/openaifreetrial.md +++ b/docs/docs/reference/Model Providers/openaifreetrial.md @@ -37,7 +37,7 @@ Once you are using Continue regularly though, you will need to add an OpenAI API ## Properties - + ### Inherited Properties @@ -47,8 +47,8 @@ Once you are using Continue regularly though, you will need to add an OpenAI API - + - + diff --git a/docs/docs/reference/Model Providers/queuedllm.md b/docs/docs/reference/Model Providers/queuedllm.md index a835ab3d7..59a0bcea5 100644 --- a/docs/docs/reference/Model Providers/queuedllm.md +++ b/docs/docs/reference/Model Providers/queuedllm.md @@ -31,8 +31,8 @@ config = ContinueConfig( - + - + diff --git a/docs/docs/reference/Model Providers/replicatellm.md b/docs/docs/reference/Model Providers/replicatellm.md index 27ea1d8c3..fb718bf4c 100644 --- a/docs/docs/reference/Model Providers/replicatellm.md +++ b/docs/docs/reference/Model Providers/replicatellm.md @@ -31,7 +31,7 @@ If you don't specify the `model` parameter, it will default to `replicate/llama- - + - + diff --git a/docs/docs/reference/Model Providers/textgenwebui.md b/docs/docs/reference/Model Providers/textgenwebui.md index 2141bf5f5..10636ff41 100644 --- a/docs/docs/reference/Model Providers/textgenwebui.md +++ b/docs/docs/reference/Model Providers/textgenwebui.md @@ -28,8 +28,8 @@ TextGenWebUI is a comprehensive, open-source language model UI and local server. - + - + diff --git a/docs/docs/reference/Model Providers/togetherllm.md b/docs/docs/reference/Model Providers/togetherllm.md index b66f3fe82..0e9a9da88 100644 --- a/docs/docs/reference/Model Providers/togetherllm.md +++ b/docs/docs/reference/Model Providers/togetherllm.md @@ -29,7 +29,7 @@ The Together API is a cloud platform for running large AI models. You can sign u - + - + diff --git a/docs/docs/reference/config.md b/docs/docs/reference/config.md index 814724737..b746de46a 100644 --- a/docs/docs/reference/config.md +++ b/docs/docs/reference/config.md @@ -10,10 +10,10 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx'; - + - + diff --git a/server/continuedev/libs/llm/llamacpp.py b/server/continuedev/libs/llm/llamacpp.py index 4d3b6dcf2..366d1c88b 100644 --- a/server/continuedev/libs/llm/llamacpp.py +++ b/server/continuedev/libs/llm/llamacpp.py @@ -39,7 +39,7 @@ class LlamaCpp(LLM): llama_cpp_args: Dict[str, Any] = Field( {"stop": ["[INST]"]}, - description="A list of additional arguments to pass to llama.cpp. See [here](https://github.com/ggerganov/llama.cpp/tree/master/examples/server#api-endpoints) for the complete catalog of options.", + description="A list of additional arguments to pass to llama.cpp. See https://github.com/ggerganov/llama.cpp/tree/master/examples/server#api-endpoints for the complete catalog of options.", ) class Config: diff --git a/server/continuedev/libs/llm/openai.py b/server/continuedev/libs/llm/openai.py index d645e152d..faa69fc1e 100644 --- a/server/continuedev/libs/llm/openai.py +++ b/server/continuedev/libs/llm/openai.py @@ -42,9 +42,9 @@ class OpenAI(LLM): The OpenAI class can be used to access OpenAI models like GPT-4, GPT-4 Turbo, and GPT-3.5 Turbo. ### Azure OpenAI Service - + If you'd like to use OpenAI models but are concerned about privacy, you can use the Azure OpenAI service, which is GDPR and HIPAA compliant. After applying for access [here](https://azure.microsoft.com/en-us/products/ai-services/openai-service), you will typically hear back within only a few days. Once you have access, set up a model in `config.json` like so: - + ```json "models": [{ "title": "Azure OpenAI", @@ -59,20 +59,20 @@ class OpenAI(LLM): ``` The easiest way to find this information is from the chat playground in the Azure OpenAI portal. Under the "Chat Session" section, click "View Code" to see each of these parameters. - + ### OpenAI compatible servers / APIs - + OpenAI compatible servers - [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation) - [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md) - [LocalAI](https://localai.io/basics/getting_started/) - [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server) - + OpenAI compatible APIs - [Anyscale Endpoints](https://github.com/continuedev/deploy-os-code-llm#others) - [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints) - - If you are [using an OpenAI compatible server / API](../model-setup/select-provider#local), you can change the `api_base` like this: + + If you are [using an OpenAI compatible server / API](../../model-setup/select-provider#local), you can change the `api_base` like this: ```json title="~/.continue/config.json" { From 76cb010b6f9d0fb45a2d6ce60f3b31f5abd499f6 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 1 Dec 2023 11:48:07 -0800 Subject: [PATCH 20/22] =?UTF-8?q?=F0=9F=90=9B=20fix=20serialization=20of?= =?UTF-8?q?=20SlashCommand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/continuedev/core/config.py | 8 +++ server/continuedev/plugins/steps/codebase.py | 59 +++++++++----------- 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/server/continuedev/core/config.py b/server/continuedev/core/config.py index c3f4e33fe..685abe3f9 100644 --- a/server/continuedev/core/config.py +++ b/server/continuedev/core/config.py @@ -60,6 +60,14 @@ class SlashCommand(BaseModel): else: return v + def dict(self, *args, **kwargs): + d = super().dict(*args, **kwargs) + if isinstance(d["step"], str): + d["step"] = d["step"].split(".")[-1] + else: + d["step"] = d["step"].__name__ + return d + def slash_command_description(self) -> SlashCommandDescription: return SlashCommandDescription( name=self.name, diff --git a/server/continuedev/plugins/steps/codebase.py b/server/continuedev/plugins/steps/codebase.py index e5dab20f8..4e5642429 100644 --- a/server/continuedev/plugins/steps/codebase.py +++ b/server/continuedev/plugins/steps/codebase.py @@ -24,42 +24,35 @@ PROMPT = """Use the above code to answer the following question. You should not async def get_faster_model(sdk: ContinueSDK) -> Optional[LLM]: - def get_model_description() -> Optional[ModelDescription]: - # First, check for GPT-3/3.5 - models = sdk.config.models - if gpt3_model := next(filter(lambda m: "gpt-3" in m.model, models), None): - return gpt3_model + # First, check for GPT-3/3.5 + models: List[LLM] = sdk.config.models + if gpt3_model := next(filter(lambda m: "gpt-3" in m.model, models), None): + return gpt3_model - # Then, check for OpenAIFreeTrial - if openai_free_trial_model := next( - filter(lambda m: m.__class__.__name__ == "OpenAIFreeTrial", models), None - ): - new_model = openai_free_trial_model.copy() - new_model.model = "gpt-3.5-turbo" - return new_model + # Then, check for OpenAIFreeTrial + if openai_free_trial_model := next( + filter(lambda m: m.__class__.__name__ == "OpenAIFreeTrial", models), None + ): + new_model = openai_free_trial_model.copy() + new_model.model = "gpt-3.5-turbo" + return new_model - # Then, check for an API Key - if openai_model := next( - filter( - lambda m: hasattr(m, "api_key") - and m.api_key is not None - and m.api_key.startswith("sk-"), - models, - ), - None, - ): - new_model = openai_model.copy() - new_model.model = "gpt-3.5-turbo" - return new_model + # Then, check for an API Key + if openai_model := next( + filter( + lambda m: hasattr(m, "api_key") + and m.api_key is not None + and m.api_key.startswith("sk-"), + models, + ), + None, + ): + new_model = openai_model.copy() + new_model.model = "gpt-3.5-turbo" + return new_model - # Return None, so re-ranking probably shouldn't happen - return None - - if desc := get_model_description(): - llm = sdk.config.create_llm(desc) - llm.start(sdk.ide.window_info.unique_id) - else: - return None + # Return None, so re-ranking probably shouldn't happen + return None class AnswerQuestionChroma(Step): From 046421d12e8f95438b04a5a134d61420a2de5dde Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 1 Dec 2023 20:05:32 +0000 Subject: [PATCH 21/22] =?UTF-8?q?=F0=9F=92=9A=20Update=20package.json=20ve?= =?UTF-8?q?rsion=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/package-lock.json | 4 ++-- extensions/vscode/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 0ba25e7c1..29e40746a 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.7.22", + "version": "0.7.23", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "continue", - "version": "0.7.22", + "version": "0.7.23", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 7a664115e..7c3a03e0d 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -1,7 +1,7 @@ { "name": "continue", "icon": "media/icon.png", - "version": "0.7.22", + "version": "0.7.23", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From a19173ff619ea1a2c222a953a4918e4178961fde Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Fri, 1 Dec 2023 13:33:58 -0800 Subject: [PATCH 22/22] =?UTF-8?q?=F0=9F=90=9B=20fix=20error=20with=20/code?= =?UTF-8?q?base?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/continuedev/core/models.py | 4 +--- server/continuedev/plugins/steps/codebase.py | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/server/continuedev/core/models.py b/server/continuedev/core/models.py index cb1da7d80..2d871f202 100644 --- a/server/continuedev/core/models.py +++ b/server/continuedev/core/models.py @@ -118,9 +118,7 @@ class Models(BaseModel): temperature: Optional[float], ): """Start each of the LLMs, or fall back to default""" - for role in ALL_MODEL_ROLES: - model: LLM = getattr(self, role) - + for model in self.saved + self.all_models: model.start(unique_id) model.write_log = self.write_log diff --git a/server/continuedev/plugins/steps/codebase.py b/server/continuedev/plugins/steps/codebase.py index 4e5642429..032d050d2 100644 --- a/server/continuedev/plugins/steps/codebase.py +++ b/server/continuedev/plugins/steps/codebase.py @@ -160,7 +160,10 @@ class AnswerQuestionChroma(Step): model = sdk.models.chat.model # if model == "gpt-4": # model = "gpt-4-32k" # Not publicly available yet? - if model == "gpt-3.5-turbo": + if ( + model == "gpt-3.5-turbo" + and not sdk.models.chat.__class__.__name__ == "OpenAIFreeTrial" + ): model = "gpt-3.5-turbo-16k" await sdk.run_step(