📝 docs update and config modifier
This commit is contained in:
parent
28c9d52e34
commit
08116e5808
34 changed files with 279 additions and 416 deletions
|
|
@ -16,88 +16,67 @@ When you enter your next input, Continue will see the full contents of each of t
|
|||
|
||||
## Built-in Context Providers
|
||||
|
||||
To use any of the built-in context providers, open `~/.continue/config.py` (can do this with the '/config' slash command). For each context provider, you will
|
||||
|
||||
1. Import the context provider at the top of the file
|
||||
2. Add it to the `context_providers` list in the `ContinueConfig` object
|
||||
|
||||
Setup instructions are below for each (showing the import and config object). You can also see examples by opening `~/.continue/config.py`.
|
||||
To use any of the built-in context providers, open `~/.continue/config.json` (can do this with the '/config' slash command) and add it to the `context_providers` list.
|
||||
|
||||
### GitHub
|
||||
|
||||
Type '@issue' to reference the title and contents of a GitHub issue.
|
||||
|
||||
```python
|
||||
from continuedev.plugins.context_providers.github import GitHubIssuesContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
GitHubIssuesContextProvider(
|
||||
repo_name="continuedev/continue", # change to whichever repo you want to use
|
||||
auth_token="<my_github_auth_token>",
|
||||
)
|
||||
```json
|
||||
{
|
||||
"name": "github",
|
||||
"params": {
|
||||
// Change to whichever repo you want to use
|
||||
"repo_name": "continuedev/continue",
|
||||
"auth_token": "<my_github_auth_token>"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Codebase Search
|
||||
|
||||
Type '@search' to reference the results of codebase search, just like the results you would get from VS Code search.
|
||||
|
||||
```python
|
||||
from continuedev.plugins.context_providers.search import SearchContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
SearchContextProvider() # No arguments necessary
|
||||
```json
|
||||
{ "name": "search" }
|
||||
```
|
||||
|
||||
### URLs
|
||||
|
||||
Type '@url' to reference the contents of a URL. You can either reference preset URLs, or reference one dynamically by typing '@url https://example.com'. The text contents of the page will be fetched and used as context.
|
||||
|
||||
```python
|
||||
from continuedev.plugins.context_providers.url import URLContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
URLContextProvider(preset_urls=["https://continue.dev/docs/customization"])
|
||||
```json
|
||||
{
|
||||
"name": "url",
|
||||
"params": { "preset_urls": ["https://continue.dev/docs/customization"] }
|
||||
}
|
||||
```
|
||||
|
||||
### Git Diff
|
||||
|
||||
Type '@diff' to reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing.
|
||||
|
||||
```python
|
||||
from continuedev.plugins.context_providers.diff import DiffContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
DiffContextProvider()
|
||||
```json
|
||||
{ "name": "diff" }
|
||||
```
|
||||
|
||||
### File Tree
|
||||
|
||||
Type '@tree' to reference the contents of your current workspace. The LLM will be able to see the nested directory structure of your project.
|
||||
|
||||
```python
|
||||
from continuedev.plugins.context_providers.filetree import FileTreeContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
FileTreeContextProvider()
|
||||
```json
|
||||
{ "name": "tree" }
|
||||
```
|
||||
|
||||
### Google
|
||||
|
||||
Type '@google' to reference the results of a Google search. For example, type "@google python tutorial" if you want to search and discuss ways of learning Python.
|
||||
|
||||
```python
|
||||
from continuedev.plugins.context_providers.google import GoogleContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
GoogleContextProvider(
|
||||
serper_api_key="<your serper.dev api key>"
|
||||
)
|
||||
```json
|
||||
{
|
||||
"name": "google",
|
||||
"params": { "serper_api_key": "<your serper.dev api key>" }
|
||||
}
|
||||
```
|
||||
|
||||
Note: You can get an API key for free at [serper.dev](https://serper.dev).
|
||||
|
|
@ -106,12 +85,8 @@ Note: You can get an API key for free at [serper.dev](https://serper.dev).
|
|||
|
||||
Type '@terminal' to reference the contents of your IDE's terminal.
|
||||
|
||||
```python
|
||||
from continuedev.plugins.context_providers.terminal import TerminalContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
TerminalContextProvider()
|
||||
```json
|
||||
{ "name": "terminal" }
|
||||
```
|
||||
|
||||
### Requesting Context Providers
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ keywords: [openai, anthropic, PaLM, ollama, ggml]
|
|||
|
||||
# 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.py`. Once you've done this, you will be able to switch between them with the model selection dropdown.
|
||||
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
|
||||
|
||||
|
|
@ -30,23 +30,52 @@ Open-Source Models (not local)
|
|||
|
||||
## Change the default LLM
|
||||
|
||||
In `config.py`, you'll find the `models` property:
|
||||
In `config.json`, you'll find the `models` property, a list of the models that you have saved to use with Continue:
|
||||
|
||||
```python
|
||||
from continuedev.core.models import Models
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
models=Models(
|
||||
default=OpenAIFreeTrial(model="gpt-4"),
|
||||
summarize=OpenAIFreeTrial(model="gpt-3.5-turbo")
|
||||
)
|
||||
)
|
||||
```json
|
||||
"models": [
|
||||
{
|
||||
"title": "Smart Model",
|
||||
"provider": "openai-free-trial",
|
||||
"model": "gpt-4"
|
||||
},
|
||||
{
|
||||
"title": "Fast Model",
|
||||
"provider": "openai-free-trial",
|
||||
"model": "gpt-3.5-turbo"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
The `default` and `summarize` properties are different _model roles_. This allows different models to be used for different tasks. The available roles are `default`, `summarize`, `edit`, and `chat`. `edit` is used when you use the '/edit' slash command, `chat` is used for all chat responses, and `summarize` is used for summarizing. If not set, all roles will fall back to `default`. The values of these fields must be of the [`LLM`](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/__init__.py) class, which implements methods for retrieving and streaming completions from an LLM.
|
||||
Also in `config.json` is the `model_roles` property. This is optional, but allows you to specify different models to be used for different tasks. The available roles are `default`, `summarize`, `edit`, and `chat`. `edit` is used when you use the '/edit' slash command, `chat` is used for all chat responses, and `summarize` is used for summarizing. If not set, all roles will fall back to `default`. The values of each role must match the `title` property of one of the models in `models`.
|
||||
|
||||
Below, we describe the `LLM` classes available in the Continue core library, and how they can be used.
|
||||
```json
|
||||
"model_roles": {
|
||||
"default": "Smart Model",
|
||||
"summarize": "Fast Model"
|
||||
}
|
||||
```
|
||||
|
||||
Just by specifying the `model` and `provider` properties, we will automatically detect prompt templates and other important information, but if you're looking to do something beyond this basic setup, we'll explain a few other options below.
|
||||
|
||||
## 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": "<MY_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.
|
||||
|
||||
## Self-hosting an open-source model
|
||||
|
||||
|
|
@ -54,35 +83,9 @@ If you want to self-host on Colab, RunPod, HuggingFace, Haven, or another hostin
|
|||
|
||||
If by chance the provider has the exact same API interface as OpenAI, the `OpenAI` class will work for you out of the box, after changing only the `api_base` parameter.
|
||||
|
||||
## 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, instantiate the model like so:
|
||||
|
||||
```python
|
||||
from continuedev.libs.llm.openai import OpenAI
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
models=Models(
|
||||
default=OpenAI(
|
||||
api_key="my-api-key",
|
||||
model="gpt-3.5-turbo",
|
||||
api_base="https://my-azure-openai-instance.openai.azure.com/",
|
||||
engine="my-azure-openai-deployment",
|
||||
api_version="2023-07-01-preview",
|
||||
api_type="azure"
|
||||
)
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
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`.
|
||||
|
||||
Note that you can also use these parameters for uses other than Azure, such as self-hosting a model.
|
||||
|
||||
## Customizing the Chat Template
|
||||
|
||||
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]". Other than for the OpenAI classes, the llama2 chat format is the default, but this is not correct for all models. If you are receiving nonsense responses, you can use the `template_messages` property to set the chat template to match the model you are using. This property is a function that takes a list of `ChatMessage`s and returns a string.
|
||||
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"]`.
|
||||
|
||||
Here is an example of `template_messages` for the Alpaca/Vicuna format:
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ keywords: [custom, slash commands, models, context providers]
|
|||
|
||||
# Overview
|
||||
|
||||
Continue can be deeply customized by editing the `ContinueConfig` object in `~/.continue/config.py` (`%userprofile%\.continue\config.py` for Windows) on your machine. This file is created the first time you run Continue.
|
||||
Continue can be deeply customized by editing `~/.continue/config.json` (`%userprofile%\.continue\config.json` for Windows) on your machine. This file is created the first time you run Continue.
|
||||
|
||||
Currently, you can customize the following:
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ There are two ways to add custom slash commands:
|
|||
|
||||
## "Custom Commands" (Use Natural Language)
|
||||
|
||||
You can add custom slash commands by adding a `CustomCommand` object to the `custom_commands` property. Each `CustomCommand` has
|
||||
You can add custom slash commands by adding to the `custom_commands` property in `config.json`.
|
||||
|
||||
- `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
|
||||
|
|
@ -23,25 +23,21 @@ You can add custom slash commands by adding a `CustomCommand` object to the `cus
|
|||
|
||||
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
|
||||
```json
|
||||
custom_commands=[{
|
||||
"name": "check",
|
||||
"description": "Check for mistakes in my code",
|
||||
"prompt": """\
|
||||
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.""")
|
||||
)
|
||||
]
|
||||
)
|
||||
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.""")
|
||||
)
|
||||
}]
|
||||
```
|
||||
|
||||
## Custom Slash Commands
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
|
||||
Type '@diff' to reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing.
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/diff.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/plugins/context_providers/diff.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
|
||||
The FileContextProvider is a ContextProvider that allows you to search files in the open workspace.
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/file.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/plugins/context_providers/file.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
|
||||
Type '@tree' to reference the contents of your current workspace. The LLM will be able to see the nested directory structure of your project.
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/filetree.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/plugins/context_providers/filetree.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
|
||||
The GitHubIssuesContextProvider is a ContextProvider that allows you to search GitHub issues in a repo. Type '@issue' to reference the title and contents of an issue.
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/github.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/plugins/context_providers/github.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
|
||||
Type '@google' to reference the results of a Google search. For example, type "@google python tutorial" if you want to search and discuss ways of learning Python.
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/google.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/plugins/context_providers/google.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
|
||||
Type '@search' to reference the results of codebase search, just like the results you would get from VS Code search.
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/search.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/plugins/context_providers/search.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
|
||||
Type '@terminal' to reference the contents of your IDE's terminal.
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/terminal.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/plugins/context_providers/terminal.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
|
||||
Type '@url' to reference the contents of a URL. You can either reference preset URLs, or reference one dynamically by typing '@url https://example.com'. The text contents of the page will be fetched and used as context.
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/plugins/context_providers/url.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/plugins/context_providers/url.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ config = ContinueConfig(
|
|||
|
||||
Claude 2 is not yet publicly released. You can request early access [here](https://www.anthropic.com/earlyaccess).
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/anthropic.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/anthropic.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
@ -25,21 +25,13 @@ Claude 2 is not yet publicly released. You can request early access [here](https
|
|||
|
||||
### Inherited Properties
|
||||
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "The API key for the LLM provider.", "type": "string"}' required={true} default=""/>
|
||||
<ClassPropertyRef name='title' details='{"title": "Title", "description": "A title that will identify this model in the model selection dropdown", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='unique_id' details='{"title": "Unique Id", "description": "The unique ID of the user.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to be used (e.g. gpt-4, codellama)", "default": "claude-2", "type": "string"}' required={false} default="claude-2"/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "The base URL of the LLM API.", "type": "string"}' required={false} default=""/>
|
||||
|
|
|
|||
|
|
@ -19,12 +19,10 @@ config = ContinueConfig(
|
|||
)
|
||||
```
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/ggml.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/ggml.py)
|
||||
|
||||
## Properties
|
||||
|
||||
<ClassPropertyRef name='server_url' details='{"title": "Server Url", "description": "URL of the OpenAI-compatible server where the model is being served", "default": "http://localhost:8000", "type": "string"}' required={false} default="http://localhost:8000"/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "OpenAI API base URL.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='api_type' details='{"title": "Api Type", "description": "OpenAI API type.", "enum": ["azure", "openai"], "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='api_version' details='{"title": "Api Version", "description": "OpenAI API version. For use with Azure OpenAI Service.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='engine' details='{"title": "Engine", "description": "OpenAI engine. For use with Azure OpenAI Service.", "type": "string"}' required={false} default=""/>
|
||||
|
|
@ -37,16 +35,8 @@ config = ContinueConfig(
|
|||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to use (optional for the GGML class)", "default": "ggml", "type": "string"}' required={false} default="ggml"/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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 OR an instance of the PromptTemplate class if you want to control other parameters. See the documentation for more information.", "default": {"edit": {"model": null, "temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": ["[/CODE]"], "max_tokens": 600, "functions": null, "prompt": "[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: \"Rewrite the above code in order to {{{user_input}}}\"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here's the code you requested:\n[CODE]", "raw": true}}, "type": "object"}' required={false} default="{'edit': {'model': None, 'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': ['[/CODE]'], 'max_tokens': 600, 'functions': None, 'prompt': '[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: "Rewrite the above code in order to {{{user_input}}}"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here\'s the code you requested:\n[CODE]', 'raw': True}}"/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "The API key for the LLM provider.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "URL of the OpenAI-compatible server where the model is being served", "default": "http://localhost:8000", "type": "string"}' required={false} default="http://localhost:8000"/>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ config = ContinueConfig(
|
|||
)
|
||||
```
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/google_palm_api.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/google_palm_api.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
@ -32,15 +32,7 @@ config = ContinueConfig(
|
|||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to be used (e.g. gpt-4, codellama)", "default": "chat-bison-001", "type": "string"}' required={false} default="chat-bison-001"/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "The base URL of the LLM API.", "type": "string"}' required={false} default=""/>
|
||||
|
|
|
|||
|
|
@ -18,31 +18,21 @@ config = ContinueConfig(
|
|||
)
|
||||
```
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/hf_inference_api.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/hf_inference_api.py)
|
||||
|
||||
## Properties
|
||||
|
||||
<ClassPropertyRef name='hf_token' details='{"title": "Hf Token", "description": "Your Hugging Face API token", "type": "string"}' required={true} default=""/>
|
||||
<ClassPropertyRef name='endpoint_url' details='{"title": "Endpoint Url", "description": "Your Hugging Face Inference API endpoint URL", "type": "string"}' required={false} default=""/>
|
||||
|
||||
|
||||
### Inherited Properties
|
||||
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "Your Hugging Face API token", "type": "string"}' required={true} default=""/>
|
||||
<ClassPropertyRef name='title' details='{"title": "Title", "description": "A title that will identify this model in the model selection dropdown", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='unique_id' details='{"title": "Unique Id", "description": "The unique ID of the user.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to use (optional for the HuggingFaceInferenceAPI class)", "default": "Hugging Face Inference API", "type": "string"}' required={false} default="Hugging Face Inference API"/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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 OR an instance of the PromptTemplate class if you want to control other parameters. See the documentation for more information.", "default": {"edit": {"model": null, "temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": ["[/CODE]"], "max_tokens": 600, "functions": null, "prompt": "[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: \"Rewrite the above code in order to {{{user_input}}}\"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here's the code you requested:\n[CODE]", "raw": true}}, "type": "object"}' required={false} default="{'edit': {'model': None, 'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': ['[/CODE]'], 'max_tokens': 600, 'functions': None, 'prompt': '[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: "Rewrite the above code in order to {{{user_input}}}"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here\'s the code you requested:\n[CODE]', 'raw': True}}"/>
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "The API key for the LLM provider.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "Your Hugging Face Inference API endpoint URL", "type": "string"}' required={false} default=""/>
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
|
||||
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/hf_tgi.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/hf_tgi.py)
|
||||
|
||||
## Properties
|
||||
|
||||
<ClassPropertyRef name='server_url' details='{"title": "Server Url", "description": "URL of your TGI server", "default": "http://localhost:8080", "type": "string"}' required={false} default="http://localhost:8080"/>
|
||||
|
||||
|
||||
### Inherited Properties
|
||||
|
|
@ -18,16 +17,8 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to be used (e.g. gpt-4, codellama)", "default": "huggingface-tgi", "type": "string"}' required={false} default="huggingface-tgi"/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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 OR an instance of the PromptTemplate class if you want to control other parameters. See the documentation for more information.", "default": {"edit": {"model": null, "temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": ["[/CODE]"], "max_tokens": 600, "functions": null, "prompt": "[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: \"Rewrite the above code in order to {{{user_input}}}\"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here's the code you requested:\n[CODE]", "raw": true}}, "type": "object"}' required={false} default="{'edit': {'model': None, 'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': ['[/CODE]'], 'max_tokens': 600, 'functions': None, 'prompt': '[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: "Rewrite the above code in order to {{{user_input}}}"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here\'s the code you requested:\n[CODE]', 'raw': True}}"/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "The API key for the LLM provider.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "URL of your TGI server", "default": "http://localhost:8080", "type": "string"}' required={false} default="http://localhost:8080"/>
|
||||
|
|
|
|||
|
|
@ -23,11 +23,10 @@ config = ContinueConfig(
|
|||
)
|
||||
```
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/llamacpp.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/llamacpp.py)
|
||||
|
||||
## Properties
|
||||
|
||||
<ClassPropertyRef name='server_url' details='{"title": "Server Url", "description": "URL of the server", "default": "http://localhost:8080", "type": "string"}' required={false} default="http://localhost:8080"/>
|
||||
<ClassPropertyRef name='llama_cpp_args' details='{"title": "Llama Cpp Args", "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.", "default": {"stop": ["[INST]"]}, "type": "object"}' required={false} default="{'stop': ['[INST]']}"/>
|
||||
|
||||
|
||||
|
|
@ -38,16 +37,8 @@ config = ContinueConfig(
|
|||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to be used (e.g. gpt-4, codellama)", "default": "llamacpp", "type": "string"}' required={false} default="llamacpp"/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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 OR an instance of the PromptTemplate class if you want to control other parameters. See the documentation for more information.", "default": {"edit": {"model": null, "temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": ["[/CODE]"], "max_tokens": 600, "functions": null, "prompt": "[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: \"Rewrite the above code in order to {{{user_input}}}\"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here's the code you requested:\n[CODE]", "raw": true}}, "type": "object"}' required={false} default="{'edit': {'model': None, 'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': ['[/CODE]'], 'max_tokens': 600, 'functions': None, 'prompt': '[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: "Rewrite the above code in order to {{{user_input}}}"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here\'s the code you requested:\n[CODE]', 'raw': True}}"/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "The API key for the LLM provider.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "URL of the server", "default": "http://localhost:8080", "type": "string"}' required={false} default="http://localhost:8080"/>
|
||||
|
|
|
|||
|
|
@ -15,11 +15,10 @@ config = ContinueConfig(
|
|||
)
|
||||
```
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/ollama.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/ollama.py)
|
||||
|
||||
## Properties
|
||||
|
||||
<ClassPropertyRef name='server_url' details='{"title": "Server Url", "description": "URL of the Ollama server", "default": "http://localhost:11434", "type": "string"}' required={false} default="http://localhost:11434"/>
|
||||
|
||||
|
||||
### Inherited Properties
|
||||
|
|
@ -29,16 +28,8 @@ config = ContinueConfig(
|
|||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to be used (e.g. gpt-4, codellama)", "default": "llama2", "type": "string"}' required={false} default="llama2"/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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 OR an instance of the PromptTemplate class if you want to control other parameters. See the documentation for more information.", "default": {"edit": {"model": null, "temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": ["[/CODE]"], "max_tokens": 600, "functions": null, "prompt": "[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: \"Rewrite the above code in order to {{{user_input}}}\"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here's the code you requested:\n[CODE]", "raw": true}}, "type": "object"}' required={false} default="{'edit': {'model': None, 'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': ['[/CODE]'], 'max_tokens': 600, 'functions': None, 'prompt': '[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: "Rewrite the above code in order to {{{user_input}}}"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here\'s the code you requested:\n[CODE]', 'raw': True}}"/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "The API key for the LLM provider.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "URL of the Ollama server", "default": "http://localhost:11434", "type": "string"}' required={false} default="http://localhost:11434"/>
|
||||
|
|
|
|||
|
|
@ -28,15 +28,14 @@ Options for serving models locally with an OpenAI-compatible server include:
|
|||
- [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/libs/llm/openai.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/openai.py)
|
||||
|
||||
## Properties
|
||||
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "OpenAI API base URL.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='api_type' details='{"title": "Api Type", "description": "OpenAI API type.", "enum": ["azure", "openai"], "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='api_version' details='{"title": "Api Version", "description": "OpenAI API version. For use with Azure OpenAI Service.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='use_legacy_completions_endpoint' details='{"title": "Use Legacy Completions Endpoint", "description": "Manually specify to use the legacy completions endpoint instead of chat completions.", "default": false, "type": "boolean"}' required={false} default="False"/>
|
||||
<ClassPropertyRef name='engine' details='{"title": "Engine", "description": "OpenAI engine. For use with Azure OpenAI Service.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='use_legacy_completions_endpoint' details='{"title": "Use Legacy Completions Endpoint", "description": "Manually specify to use the legacy completions endpoint instead of chat completions.", "default": false, "type": "boolean"}' required={false} default="False"/>
|
||||
|
||||
|
||||
### Inherited Properties
|
||||
|
|
@ -47,15 +46,7 @@ Options for serving models locally with an OpenAI-compatible server include:
|
|||
<ClassPropertyRef name='unique_id' details='{"title": "Unique Id", "description": "The unique ID of the user.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use for requests.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "OpenAI API base URL.", "type": "string"}' required={false} default=""/>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ The `OpenAIFreeTrial` class will automatically switch to using your API key inst
|
|||
|
||||
These classes support any models available through the OpenAI API, assuming your API key has access, including "gpt-4", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", and "gpt-4-32k".
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/openai_free_trial.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/openai_free_trial.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
@ -39,16 +39,8 @@ These classes support any models available through the OpenAI API, assuming your
|
|||
<ClassPropertyRef name='unique_id' details='{"title": "Unique Id", "description": "The unique ID of the user.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "The API key for the LLM provider.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "The base URL of the LLM API.", "type": "string"}' required={false} default=""/>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ config = ContinueConfig(
|
|||
)
|
||||
```
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/queued.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/queued.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
@ -31,16 +31,8 @@ config = ContinueConfig(
|
|||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to be used (e.g. gpt-4, codellama)", "default": "queued", "type": "string"}' required={false} default="queued"/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "The API key for the LLM provider.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "The base URL of the LLM API.", "type": "string"}' required={false} default=""/>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ config = ContinueConfig(
|
|||
|
||||
If you don't specify the `model` parameter, it will default to `replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781`.
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/replicate.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/replicate.py)
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
@ -34,15 +34,7 @@ If you don't specify the `model` parameter, it will default to `replicate/llama-
|
|||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to be used (e.g. gpt-4, codellama)", "default": "replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781", "type": "string"}' required={false} default="replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781"/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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 OR an instance of the PromptTemplate class if you want to control other parameters. See the documentation for more information.", "default": {"edit": {"model": null, "temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": ["[/CODE]"], "max_tokens": 600, "functions": null, "prompt": "[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: \"Rewrite the above code in order to {{{user_input}}}\"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here's the code you requested:\n[CODE]", "raw": true}}, "type": "object"}' required={false} default="{'edit': {'model': None, 'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': ['[/CODE]'], 'max_tokens': 600, 'functions': None, 'prompt': '[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: "Rewrite the above code in order to {{{user_input}}}"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here\'s the code you requested:\n[CODE]', 'raw': True}}"/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "The base URL of the LLM API.", "type": "string"}' required={false} default=""/>
|
||||
|
|
|
|||
|
|
@ -17,11 +17,10 @@ config = ContinueConfig(
|
|||
)
|
||||
```
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/text_gen_webui.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/text_gen_webui.py)
|
||||
|
||||
## Properties
|
||||
|
||||
<ClassPropertyRef name='server_url' details='{"title": "Server Url", "description": "URL of your TextGenWebUI server", "default": "http://localhost:5000", "type": "string"}' required={false} default="http://localhost:5000"/>
|
||||
<ClassPropertyRef name='streaming_url' details='{"title": "Streaming Url", "description": "URL of your TextGenWebUI streaming server (separate from main server URL)", "default": "http://localhost:5005", "type": "string"}' required={false} default="http://localhost:5005"/>
|
||||
|
||||
|
||||
|
|
@ -32,16 +31,8 @@ config = ContinueConfig(
|
|||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to be used (e.g. gpt-4, codellama)", "default": "text-gen-webui", "type": "string"}' required={false} default="text-gen-webui"/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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 OR an instance of the PromptTemplate class if you want to control other parameters. See the documentation for more information.", "default": {"edit": "Here is the code before editing:\n```\n{{{code_to_edit}}}\n```\n\nHere is the edit requested:\n\"{{{user_input}}}\"\n\nHere is the code after editing:"}, "type": "object"}' required={false} default="{'edit': 'Here is the code before editing:\n```\n{{{code_to_edit}}}\n```\n\nHere is the edit requested:\n"{{{user_input}}}"\n\nHere is the code after editing:'}"/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "The API key for the LLM provider.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "URL of your TextGenWebUI server", "default": "http://localhost:5000", "type": "string"}' required={false} default="http://localhost:5000"/>
|
||||
|
|
|
|||
|
|
@ -19,11 +19,10 @@ config = ContinueConfig(
|
|||
)
|
||||
```
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/libs/llm/together.py)
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/together.py)
|
||||
|
||||
## Properties
|
||||
|
||||
<ClassPropertyRef name='base_url' details='{"title": "Base Url", "description": "The base URL for your Together API instance", "default": "https://api.together.xyz", "type": "string"}' required={false} default="https://api.together.xyz"/>
|
||||
|
||||
|
||||
### Inherited Properties
|
||||
|
|
@ -34,15 +33,7 @@ config = ContinueConfig(
|
|||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to be used (e.g. gpt-4, codellama)", "default": "togethercomputer/RedPajama-INCITE-7B-Instruct", "type": "string"}' required={false} default="togethercomputer/RedPajama-INCITE-7B-Instruct"/>
|
||||
<ClassPropertyRef name='system_message' details='{"title": "System Message", "description": "A system message that will always be followed by the LLM", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='context_length' details='{"title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by count_tokens.", "default": 2048, "type": "integer"}' required={false} default="2048"/>
|
||||
<ClassPropertyRef name='stop_tokens' details='{"title": "Stop Tokens", "description": "Tokens that will stop the completion.", "type": "array", "items": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_p' details='{"title": "Top P", "description": "The top_p of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='top_k' details='{"title": "Top K", "description": "The top_k of the completion.", "type": "integer"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='presence_penalty' details='{"title": "Presence Penalty", "description": "The presence penalty Aof the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='frequency_penalty' details='{"title": "Frequency Penalty", "description": "The frequency penalty of the completion.", "type": "number"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='timeout' details='{"title": "Timeout", "description": "Set the timeout for each request to the LLM. If you are running a local LLM that takes a while to respond, you might want to set this to avoid timeouts.", "default": 300, "type": "integer"}' required={false} default="300"/>
|
||||
<ClassPropertyRef name='verify_ssl' details='{"title": "Verify Ssl", "description": "Whether to verify SSL certificates for requests.", "type": "boolean"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='ca_bundle_path' details='{"title": "Ca Bundle Path", "description": "Path to a custom CA bundle to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='proxy' details='{"title": "Proxy", "description": "Proxy URL to use when making the HTTP request", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='headers' details='{"title": "Headers", "description": "Headers to use when making the HTTP request", "type": "object", "additionalProperties": {"type": "string"}}' required={false} default=""/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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 OR an instance of the PromptTemplate class if you want to control other parameters. See the documentation for more information.", "default": {"edit": {"model": null, "temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": ["[/CODE]"], "max_tokens": 600, "functions": null, "prompt": "[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: \"Rewrite the above code in order to {{{user_input}}}\"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here's the code you requested:\n[CODE]", "raw": true}}, "type": "object"}' required={false} default="{'edit': {'model': None, 'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': ['[/CODE]'], 'max_tokens': 600, 'functions': None, 'prompt': '[CODE]\n{{{code_to_edit}}}\n[/CODE]\n[INST]\nYou are an expert programmer and personal assistant, here is your task: "Rewrite the above code in order to {{{user_input}}}"\n\nYour answer should start with a [CODE] tag and end with a [/CODE] tag.\n[/INST] Sure! Here\'s the code you requested:\n[CODE]', 'raw': True}}"/>
|
||||
<ClassPropertyRef name='completion_options' details='{"title": "Completion Options", "description": "Options for the completion endpoint. Read more about the completion options in the documentation.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 600}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 600}"/>
|
||||
<ClassPropertyRef name='request_options' details='{"title": "Request Options", "description": "Options for the HTTP request to the LLM.", "default": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}, "allOf": [{"$ref": "#/definitions/RequestOptions"}]}' required={false} default="{'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}"/>
|
||||
<ClassPropertyRef name='prompt_templates' details='{"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"}' required={false} default="{}"/>
|
||||
<ClassPropertyRef name='api_base' details='{"title": "Api Base", "description": "The base URL for your Together API instance", "default": "https://api.together.xyz", "type": "string"}' required={false} default="https://api.together.xyz"/>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -42,9 +42,12 @@ export default function ClassPropertyRef(props: ClassPropertyRefProps) {
|
|||
{props.default && (
|
||||
<span>
|
||||
{" "}
|
||||
= {details.type === "string" && '"'}
|
||||
{props.default}
|
||||
{details.type === "string" && '"'}
|
||||
={" "}
|
||||
<code>
|
||||
{details.type === "string" && '"'}
|
||||
{props.default}
|
||||
{details.type === "string" && '"'}
|
||||
</code>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
52
server/config.json
Normal file
52
server/config.json
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "GPT-4",
|
||||
"provider": "openai-free-trial",
|
||||
"model": "gpt-4"
|
||||
},
|
||||
{
|
||||
"title": "GPT-3.5-Turbo",
|
||||
"provider": "openai-free-trial",
|
||||
"model": "gpt-3.5-turbo"
|
||||
}
|
||||
],
|
||||
"model_roles": {
|
||||
"default": "GPT-4",
|
||||
"summarize": "GPT-3.5-Turbo"
|
||||
},
|
||||
"slash_commands": [
|
||||
{
|
||||
"name": "edit",
|
||||
"description": "Edit highlighted code",
|
||||
"step": "EditHighlightedCodeStep"
|
||||
},
|
||||
{
|
||||
"name": "config",
|
||||
"description": "Customize Continue",
|
||||
"step": "OpenConfigStep"
|
||||
},
|
||||
{
|
||||
"name": "comment",
|
||||
"description": "Write comments for the highlighted code",
|
||||
"step": "CommentCodeStep"
|
||||
},
|
||||
{
|
||||
"name": "share",
|
||||
"description": "Download and share this session",
|
||||
"step": "ShareSessionStep"
|
||||
},
|
||||
{
|
||||
"name": "cmd",
|
||||
"description": "Generate a shell command",
|
||||
"step": "GenerateShellCommandStep"
|
||||
}
|
||||
],
|
||||
"custom_commands": [
|
||||
{
|
||||
"name": "test",
|
||||
"prompt": "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
|
||||
"description": "Write unit tests for highlighted code"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
import importlib.util
|
||||
import json
|
||||
import os
|
||||
from contextlib import contextmanager
|
||||
|
|
@ -7,11 +8,8 @@ from pydantic import BaseModel, Field, validator
|
|||
|
||||
from ..libs.llm.base import LLM
|
||||
from ..libs.llm.openai_free_trial import OpenAIFreeTrial
|
||||
from ..libs.util.paths import (
|
||||
convertConfigImports,
|
||||
getConfigFilePath,
|
||||
getGlobalFolderPath,
|
||||
)
|
||||
from ..libs.util.logging import logger
|
||||
from ..libs.util.paths import getConfigFilePath, getGlobalFolderPath
|
||||
from ..libs.util.telemetry import posthog_logger
|
||||
from ..models.llm import BaseCompletionOptions, RequestOptions
|
||||
from .config_utils.context import (
|
||||
|
|
@ -228,7 +226,7 @@ class SerializedContinueConfig(BaseModel):
|
|||
)
|
||||
data_server_url: Optional[str] = Field(
|
||||
default="https://us-west1-autodebug.cloudfunctions.net",
|
||||
description="The URL of the server where development data is sent. No data is sent unless a valid user token is provided.",
|
||||
description="The URL of the server where development data is sent. No data is sent unless you have explicitly set the `user_token` property to a valid token that we have shared.",
|
||||
)
|
||||
disable_summaries: Optional[bool] = Field(
|
||||
default=False,
|
||||
|
|
@ -402,7 +400,7 @@ class ContinueConfig(BaseModel):
|
|||
)
|
||||
data_server_url: Optional[str] = Field(
|
||||
default="https://us-west1-autodebug.cloudfunctions.net",
|
||||
description="The URL of the server where development data is sent. No data is sent unless a valid user token is provided.",
|
||||
description="The URL of the server where development data is sent. No data is sent unless you have explicitly set the `user_token` property to a valid token that we have shared.",
|
||||
)
|
||||
disable_summaries: Optional[bool] = Field(
|
||||
default=False,
|
||||
|
|
@ -440,29 +438,45 @@ class ContinueConfig(BaseModel):
|
|||
)
|
||||
|
||||
@staticmethod
|
||||
def from_filepath(filepath: str, retry: bool = True) -> "ContinueConfig":
|
||||
if filepath.endswith(".json"):
|
||||
serialized_config = json.load(open(filepath))
|
||||
return ContinueConfig.from_serialized_config(
|
||||
SerializedContinueConfig(**serialized_config)
|
||||
)
|
||||
|
||||
# Use importlib to load the config file config.py at the given path
|
||||
def modifier_from_filepath(filepath: str):
|
||||
try:
|
||||
import importlib.util
|
||||
|
||||
spec = importlib.util.spec_from_file_location("config", filepath)
|
||||
config = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(config)
|
||||
|
||||
return config.config
|
||||
except ModuleNotFoundError as e:
|
||||
# Check if the module was "continuedev.src"
|
||||
if retry and e.name == "continuedev.src":
|
||||
convertConfigImports(shorten=True)
|
||||
return ContinueConfig.from_filepath(filepath, retry=False)
|
||||
else:
|
||||
raise e
|
||||
if hasattr(config, "modify_config"):
|
||||
return config.modify_config
|
||||
|
||||
except Exception as e:
|
||||
logger.warning(f"Failed to load config modifier from {filepath}: {e}")
|
||||
return None
|
||||
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def from_filepath(filepath: str, retry: bool = True) -> "ContinueConfig":
|
||||
if filepath.endswith(".json"):
|
||||
serialized_config = json.load(open(filepath))
|
||||
initial_config = ContinueConfig.from_serialized_config(
|
||||
SerializedContinueConfig(**serialized_config)
|
||||
)
|
||||
if modifier := ContinueConfig.modifier_from_filepath(
|
||||
filepath[: len(".json")] + ".py"
|
||||
):
|
||||
try:
|
||||
return modifier(initial_config)
|
||||
except Exception as e:
|
||||
logger.warning(f"Failed to modify config: {e}")
|
||||
return initial_config
|
||||
|
||||
return initial_config
|
||||
|
||||
# Use importlib to load the config file config.py at the given path
|
||||
spec = importlib.util.spec_from_file_location("config", filepath)
|
||||
config = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(config)
|
||||
|
||||
return config.config
|
||||
|
||||
@staticmethod
|
||||
def load_default() -> "ContinueConfig":
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
from typing import Dict, Literal
|
||||
|
||||
from ...plugins.context_providers.diff import DiffContextProvider
|
||||
from ...plugins.context_providers.filetree import FileTreeContextProvider
|
||||
from ...plugins.context_providers.github import GitHubIssuesContextProvider
|
||||
from ...plugins.context_providers.google import GoogleContextProvider
|
||||
from ...plugins.context_providers.open_tabs import OpenTabsContextProvider
|
||||
|
|
@ -16,6 +17,7 @@ ContextProviderName = Literal[
|
|||
"google",
|
||||
"search",
|
||||
"url",
|
||||
"tree",
|
||||
]
|
||||
|
||||
CONTEXT_PROVIDER_NAME_TO_CLASS = {
|
||||
|
|
@ -26,6 +28,7 @@ CONTEXT_PROVIDER_NAME_TO_CLASS = {
|
|||
"google": GoogleContextProvider,
|
||||
"search": SearchContextProvider,
|
||||
"url": URLContextProvider,
|
||||
"tree": FileTreeContextProvider,
|
||||
}
|
||||
|
||||
CLASS_TO_CONTEXT_PROVIDER_NAME: Dict[str, ContextProviderName] = {
|
||||
|
|
@ -36,4 +39,5 @@ CLASS_TO_CONTEXT_PROVIDER_NAME: Dict[str, ContextProviderName] = {
|
|||
"GoogleContextProvider": "google",
|
||||
"SearchContextProvider": "search",
|
||||
"URLContextProvider": "url",
|
||||
"FileTreeContextProvider": "tree",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ StepName = Literal[
|
|||
"GenerateShellCommandStep",
|
||||
]
|
||||
|
||||
ContextProviderName = Literal["diff", "github"]
|
||||
|
||||
TemplateType = Literal["llama2", "alpaca", "zephyr", "phind", "anthropic", "chatml"]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,82 +1,15 @@
|
|||
default_config = """\
|
||||
\"\"\"
|
||||
This is the Continue configuration file.
|
||||
config.py allows you to modify Continue programmatically instead of just using config.json.
|
||||
|
||||
See https://continue.dev/docs/customization to for documentation of the available options.
|
||||
First, config.json is loaded. Then, if you have defined modify_config here, the function will be given the result of
|
||||
loading config.json, and will return the final ContinueConfig to be used.
|
||||
\"\"\"
|
||||
|
||||
from continuedev.core.models import Models
|
||||
from continuedev.core.config import CustomCommand, SlashCommand, ContinueConfig
|
||||
from continuedev.libs.llm import OpenAIFreeTrial
|
||||
from continuedev.core.config import ContinueConfig
|
||||
|
||||
from continuedev.plugins.context_providers import (
|
||||
DiffContextProvider,
|
||||
TerminalContextProvider,
|
||||
URLContextProvider,
|
||||
GitHubIssuesContextProvider
|
||||
)
|
||||
from continuedev.plugins.steps import (
|
||||
CommentCodeStep,
|
||||
EditHighlightedCodeStep,
|
||||
GenerateShellCommandStep,
|
||||
OpenConfigStep,
|
||||
)
|
||||
from continuedev.plugins.steps.share_session import ShareSessionStep
|
||||
def modify_config(config: ContinueConfig) -> ContinueConfig:
|
||||
config.completion_options.temperature = 0.5
|
||||
return config
|
||||
|
||||
config = ContinueConfig(
|
||||
allow_anonymous_telemetry=True,
|
||||
models=Models(
|
||||
default=OpenAIFreeTrial(api_key="", model="gpt-4", title="GPT-4"),
|
||||
summarize=OpenAIFreeTrial(api_key="", model="gpt-3.5-turbo")
|
||||
),
|
||||
system_message=None,
|
||||
temperature=0.5,
|
||||
custom_commands=[
|
||||
CustomCommand(
|
||||
name="test",
|
||||
description="Write unit tests for highlighted code",
|
||||
prompt="Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.",
|
||||
)
|
||||
],
|
||||
slash_commands=[
|
||||
SlashCommand(
|
||||
name="edit",
|
||||
description="Edit highlighted code",
|
||||
step=EditHighlightedCodeStep,
|
||||
),
|
||||
SlashCommand(
|
||||
name="config",
|
||||
description="Customize Continue",
|
||||
step=OpenConfigStep,
|
||||
),
|
||||
SlashCommand(
|
||||
name="comment",
|
||||
description="Write comments for the highlighted code",
|
||||
step=CommentCodeStep,
|
||||
),
|
||||
SlashCommand(
|
||||
name="share",
|
||||
description="Download and share this session",
|
||||
step=ShareSessionStep,
|
||||
),
|
||||
SlashCommand(
|
||||
name="cmd",
|
||||
description="Generate a shell command",
|
||||
step=GenerateShellCommandStep,
|
||||
)
|
||||
],
|
||||
context_providers=[
|
||||
# GitHubIssuesContextProvider(
|
||||
# repo_name="<your github username or organization>/<your repo name>",
|
||||
# auth_token="<your github auth token>"
|
||||
# ),
|
||||
DiffContextProvider(),
|
||||
URLContextProvider(
|
||||
preset_urls = [
|
||||
# Add any common urls you reference here so they appear in autocomplete
|
||||
]
|
||||
),
|
||||
TerminalContextProvider(),
|
||||
],
|
||||
)
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
|
||||
{dedent(schema.get("description", ""))}
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/libs/llm/{filepath})
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/{filepath})
|
||||
|
||||
## Properties
|
||||
|
||||
|
|
@ -105,8 +105,9 @@ for module_name, module_title in LLM_MODULES:
|
|||
with open(f"docs/docs/reference/Models/{module_title.lower()}.md", "w") as f:
|
||||
f.write(markdown_docs)
|
||||
|
||||
# SerializedContinueConfig
|
||||
config_module = importlib.import_module("continuedev.core.config")
|
||||
config_obj = getattr(config_module, "ContinueConfig")
|
||||
config_obj = getattr(config_module, "SerializedContinueConfig")
|
||||
schema = config_obj.schema()
|
||||
markdown_docs = docs_from_schema(schema, "core/config.py")
|
||||
with open("docs/docs/reference/config.md", "w") as f:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue