summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-07-24 01:00:42 -0700
committerNate Sesti <sestinj@gmail.com>2023-07-24 01:00:42 -0700
commit85ce06beb9b2d587b0b572117a98318d226bed61 (patch)
tree76fc6232b5219d0bd61b547b26624641a99e7b9b /docs
parent699a74250fd4cf91af930ff63077aeb81f74856f (diff)
parent885f88af1d7b35e03b1de4df3e74a60da1a777ed (diff)
downloadsncontinue-85ce06beb9b2d587b0b572117a98318d226bed61.tar.gz
sncontinue-85ce06beb9b2d587b0b572117a98318d226bed61.tar.bz2
sncontinue-85ce06beb9b2d587b0b572117a98318d226bed61.zip
Merge branch 'main' into show-react-immediately
Diffstat (limited to 'docs')
-rw-r--r--docs/docs/customization.md121
-rw-r--r--docs/docs/getting-started.md4
-rw-r--r--docs/sidebars.js10
3 files changed, 134 insertions, 1 deletions
diff --git a/docs/docs/customization.md b/docs/docs/customization.md
new file mode 100644
index 00000000..9e04280d
--- /dev/null
+++ b/docs/docs/customization.md
@@ -0,0 +1,121 @@
+# Customization
+
+Continue can be deeply customized by editing the `ContinueConfig` object in `~/.continue/config.py` on your machine. This file is created the first time you run Continue.
+
+## Change the default LLM
+
+Change the `default_model` field to any of "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-4", "claude-2", or "ggml".
+
+### claude-2 and gpt-X
+
+If you have access, simply set `default_model` to the model you would like to use, then you will be prompted for a personal API key after reloading VS Code. If using an OpenAI model, you can press enter to try with our API key for free.
+
+### Local models with ggml
+
+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.
+
+### 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 `default_model` to "gpt-4", and then set the `azure_openai_info` property in the `ContinueConfig` like so:
+
+```python
+config = ContinueConfig(
+ ...
+ azure_openai_info=AzureInfo(
+ endpoint="https://my-azure-openai-instance.openai.azure.com/",
+ engine="my-azure-openai-deployment",
+ api_version="2023-03-15-preview"
+ )
+)
+```
+
+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. Finally, find one of your Azure OpenAI keys and enter it in the VS Code settings under `continue.OPENAI_API_KEY`.
+
+## Customize System Message
+
+You can write your own system message, a set of instructions that will always be top-of-mind for the LLM, by setting the `system_message` property to any string. For example, you might request "Please make all responses as concise as possible and never repeat something you have already explained."
+
+System messages can also reference files. For example, if there is a markdown file (e.g. at `/Users/nate/Documents/docs/reference.md`) you'd like the LLM to know about, you can reference it with [Mustache](http://mustache.github.io/mustache.5.html) templating like this: "Please reference this documentation: {{ Users/nate/Documents/docs/reference.md }}". As of now, you must use an absolute path.
+
+## Custom Commands
+
+You can add custom slash commands by adding a `CustomCommand` object to the `custom_commands` property. Each `CustomCommand` has
+
+- `name`: the name of the command, which will be invoked with `/name`
+- `description`: a short description of the command, which will appear in the dropdown
+- `prompt`: a set of instructions to the LLM, which will be shown in the prompt
+
+Custom commands are great when you are frequently reusing a prompt. For example, if you've crafted a great prompt and frequently ask the LLM to check for mistakes in your code, you could add a command like this:
+
+```python
+config = ContinueConfig(
+ ...
+ custom_commands=[
+ CustomCommand(
+ name="check",
+ description="Check for mistakes in my code",
+ prompt=dedent("""\
+ Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:
+ - Syntax errors
+ - Logic errors
+ - Security vulnerabilities
+ - Performance issues
+ - Anything else that looks wrong
+
+ Once you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying "I think there is a syntax error on line 5", you should say "Syntax error on line 5". Give your answer as one bullet point per mistake found.""")
+ )
+ ]
+)
+```
+
+## Temperature
+
+Set `temperature` to any value between 0 and 1. Higher values will make the LLM more creative, while lower values will make it more predictable. The default is 0.5.
+
+## Custom Context Providers
+
+When you type '@' in the Continue text box, it will display a dropdown of items that can be selected to include in your message as context. For example, you might want to reference a GitHub Issue, file, or Slack thread. All of these options are provided by a `ContextProvider` class, and we make it easy to write your own. As an example, here is the `GitHubIssuesContextProvider`, which lets you search all open GitHub Issues in a repo:
+
+```python
+class GitHubIssuesContextProvider(ContextProvider):
+ """
+ The GitHubIssuesContextProvider is a ContextProvider that allows you to search GitHub issues in a repo.
+ """
+
+ title = "issues"
+ repo_name: str
+ auth_token: str
+
+ async def provide_context_items(self) -> List[ContextItem]:
+ auth = Auth.Token(self.auth_token)
+ gh = Github(auth=auth)
+
+ repo = gh.get_repo(self.repo_name)
+ issues = repo.get_issues().get_page(0)
+
+ return [ContextItem(
+ content=issue.body,
+ description=ContextItemDescription(
+ name=f"Issue #{issue.number}",
+ description=issue.title,
+ id=ContextItemId(
+ provider_title=self.title,
+ item_id=issue.id
+ )
+ )
+ ) for issue in issues]
+```
+
+It can then be set in the `ContinueConfig` like so:
+
+```python
+config = ContinueConfig(
+ ...
+ context_providers=[
+ GitHubIssuesContextProvider(
+ repo_name="my-github-username-or-org/my-github-repo",
+ auth_token="my-github-auth-token"
+ )
+ ]
+)
+```
diff --git a/docs/docs/getting-started.md b/docs/docs/getting-started.md
index 753c1479..fc19552e 100644
--- a/docs/docs/getting-started.md
+++ b/docs/docs/getting-started.md
@@ -2,6 +2,10 @@
## Recommended: Install in VS Code
+:::note
+Continue requires that you have Python 3.8 or greater. If you do not, please [install](https://python.org) it
+:::
+
1. Click `Install` on the **[Continue extension in the Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=Continue.continue)**
2. This will open the Continue extension page in VS Code, where you will need to click `Install` again
diff --git a/docs/sidebars.js b/docs/sidebars.js
index 9baf1b94..83b34ee8 100644
--- a/docs/sidebars.js
+++ b/docs/sidebars.js
@@ -13,7 +13,15 @@
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
- docsSidebar: ["intro", "getting-started", "how-to-use-continue", "how-continue-works", "telemetry", "collecting-data"],
+ docsSidebar: [
+ "intro",
+ "getting-started",
+ "how-to-use-continue",
+ "how-continue-works",
+ "telemetry",
+ "collecting-data",
+ "customization",
+ ],
};
module.exports = sidebars;