Strong typing (#533)
* refactor: ♻️ get rid of continuedev.src.continuedev structure * refactor: ♻️ switching back to server folder * feat: ✨ make config.py imports shorter * feat: 🔖 publish as pre-release vscode extension * refactor: ♻️ refactor and add more completion params to ui * build: 🏗️ download from preview S3
This commit is contained in:
parent
257cef697c
commit
279593a848
210 changed files with 870 additions and 343 deletions
5
.github/workflows/main.yaml
vendored
5
.github/workflows/main.yaml
vendored
|
|
@ -165,6 +165,11 @@ jobs:
|
|||
cd extension
|
||||
npm ci
|
||||
|
||||
- name: Add a copy of continuedev to the extension
|
||||
run: |
|
||||
cd extension
|
||||
cp -r ../server/continuedev continuedev
|
||||
|
||||
- name: Install react-app Dependencies
|
||||
run: |
|
||||
cd extension/react-app
|
||||
|
|
|
|||
298
.github/workflows/preview.yaml
vendored
Normal file
298
.github/workflows/preview.yaml
vendored
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
name: Publish Preview Extension
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- preview
|
||||
|
||||
jobs:
|
||||
pyinstaller:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-20.04, macos-latest]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
# Install Python requirements and build+upload binaries for each platform
|
||||
|
||||
- name: Check-out repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10.8"
|
||||
|
||||
- name: Install Pyinstaller
|
||||
run: |
|
||||
pip install pyinstaller
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
pip install -r continuedev/requirements.txt
|
||||
|
||||
- name: Build PyInstaller Executable
|
||||
run: pyinstaller run.spec
|
||||
|
||||
- name: Set permissions
|
||||
run: |
|
||||
chmod 777 dist/run
|
||||
|
||||
# - name: Test Python Server
|
||||
# env:
|
||||
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
# ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
# TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }}
|
||||
# run: |
|
||||
# cd continuedev
|
||||
# pip install -r dev_requirements.txt
|
||||
# cd src
|
||||
# python -m pytest
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ runner.os }}Build
|
||||
path: dist/*
|
||||
|
||||
test-and-package:
|
||||
needs: pyinstaller
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-20.04, windows-latest]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Download corresponding binary artifact for the platform
|
||||
|
||||
- name: Create server directory
|
||||
run: mkdir -p ~/.continue/server/exe
|
||||
|
||||
- name: Download Linux build
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: LinuxBuild
|
||||
path: ~/.continue/server/exe
|
||||
if: matrix.os == 'ubuntu-20.04'
|
||||
|
||||
- name: Download macOS build
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: macOSBuild
|
||||
path: ~/.continue/server/exe
|
||||
if: matrix.os == 'macos-latest'
|
||||
|
||||
- name: Download Windows build
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: WindowsBuild
|
||||
path: ~/.continue/server/exe
|
||||
if: matrix.os == 'windows-latest'
|
||||
|
||||
- name: Set permissions
|
||||
shell: bash
|
||||
run: |
|
||||
chmod -R 777 ~/.continue/server/exe
|
||||
|
||||
# Setup Node.js and install dependencies
|
||||
|
||||
- name: Use Node.js 19.0.0
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 19.0.0
|
||||
|
||||
- name: Cache extension node_modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: extension/node_modules
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('extension/package-lock.json') }}
|
||||
|
||||
- name: Cache react-app node_modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: extension/react-app/node_modules
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('extension/react-app/package-lock.json') }}
|
||||
|
||||
- name: Install extension Dependencies
|
||||
run: |
|
||||
cd extension
|
||||
npm ci
|
||||
|
||||
- name: Add a copy of continuedev to the extension
|
||||
run: |
|
||||
cd extension
|
||||
cp -r ../server/continuedev continuedev
|
||||
|
||||
- name: Install react-app Dependencies
|
||||
run: |
|
||||
cd extension/react-app
|
||||
npm ci --legacy-peer-deps
|
||||
|
||||
# Run tests
|
||||
|
||||
- name: Prepare the extension
|
||||
run: |
|
||||
cd extension
|
||||
npm run prepackage
|
||||
|
||||
- name: Install Xvfb for Linux and run tests
|
||||
run: |
|
||||
sudo apt-get install -y xvfb # Install Xvfb
|
||||
Xvfb :99 & # Start Xvfb
|
||||
export DISPLAY=:99 # Export the display number to the environment
|
||||
cd extension
|
||||
npm run test
|
||||
if: matrix.os == 'ubuntu-20.04'
|
||||
|
||||
- name: Run extension tests
|
||||
run: |
|
||||
cd extension
|
||||
npm run test
|
||||
if: matrix.os != 'ubuntu-20.04'
|
||||
|
||||
# Create and upload .vsix artifact
|
||||
- name: Package the extension
|
||||
run: |
|
||||
cd extension
|
||||
npm run package
|
||||
|
||||
- name: Upload .vsix as an artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: vsix-artifact
|
||||
path: extension/build/*
|
||||
if: matrix.os == 'ubuntu-20.04'
|
||||
|
||||
- name: Upload continue.log
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: continue-log
|
||||
path: /home/runner/.continue/continue.log
|
||||
if: always()
|
||||
|
||||
publish:
|
||||
needs: test-and-package
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
# Checkout and download .vsix artifact
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
|
||||
- name: Pull latest changes
|
||||
run: git pull origin preview
|
||||
|
||||
- name: Download .vsix artifact
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: vsix-artifact
|
||||
path: extension/build
|
||||
|
||||
# Publish the extension and commit/push the version change
|
||||
|
||||
- name: Use Node.js 19.0.0
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 19.0.0
|
||||
|
||||
- name: Cache extension node_modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: extension/node_modules
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('extension/package-lock.json') }}
|
||||
|
||||
- name: Install extension Dependencies
|
||||
run: |
|
||||
cd extension
|
||||
npm ci
|
||||
|
||||
- name: Publish (Open VSX Registry)
|
||||
run: |
|
||||
cd extension
|
||||
npx ovsx publish -p ${{ secrets.VSX_REGISTRY_TOKEN }} --packagePath ./build/*.vsix --pre-release
|
||||
|
||||
- name: Publish
|
||||
run: |
|
||||
cd extension
|
||||
npx vsce publish -p ${{ secrets.VSCE_TOKEN }} --packagePath ./build/*.vsix --pre-release
|
||||
|
||||
- name: Update version in package.json
|
||||
run: |
|
||||
cd extension
|
||||
npm version patch
|
||||
|
||||
- name: Commit changes
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git commit -am "ci: 💚 Update package.json version [skip ci]"
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.ref }}
|
||||
|
||||
# Download binaries and upload to S3
|
||||
|
||||
- name: Download Linux build
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: LinuxBuild
|
||||
path: exe/linux
|
||||
|
||||
- name: Download macOS build
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: macOSBuild
|
||||
path: exe/mac
|
||||
|
||||
- name: Download Windows build
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: WindowsBuild
|
||||
path: exe/windows
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-west-1
|
||||
|
||||
- name: Upload binaries to S3 (continue-server-binaries)
|
||||
uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks
|
||||
env:
|
||||
AWS_S3_BUCKET: continue-server-binaries
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: "us-west-1"
|
||||
SOURCE_DIR: "exe"
|
||||
DEST_DIR: "preview"
|
||||
|
||||
- name: Upload binaries to S3 (s3.continue.dev)
|
||||
uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks
|
||||
env:
|
||||
AWS_S3_BUCKET: s3.continue.dev
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: "us-west-1"
|
||||
SOURCE_DIR: "exe"
|
||||
DEST_DIR: "preview"
|
||||
10
.vscode/launch.json
vendored
10
.vscode/launch.json
vendored
|
|
@ -20,7 +20,7 @@
|
|||
"name": "Pytest",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"program": "continuedev/src/continuedev/tests/llm_test.py",
|
||||
"program": "server/tests/llm_test.py",
|
||||
"console": "integratedTerminal",
|
||||
"justMyCode": true,
|
||||
"subProcess": true
|
||||
|
|
@ -29,14 +29,14 @@
|
|||
"name": "Reference",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"module": "continuedev.src.continuedev.models.reference.generate",
|
||||
"module": "server.continuedev.models.reference.generate",
|
||||
"justMyCode": true
|
||||
},
|
||||
{
|
||||
"name": "Server",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"module": "continuedev.src.continuedev.__main__",
|
||||
"module": "server.continuedev.__main__",
|
||||
"args": [
|
||||
"--port",
|
||||
"8001"
|
||||
|
|
@ -51,8 +51,8 @@
|
|||
"name": "Headless",
|
||||
"type": "python",
|
||||
"request": "launch",
|
||||
"module": "continuedev.headless",
|
||||
"args": ["--config", "continuedev/config.py"],
|
||||
"module": "server.continuedev.headless",
|
||||
"args": ["--config", "server/continuedev/config.py"],
|
||||
"justMyCode": false,
|
||||
"subProcess": false
|
||||
},
|
||||
|
|
|
|||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"python.defaultInterpreterPath": "${workspaceFolder}/continuedev/.venv/bin/python3"
|
||||
"python.defaultInterpreterPath": "${workspaceFolder}/server/.venv/bin/python3"
|
||||
}
|
||||
|
|
|
|||
22
Dockerfile
22
Dockerfile
|
|
@ -1,22 +0,0 @@
|
|||
# A Dockerfile for quickly building and testing the pyinstaller binary
|
||||
|
||||
FROM python:3.9
|
||||
|
||||
# Set the working directory to /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the current directory contents into the container at /app
|
||||
|
||||
COPY . /app
|
||||
|
||||
# Install any needed packages specified in requirements.txt
|
||||
RUN pip install pyinstaller
|
||||
|
||||
RUN pip install -r /app/continuedev/requirements.txt
|
||||
|
||||
RUN pyinstaller run.spec
|
||||
|
||||
RUN chmod +x /app/dist/run
|
||||
|
||||
CMD ["/app/dist/run"]
|
||||
4
continuedev/.gitignore
vendored
4
continuedev/.gitignore
vendored
|
|
@ -1,4 +0,0 @@
|
|||
notes.md
|
||||
config.json
|
||||
run.build
|
||||
run.dist
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
from .src.continuedev.server.main import run_server
|
||||
|
||||
|
||||
def main():
|
||||
run_server()
|
||||
4
continuedev/src/.gitignore
vendored
4
continuedev/src/.gitignore
vendored
|
|
@ -1,4 +0,0 @@
|
|||
main.build
|
||||
main.dist
|
||||
run.build
|
||||
run.dist
|
||||
1
continuedev/src/continuedev/.gitignore
vendored
1
continuedev/src/continuedev/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
.continue
|
||||
|
|
@ -1 +0,0 @@
|
|||
|
||||
|
|
@ -22,7 +22,7 @@ Setup instructions are below for each (showing the import and config object). Yo
|
|||
Type '@issue' to reference the title and contents of a GitHub issue.
|
||||
|
||||
```python
|
||||
from continuedev.src.continuedev.plugins.context_providers.github import GitHubIssuesContextProvider
|
||||
from continuedev.plugins.context_providers.github import GitHubIssuesContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
|
|
@ -37,7 +37,7 @@ GitHubIssuesContextProvider(
|
|||
Type '@search' to reference the results of codebase search, just like the results you would get from VS Code search.
|
||||
|
||||
```python
|
||||
from continuedev.src.continuedev.plugins.context_providers.search import SearchContextProvider
|
||||
from continuedev.plugins.context_providers.search import SearchContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
|
|
@ -49,7 +49,7 @@ SearchContextProvider() # No arguments necessary
|
|||
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.src.continuedev.plugins.context_providers.url import URLContextProvider
|
||||
from continuedev.plugins.context_providers.url import URLContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
|
|
@ -61,7 +61,7 @@ URLContextProvider(preset_urls=["https://continue.dev/docs/customization"])
|
|||
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.src.continuedev.plugins.context_providers.diff import DiffContextProvider
|
||||
from continuedev.plugins.context_providers.diff import DiffContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
|
|
@ -73,7 +73,7 @@ DiffContextProvider()
|
|||
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.src.continuedev.plugins.context_providers.filetree import FileTreeContextProvider
|
||||
from continuedev.plugins.context_providers.filetree import FileTreeContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
|
|
@ -85,7 +85,7 @@ FileTreeContextProvider()
|
|||
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.src.continuedev.plugins.context_providers.google import GoogleContextProvider
|
||||
from continuedev.plugins.context_providers.google import GoogleContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
|
|
@ -101,7 +101,7 @@ 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.src.continuedev.plugins.context_providers.terminal import TerminalContextProvider
|
||||
from continuedev.plugins.context_providers.terminal import TerminalContextProvider
|
||||
```
|
||||
|
||||
```python
|
||||
|
|
@ -169,7 +169,7 @@ This example is a situation where you request all of the data (issues in this ca
|
|||
There are other scenarios where you might want to just get information on demand, for example by typing '@url https://continue.dev/docs/context-providers' and having the ContextProvider fetch the contents of that URL dynamically. For this case, you can implement the `DynamicContextProvider` class like this:
|
||||
|
||||
```python
|
||||
from continuedev.src.continuedev.plugins.context_providers.dynamic import DynamicContextProvider
|
||||
from continuedev.plugins.context_providers.dynamic import DynamicContextProvider
|
||||
|
||||
class ExampleDynamicProvider(DynamicProvider):
|
||||
title = "example"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Open-Source Models (not local)
|
|||
In `config.py`, you'll find the `models` property:
|
||||
|
||||
```python
|
||||
from continuedev.src.continuedev.core.models import Models
|
||||
from continuedev.core.models import Models
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -53,7 +53,7 @@ If by chance the provider has the exact same API interface as OpenAI, the `OpenA
|
|||
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.src.continuedev.libs.llm.openai import OpenAI
|
||||
from continuedev.libs.llm.openai import OpenAI
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -100,8 +100,8 @@ def template_alpaca_messages(msgs: List[Dict[str, str]]) -> str:
|
|||
It can then be used like this:
|
||||
|
||||
```python
|
||||
from continuedev.src.continuedev.libs.llm.chat import template_alpaca_messages
|
||||
from continuedev.src.continuedev.libs.llm.ollama import Ollama
|
||||
from continuedev.libs.llm.chat import template_alpaca_messages
|
||||
from continuedev.libs.llm.ollama import Ollama
|
||||
...
|
||||
config=ContinueConfig(
|
||||
...
|
||||
|
|
@ -114,7 +114,7 @@ config=ContinueConfig(
|
|||
)
|
||||
```
|
||||
|
||||
This exact function and a few other default implementations are available in [`continuedev.src.continuedev.libs.llm.prompts.chat`](https://github.com/continuedev/continue/blob/main/continuedev/src/continuedev/libs/llm/prompts/chat.py).
|
||||
This exact function and a few other default implementations are available in [`continuedev.libs.llm.prompts.chat`](https://github.com/continuedev/continue/blob/main/continuedev/src/continuedev/libs/llm/prompts/chat.py).
|
||||
|
||||
## Customizing the /edit Prompt
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ Output nothing except for the code. No code block, no English explanation, no st
|
|||
It can then be used like this:
|
||||
|
||||
```python
|
||||
from continuedev.src.continuedev.libs.llm.ollama import Ollama
|
||||
from continuedev.libs.llm.ollama import Ollama
|
||||
...
|
||||
config=ContinueConfig(
|
||||
...
|
||||
|
|
@ -154,4 +154,4 @@ config=ContinueConfig(
|
|||
)
|
||||
```
|
||||
|
||||
A few pre-made templates are available in [`continuedev.src.continuedev.libs.llm.prompts.edit`](https://github.com/continuedev/continue/blob/main/continuedev/src/continuedev/libs/llm/prompts/edit.py).
|
||||
A few pre-made templates are available in [`continuedev.libs.llm.prompts.edit`](https://github.com/continuedev/continue/blob/main/continuedev/src/continuedev/libs/llm/prompts/edit.py).
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
Import the `AnthropicLLM` class and set it as the default model:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.anthropic import AnthropicLLM
|
||||
from continuedev.libs.llm.anthropic import AnthropicLLM
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -27,12 +27,16 @@ Claude 2 is not yet publicly released. You can request early access [here](https
|
|||
|
||||
<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='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='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='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ See our [5 minute quickstart](https://github.com/continuedev/ggml-server-example
|
|||
Once the model is running on localhost:8000, change `~/.continue/config.py` to look like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.ggml import GGML
|
||||
from continuedev.libs.llm.ggml import GGML
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -29,12 +29,16 @@ config = ContinueConfig(
|
|||
### Inherited Properties
|
||||
|
||||
<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='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='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 GGML class)", "default": "ggml", "type": "string"}' required={false} default="ggml"/>
|
||||
<ClassPropertyRef name='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
The Google PaLM API is currently in public preview, so production applications are not supported yet. However, you can [create an API key in Google MakerSuite](https://makersuite.google.com/u/2/app/apikey) and begin trying out the `chat-bison-001` model. Change `~/.continue/config.py` to look like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.core.models import Models
|
||||
from continuedev.src.continuedev.libs.llm.hf_inference_api import GooglePaLMAPI
|
||||
from continuedev.core.models import Models
|
||||
from continuedev.libs.llm.hf_inference_api import GooglePaLMAPI
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -28,12 +28,16 @@ config = ContinueConfig(
|
|||
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "Google PaLM API key", "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='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='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": "chat-bison-001", "type": "string"}' required={false} default="chat-bison-001"/>
|
||||
<ClassPropertyRef name='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
Hugging Face Inference API is a great option for newly released language models. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.py` to look like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.core.models import Models
|
||||
from continuedev.src.continuedev.libs.llm.hf_inference_api import HuggingFaceInferenceAPI
|
||||
from continuedev.core.models import Models
|
||||
from continuedev.libs.llm.hf_inference_api import HuggingFaceInferenceAPI
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -29,12 +29,16 @@ config = ContinueConfig(
|
|||
### Inherited Properties
|
||||
|
||||
<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='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='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='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -14,12 +14,16 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
### Inherited Properties
|
||||
|
||||
<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='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='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": "huggingface-tgi", "type": "string"}' required={false} default="huggingface-tgi"/>
|
||||
<ClassPropertyRef name='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Run the llama.cpp server binary to start the API server. If running on a remote
|
|||
After it's up and running, change `~/.continue/config.py` to look like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.llamacpp import LlamaCpp
|
||||
from continuedev.libs.llm.llamacpp import LlamaCpp
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -34,12 +34,16 @@ config = ContinueConfig(
|
|||
### Inherited Properties
|
||||
|
||||
<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='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='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": "llamacpp", "type": "string"}' required={false} default="llamacpp"/>
|
||||
<ClassPropertyRef name='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
[Ollama](https://ollama.ai/) is an application for Mac and Linux that makes it easy to locally run open-source models, including Llama-2. Download the app from the website, and it will walk you through setup in a couple of minutes. You can also read more in their [README](https://github.com/jmorganca/ollama). Continue can then be configured to use the `Ollama` LLM class:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.ollama import Ollama
|
||||
from continuedev.libs.llm.ollama import Ollama
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -25,12 +25,16 @@ config = ContinueConfig(
|
|||
### Inherited Properties
|
||||
|
||||
<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='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='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": "llama2", "type": "string"}' required={false} default="llama2"/>
|
||||
<ClassPropertyRef name='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ The OpenAI class can be used to access OpenAI models like gpt-4 and gpt-3.5-turb
|
|||
If you are locally serving a model that uses an OpenAI-compatible server, you can simply change the `api_base` in the `OpenAI` class like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.openai import OpenAI
|
||||
from continuedev.libs.llm.openai import OpenAI
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -43,11 +43,15 @@ Options for serving models locally with an OpenAI-compatible server include:
|
|||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to be used (e.g. gpt-4, codellama)", "type": "string"}' required={true} default=""/>
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "OpenAI API key", "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='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='unique_id' details='{"title": "Unique Id", "description": "The unique ID of the user.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -36,11 +36,15 @@ These classes support any models available through the OpenAI API, assuming your
|
|||
|
||||
<ClassPropertyRef name='model' details='{"title": "Model", "description": "The name of the model to be used (e.g. gpt-4, codellama)", "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='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='unique_id' details='{"title": "Unique Id", "description": "The unique ID of the user.", "type": "string"}' required={false} default=""/>
|
||||
<ClassPropertyRef name='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ QueuedLLM exists to make up for LLM servers that cannot handle multiple requests
|
|||
If you are already using another LLM class and are experiencing this problem, you can just wrap it with the QueuedLLM class like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.queued import QueuedLLM
|
||||
from continuedev.libs.llm.queued import QueuedLLM
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -27,12 +27,16 @@ config = ContinueConfig(
|
|||
### Inherited Properties
|
||||
|
||||
<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='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='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": "queued", "type": "string"}' required={false} default="queued"/>
|
||||
<ClassPropertyRef name='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
Replicate is a great option for newly released language models or models that you've deployed through their platform. Sign up for an account [here](https://replicate.ai/), copy your API key, and then select any model from the [Replicate Streaming List](https://replicate.com/collections/streaming-language-models). Change `~/.continue/config.py` to look like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.core.models import Models
|
||||
from continuedev.src.continuedev.libs.llm.replicate import ReplicateLLM
|
||||
from continuedev.core.models import Models
|
||||
from continuedev.libs.llm.replicate import ReplicateLLM
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -30,12 +30,16 @@ If you don't specify the `model` parameter, it will default to `replicate/llama-
|
|||
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "Replicate API key", "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='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='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": "replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781", "type": "string"}' required={false} default="replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781"/>
|
||||
<ClassPropertyRef name='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
TextGenUI is a comprehensive, open-source language model UI and local server. You can set it up with an OpenAI-compatible server plugin, but if for some reason that doesn't work, you can use this class like so:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.text_gen_interface import TextGenUI
|
||||
from continuedev.libs.llm.text_gen_interface import TextGenUI
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -28,12 +28,16 @@ config = ContinueConfig(
|
|||
### Inherited Properties
|
||||
|
||||
<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='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='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": "text-gen-ui", "type": "string"}' required={false} default="text-gen-ui"/>
|
||||
<ClassPropertyRef name='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
The Together API is a cloud platform for running large AI models. You can sign up [here](https://api.together.xyz/signup), copy your API key on the initial welcome screen, and then hit the play button on any model from the [Together Models list](https://docs.together.ai/docs/models-inference). Change `~/.continue/config.py` to look like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.core.models import Models
|
||||
from continuedev.src.continuedev.libs.llm.together import TogetherLLM
|
||||
from continuedev.core.models import Models
|
||||
from continuedev.libs.llm.together import TogetherLLM
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -30,12 +30,16 @@ config = ContinueConfig(
|
|||
|
||||
<ClassPropertyRef name='api_key' details='{"title": "Api Key", "description": "Together API key", "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='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='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": "togethercomputer/RedPajama-INCITE-7B-Instruct", "type": "string"}' required={false} default="togethercomputer/RedPajama-INCITE-7B-Instruct"/>
|
||||
<ClassPropertyRef name='max_tokens' details='{"title": "Max Tokens", "description": "The maximum number of tokens to generate.", "default": 1024, "type": "integer"}' required={false} default="1024"/>
|
||||
<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=""/>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Continue can be deeply customized by editing the `ContinueConfig` object in `~/.
|
|||
<ClassPropertyRef name='steps_on_startup' details='{"title": "Steps On Startup", "description": "Steps that will be automatically run at the beginning of a new session", "default": [], "type": "array", "items": {"$ref": "#/definitions/Step"}}' required={false} default="[]"/>
|
||||
<ClassPropertyRef name='disallowed_steps' details='{"title": "Disallowed Steps", "description": "Steps that are not allowed to be run, and will be skipped if attempted", "default": [], "type": "array", "items": {"type": "string"}}' required={false} default="[]"/>
|
||||
<ClassPropertyRef name='allow_anonymous_telemetry' details='{"title": "Allow Anonymous Telemetry", "description": "If this field is set to True, we will collect anonymous telemetry as described in the documentation page on telemetry. If set to False, we will not collect any data.", "default": true, "type": "boolean"}' required={false} default="True"/>
|
||||
<ClassPropertyRef name='models' details='{"title": "Models", "description": "Configuration for the models used by Continue. Read more about how to configure models in the documentation.", "default": {"default": {"title": null, "system_message": null, "context_length": 2048, "model": "gpt-4", "max_tokens": 1024, "stop_tokens": null, "timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "prompt_templates": {}, "api_key": null, "llm": null, "class_name": "OpenAIFreeTrial"}, "summarize": {"title": null, "system_message": null, "context_length": 2048, "model": "gpt-3.5-turbo", "max_tokens": 1024, "stop_tokens": null, "timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "prompt_templates": {}, "api_key": null, "llm": null, "class_name": "OpenAIFreeTrial"}, "edit": null, "chat": null, "saved": []}, "allOf": [{"$ref": "#/definitions/Models"}]}' required={false} default="{'default': {'title': None, 'system_message': None, 'context_length': 2048, 'model': 'gpt-4', 'max_tokens': 1024, 'stop_tokens': None, 'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'prompt_templates': {}, 'api_key': None, 'llm': None, 'class_name': 'OpenAIFreeTrial'}, 'summarize': {'title': None, 'system_message': None, 'context_length': 2048, 'model': 'gpt-3.5-turbo', 'max_tokens': 1024, 'stop_tokens': None, 'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'prompt_templates': {}, 'api_key': None, 'llm': None, 'class_name': 'OpenAIFreeTrial'}, 'edit': None, 'chat': None, 'saved': []}"/>
|
||||
<ClassPropertyRef name='models' details='{"title": "Models", "description": "Configuration for the models used by Continue. Read more about how to configure models in the documentation.", "default": {"default": {"title": null, "model": "gpt-4", "system_message": null, "context_length": 2048, "stop_tokens": null, "temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "prompt_templates": {}, "api_key": null, "llm": null, "class_name": "OpenAIFreeTrial"}, "summarize": {"title": null, "model": "gpt-3.5-turbo", "system_message": null, "context_length": 2048, "stop_tokens": null, "temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "prompt_templates": {}, "api_key": null, "llm": null, "class_name": "OpenAIFreeTrial"}, "edit": null, "chat": null, "saved": []}, "allOf": [{"$ref": "#/definitions/Models"}]}' required={false} default="{'default': {'title': None, 'model': 'gpt-4', 'system_message': None, 'context_length': 2048, 'stop_tokens': None, 'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'prompt_templates': {}, 'api_key': None, 'llm': None, 'class_name': 'OpenAIFreeTrial'}, 'summarize': {'title': None, 'model': 'gpt-3.5-turbo', 'system_message': None, 'context_length': 2048, 'stop_tokens': None, 'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'prompt_templates': {}, 'api_key': None, 'llm': None, 'class_name': 'OpenAIFreeTrial'}, 'edit': None, 'chat': None, 'saved': []}"/>
|
||||
<ClassPropertyRef name='temperature' details='{"title": "Temperature", "description": "The temperature parameter for sampling from the LLM. Higher temperatures will result in more random output, while lower temperatures will result in more predictable output. This value ranges from 0 to 1.", "default": 0.5, "type": "number"}' required={false} default="0.5"/>
|
||||
<ClassPropertyRef name='custom_commands' details='{"title": "Custom Commands", "description": "An array of custom commands that allow you to reuse prompts. Each has name, description, and prompt properties. When you enter /<name> in the text input, it will act as a shortcut to the prompt.", "default": [{"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": "This is an example custom command. Use /config to edit it and create more"}], "type": "array", "items": {"$ref": "#/definitions/CustomCommand"}}' required={false} default="[{'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': 'This is an example custom command. Use /config to edit it and create more'}]"/>
|
||||
<ClassPropertyRef name='slash_commands' details='{"title": "Slash Commands", "description": "An array of slash commands that let you map custom Steps to a shortcut.", "default": [], "type": "array", "items": {"$ref": "#/definitions/SlashCommand"}}' required={false} default="[]"/>
|
||||
|
|
|
|||
|
|
@ -46,8 +46,6 @@ config=ContinueConfig(
|
|||
6. When you open a workspace, Continue will generate the embeddings. You can then enter '/codebase \<QUESTION\>' to ask a question with embeddings-based retrieval.
|
||||
7. Please share feedback in [Discord](https://discord.gg/NWtdYexhMs)!
|
||||
|
||||
> Note: There is a known bug that requires different imports for the PyPI package. If you encounter "No module named 'continuedev.src', you should replace all instances of 'continuedev.src.continuedev' in `config.py` with just 'continuedev'.
|
||||
|
||||
## Parameters
|
||||
|
||||
After retrieving the top `n_retrieve` results from the vector database, an additional re-reranking step uses 2 LLM calls to select the top `n_final` results to use to answer the question. If you want to increase the speed of the query at the cost of relevancy, you can skip the re-ranking step by setting `use_reranking` to `False`. Then the top `n_final` results will just be directly calculated from the vector database.
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ If you haven't already installed Continue, you can do that [here](https://market
|
|||
4. Update your Continue config file to look like this:
|
||||
|
||||
```python
|
||||
from continuedev.src.continuedev.core.models import Models
|
||||
from continuedev.src.continuedev.libs.llm.together import TogetherLLM
|
||||
from continuedev.core.models import Models
|
||||
from continuedev.libs.llm.together import TogetherLLM
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -33,7 +33,7 @@ config = ContinueConfig(
|
|||
3. Change your Continue config file to look like this:
|
||||
|
||||
```python
|
||||
from continuedev.src.continuedev.libs.llm.ollama import Ollama
|
||||
from continuedev.libs.llm.ollama import Ollama
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -53,8 +53,8 @@ config = ContinueConfig(
|
|||
2. Change your Continue config file to look like this:
|
||||
|
||||
```python
|
||||
from continuedev.src.continuedev.core.models import Models
|
||||
from continuedev.src.continuedev.libs.llm.replicate import ReplicateLLM
|
||||
from continuedev.core.models import Models
|
||||
from continuedev.libs.llm.replicate import ReplicateLLM
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
|
|||
4
extension/package-lock.json
generated
4
extension/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.0.410",
|
||||
"version": "0.1.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.0.410",
|
||||
"version": "0.0.412",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@electron/rebuild": "^3.2.10",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"icon": "media/terminal-continue.png",
|
||||
"version": "0.0.410",
|
||||
"version": "0.1.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
@ -209,7 +209,8 @@
|
|||
"build-test": "tsc && node esbuild.test.mjs",
|
||||
"test": "npm run build-test && node ./out/test-runner/runTestOnVSCodeHost.js",
|
||||
"prepackage": "node scripts/prepackage.js",
|
||||
"package": "node scripts/package.js"
|
||||
"package": "node scripts/package.js",
|
||||
"package:pre-release": "node scripts/package.js --pre-release"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "^8.4.7",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { LLM } from "../../../schema/LLM";
|
|||
import {
|
||||
Label,
|
||||
Select,
|
||||
TextInput,
|
||||
Input,
|
||||
defaultBorderRadius,
|
||||
lightGray,
|
||||
vscForeground,
|
||||
|
|
@ -58,7 +58,7 @@ function ModelSettings(props: { llm: any | undefined; role: string }) {
|
|||
{typeof modelOptions.api_key !== undefined && (
|
||||
<>
|
||||
<Label fontSize={getFontSize()}>API Key</Label>
|
||||
<TextInput
|
||||
<Input
|
||||
type="text"
|
||||
defaultValue={props.llm.api_key}
|
||||
placeholder="API Key"
|
||||
|
|
@ -69,7 +69,7 @@ function ModelSettings(props: { llm: any | undefined; role: string }) {
|
|||
{modelOptions.model && (
|
||||
<>
|
||||
<Label fontSize={getFontSize()}>Model</Label>
|
||||
<TextInput
|
||||
<Input
|
||||
type="text"
|
||||
defaultValue={props.llm.model}
|
||||
placeholder="Model"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { useContext } from "react";
|
||||
import { Button, TextInput } from "..";
|
||||
import { Button, Input } from "..";
|
||||
import { GUIClientContext } from "../../App";
|
||||
import { useDispatch } from "react-redux";
|
||||
import {
|
||||
|
|
@ -27,7 +27,7 @@ function AddContextGroupDialog({
|
|||
|
||||
return (
|
||||
<div className="p-4">
|
||||
<TextInput
|
||||
<Input
|
||||
defaultValue="My Context Group"
|
||||
type="text"
|
||||
ref={(input) => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useContext } from "react";
|
||||
import styled from "styled-components";
|
||||
import { Button, TextInput } from "..";
|
||||
import { Button, Input } from "..";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { GUIClientContext } from "../../App";
|
||||
import { useDispatch } from "react-redux";
|
||||
|
|
@ -37,7 +37,7 @@ function FTCDialog() {
|
|||
OpenAIFreeTrial object.
|
||||
</p>
|
||||
|
||||
<TextInput
|
||||
<Input
|
||||
type="text"
|
||||
placeholder="Enter your OpenAI API key"
|
||||
value={apiKey}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ export const H3 = styled.h3`
|
|||
width: fit-content;
|
||||
`;
|
||||
|
||||
export const TextInput = styled.input.attrs({ type: "text" })`
|
||||
export const Input = styled.input`
|
||||
width: 100%;
|
||||
padding: 8px 12px;
|
||||
margin: 8px 0;
|
||||
|
|
@ -106,6 +106,10 @@ export const TextInput = styled.input.attrs({ type: "text" })`
|
|||
&:focus {
|
||||
background: ${secondaryDark};
|
||||
}
|
||||
|
||||
&:invalid {
|
||||
outline: 1px solid red;
|
||||
}
|
||||
`;
|
||||
|
||||
export const NumberInput = styled.input.attrs({ type: "number" })`
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import styled from "styled-components";
|
||||
import { TextInput, defaultBorderRadius, lightGray } from "../components";
|
||||
import { Input, defaultBorderRadius, lightGray } from "../components";
|
||||
import { FullState } from "../../../schema/FullState";
|
||||
import {
|
||||
useEffect,
|
||||
|
|
@ -58,7 +58,7 @@ const TopGuiDiv = styled.div`
|
|||
}
|
||||
`;
|
||||
|
||||
const TitleTextInput = styled(TextInput)`
|
||||
const TitleTextInput = styled(Input)`
|
||||
border: none;
|
||||
outline: none;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import ModelCard from "../components/ModelCard";
|
|||
import styled from "styled-components";
|
||||
import { ArrowLeftIcon } from "@heroicons/react/24/outline";
|
||||
import {
|
||||
TextInput,
|
||||
Input,
|
||||
defaultBorderRadius,
|
||||
lightGray,
|
||||
vscBackground,
|
||||
|
|
@ -151,22 +151,28 @@ function ModelConfig() {
|
|||
<>
|
||||
<h3 className="mb-2">Enter required parameters</h3>
|
||||
|
||||
{modelInfo?.collectInputFor?.map((d) => {
|
||||
return (
|
||||
<div>
|
||||
<label htmlFor={d.key}>{d.key}</label>
|
||||
<TextInput
|
||||
id={d.key}
|
||||
className="border-2 border-gray-200 rounded-md p-2 m-2"
|
||||
placeholder={d.key}
|
||||
defaultValue={d.defaultValue}
|
||||
{...formMethods.register(d.key, {
|
||||
required: true,
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
{modelInfo?.collectInputFor
|
||||
?.filter((d) => d.required)
|
||||
.map((d) => {
|
||||
return (
|
||||
<div>
|
||||
<label htmlFor={d.key}>{d.key}</label>
|
||||
<Input
|
||||
type={d.inputType}
|
||||
id={d.key}
|
||||
className="border-2 border-gray-200 rounded-md p-2 m-2"
|
||||
placeholder={d.key}
|
||||
defaultValue={d.defaultValue}
|
||||
min={d.min}
|
||||
max={d.max}
|
||||
step={d.step}
|
||||
{...formMethods.register(d.key, {
|
||||
required: true,
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</>
|
||||
)}
|
||||
|
||||
|
|
@ -182,11 +188,15 @@ function ModelConfig() {
|
|||
return (
|
||||
<div>
|
||||
<label htmlFor={d.key}>{d.key}</label>
|
||||
<TextInput
|
||||
<Input
|
||||
type={d.inputType}
|
||||
id={d.key}
|
||||
className="border-2 border-gray-200 rounded-md p-2 m-2"
|
||||
placeholder={d.key}
|
||||
defaultValue={d.defaultValue}
|
||||
min={d.min}
|
||||
max={d.max}
|
||||
step={d.step}
|
||||
{...formMethods.register(d.key, {
|
||||
required: false,
|
||||
})}
|
||||
|
|
@ -216,7 +226,7 @@ function ModelConfig() {
|
|||
formParams[d.key] =
|
||||
d.inputType === "text"
|
||||
? formMethods.watch(d.key)
|
||||
: parseInt(formMethods.watch(d.key));
|
||||
: parseFloat(formMethods.watch(d.key));
|
||||
}
|
||||
|
||||
client?.addModelForRole("*", modelInfo.class, {
|
||||
|
|
@ -239,7 +249,7 @@ function ModelConfig() {
|
|||
formParams[d.key] =
|
||||
d.inputType === "text"
|
||||
? formMethods.watch(d.key)
|
||||
: parseInt(formMethods.watch(d.key));
|
||||
: parseFloat(formMethods.watch(d.key));
|
||||
}
|
||||
|
||||
client?.addModelForRole("*", modelInfo.class, {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ MODEL_PROVIDER_TAG_COLORS[ModelProviderTag["Free"]] = "#ffff00";
|
|||
export enum CollectInputType {
|
||||
"text" = "text",
|
||||
"number" = "number",
|
||||
"range" = "range",
|
||||
}
|
||||
|
||||
export interface InputDescriptor {
|
||||
|
|
@ -38,6 +39,64 @@ const contextLengthInput: InputDescriptor = {
|
|||
defaultValue: 2048,
|
||||
required: false,
|
||||
};
|
||||
const temperatureInput: InputDescriptor = {
|
||||
inputType: CollectInputType.number,
|
||||
key: "temperature",
|
||||
label: "Temperature",
|
||||
defaultValue: undefined,
|
||||
required: false,
|
||||
min: 0.0,
|
||||
max: 1.0,
|
||||
step: 0.01,
|
||||
};
|
||||
const topPInput: InputDescriptor = {
|
||||
inputType: CollectInputType.number,
|
||||
key: "top_p",
|
||||
label: "Top-P",
|
||||
defaultValue: undefined,
|
||||
required: false,
|
||||
min: 0,
|
||||
max: 1,
|
||||
step: 0.01,
|
||||
};
|
||||
const topKInput: InputDescriptor = {
|
||||
inputType: CollectInputType.number,
|
||||
key: "top_k",
|
||||
label: "Top-K",
|
||||
defaultValue: undefined,
|
||||
required: false,
|
||||
min: 0,
|
||||
max: 1,
|
||||
step: 0.01,
|
||||
};
|
||||
const presencePenaltyInput: InputDescriptor = {
|
||||
inputType: CollectInputType.number,
|
||||
key: "presence_penalty",
|
||||
label: "Presence Penalty",
|
||||
defaultValue: undefined,
|
||||
required: false,
|
||||
min: 0,
|
||||
max: 1,
|
||||
step: 0.01,
|
||||
};
|
||||
const FrequencyPenaltyInput: InputDescriptor = {
|
||||
inputType: CollectInputType.number,
|
||||
key: "frequency_penalty",
|
||||
label: "Frequency Penalty",
|
||||
defaultValue: undefined,
|
||||
required: false,
|
||||
min: 0,
|
||||
max: 1,
|
||||
step: 0.01,
|
||||
};
|
||||
const completionParamsInputs = [
|
||||
contextLengthInput,
|
||||
temperatureInput,
|
||||
topKInput,
|
||||
topPInput,
|
||||
presencePenaltyInput,
|
||||
FrequencyPenaltyInput,
|
||||
];
|
||||
|
||||
const serverUrlInput = {
|
||||
inputType: CollectInputType.text,
|
||||
|
|
@ -210,6 +269,7 @@ export const MODEL_INFO: { [key: string]: ModelInfo } = {
|
|||
placeholder: "Enter your OpenAI API key",
|
||||
required: true,
|
||||
},
|
||||
...completionParamsInputs,
|
||||
],
|
||||
},
|
||||
anthropic: {
|
||||
|
|
@ -229,6 +289,7 @@ export const MODEL_INFO: { [key: string]: ModelInfo } = {
|
|||
placeholder: "Enter your Anthropic API key",
|
||||
required: true,
|
||||
},
|
||||
...completionParamsInputs,
|
||||
],
|
||||
packages: [
|
||||
{
|
||||
|
|
@ -261,7 +322,7 @@ export const MODEL_INFO: { [key: string]: ModelInfo } = {
|
|||
refUrl: "https://ollama.ai/library/llama2",
|
||||
})),
|
||||
],
|
||||
collectInputFor: [contextLengthInput],
|
||||
collectInputFor: [...completionParamsInputs],
|
||||
},
|
||||
together: {
|
||||
title: "TogetherAI",
|
||||
|
|
@ -285,6 +346,7 @@ export const MODEL_INFO: { [key: string]: ModelInfo } = {
|
|||
placeholder: "Enter your TogetherAI API key",
|
||||
required: true,
|
||||
},
|
||||
...completionParamsInputs,
|
||||
],
|
||||
packages: [
|
||||
...codeLlamaPackages.map((p) => {
|
||||
|
|
@ -330,7 +392,7 @@ export const MODEL_INFO: { [key: string]: ModelInfo } = {
|
|||
server_url: "http://localhost:1234",
|
||||
},
|
||||
packages: [llama2FamilyPackage],
|
||||
collectInputFor: [contextLengthInput],
|
||||
collectInputFor: [...completionParamsInputs],
|
||||
},
|
||||
replicate: {
|
||||
title: "Replicate",
|
||||
|
|
@ -348,6 +410,7 @@ export const MODEL_INFO: { [key: string]: ModelInfo } = {
|
|||
placeholder: "Enter your Replicate API key",
|
||||
required: true,
|
||||
},
|
||||
...completionParamsInputs,
|
||||
],
|
||||
icon: "replicate.png",
|
||||
tags: [
|
||||
|
|
@ -385,7 +448,7 @@ After it's up and running, you can start using Continue.`,
|
|||
icon: "llamacpp.png",
|
||||
tags: [ModelProviderTag.Local, ModelProviderTag["Open-Source"]],
|
||||
packages: [llama2FamilyPackage],
|
||||
collectInputFor: [contextLengthInput],
|
||||
collectInputFor: [...completionParamsInputs],
|
||||
},
|
||||
palm: {
|
||||
title: "Google PaLM API",
|
||||
|
|
@ -428,7 +491,7 @@ After it's up and running, you can start using Continue.`,
|
|||
tags: [ModelProviderTag.Local, ModelProviderTag["Open-Source"]],
|
||||
packages: [llama2FamilyPackage],
|
||||
collectInputFor: [
|
||||
contextLengthInput,
|
||||
...completionParamsInputs,
|
||||
{ ...serverUrlInput, defaultValue: "http://localhost:8080" },
|
||||
],
|
||||
},
|
||||
|
|
@ -451,7 +514,7 @@ After it's up and running, you can start using Continue.`,
|
|||
...serverUrlInput,
|
||||
defaultValue: "http://localhost:8000",
|
||||
},
|
||||
contextLengthInput,
|
||||
...completionParamsInputs,
|
||||
],
|
||||
icon: "openai.svg",
|
||||
tags: [ModelProviderTag.Local, ModelProviderTag["Open-Source"]],
|
||||
|
|
@ -467,5 +530,6 @@ After it's up and running, you can start using Continue.`,
|
|||
icon: "openai.svg",
|
||||
tags: [ModelProviderTag.Free],
|
||||
packages: [gpt4, gpt35turbo],
|
||||
collectInputFor: [...completionParamsInputs],
|
||||
},
|
||||
};
|
||||
|
|
|
|||
5
extension/schema/ContinueConfig.d.ts
vendored
5
extension/schema/ContinueConfig.d.ts
vendored
|
|
@ -55,6 +55,10 @@ export type UniqueId = string;
|
|||
* The name of the model to be used (e.g. gpt-4, codellama)
|
||||
*/
|
||||
export type Model = string;
|
||||
/**
|
||||
* The maximum number of tokens to generate.
|
||||
*/
|
||||
export type MaxTokens = number;
|
||||
/**
|
||||
* Tokens that will stop the completion.
|
||||
*/
|
||||
|
|
@ -222,6 +226,7 @@ export interface LLM {
|
|||
context_length?: ContextLength;
|
||||
unique_id?: UniqueId;
|
||||
model: Model;
|
||||
max_tokens?: MaxTokens;
|
||||
stop_tokens?: StopTokens;
|
||||
timeout?: Timeout;
|
||||
verify_ssl?: VerifySsl;
|
||||
|
|
|
|||
5
extension/schema/LLM.d.ts
vendored
5
extension/schema/LLM.d.ts
vendored
|
|
@ -26,6 +26,10 @@ export type UniqueId = string;
|
|||
* The name of the model to be used (e.g. gpt-4, codellama)
|
||||
*/
|
||||
export type Model = string;
|
||||
/**
|
||||
* The maximum number of tokens to generate.
|
||||
*/
|
||||
export type MaxTokens = number;
|
||||
/**
|
||||
* Tokens that will stop the completion.
|
||||
*/
|
||||
|
|
@ -57,6 +61,7 @@ export interface LLM1 {
|
|||
context_length?: ContextLength;
|
||||
unique_id?: UniqueId;
|
||||
model: Model;
|
||||
max_tokens?: MaxTokens;
|
||||
stop_tokens?: StopTokens;
|
||||
timeout?: Timeout;
|
||||
verify_ssl?: VerifySsl;
|
||||
|
|
|
|||
5
extension/schema/Models.d.ts
vendored
5
extension/schema/Models.d.ts
vendored
|
|
@ -26,6 +26,10 @@ export type UniqueId = string;
|
|||
* The name of the model to be used (e.g. gpt-4, codellama)
|
||||
*/
|
||||
export type Model = string;
|
||||
/**
|
||||
* The maximum number of tokens to generate.
|
||||
*/
|
||||
export type MaxTokens = number;
|
||||
/**
|
||||
* Tokens that will stop the completion.
|
||||
*/
|
||||
|
|
@ -70,6 +74,7 @@ export interface LLM {
|
|||
context_length?: ContextLength;
|
||||
unique_id?: UniqueId;
|
||||
model: Model;
|
||||
max_tokens?: MaxTokens;
|
||||
stop_tokens?: StopTokens;
|
||||
timeout?: Timeout;
|
||||
verify_ssl?: VerifySsl;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,18 @@
|
|||
const { exec } = require("child_process");
|
||||
const fs = require("fs");
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
const isPreRelease = args.includes("--pre-release");
|
||||
|
||||
if (!fs.existsSync("build")) {
|
||||
fs.mkdirSync("build");
|
||||
}
|
||||
|
||||
exec("vsce package --out ./build patch", (error) => {
|
||||
const command = isPreRelease
|
||||
? "vsce package --out ./build patch --pre-release"
|
||||
: "vsce package --out ./build patch";
|
||||
|
||||
exec(command, (error) => {
|
||||
if (error) throw error;
|
||||
console.log("vsce package completed");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -22,6 +22,29 @@ function getExtensionVersionInt(versionString: string): number {
|
|||
return parseInt(versionString.replace(/\./g, ""));
|
||||
}
|
||||
|
||||
function addPythonPathForConfig() {
|
||||
// Add to python.analysis.extraPaths global setting so config.py gets LSP
|
||||
const pythonConfig = vscode.workspace.getConfiguration("python");
|
||||
const analysisPaths = pythonConfig.get<string[]>("analysis.extraPaths");
|
||||
const autoCompletePaths = pythonConfig.get<string[]>(
|
||||
"autoComplete.extraPaths"
|
||||
);
|
||||
const pathToAdd = extensionContext?.extensionPath;
|
||||
if (analysisPaths && pathToAdd && !analysisPaths.includes(pathToAdd)) {
|
||||
analysisPaths.push(pathToAdd);
|
||||
pythonConfig.update("analysis.extraPaths", analysisPaths);
|
||||
}
|
||||
|
||||
if (
|
||||
autoCompletePaths &&
|
||||
pathToAdd &&
|
||||
!autoCompletePaths.includes(pathToAdd)
|
||||
) {
|
||||
autoCompletePaths.push(pathToAdd);
|
||||
pythonConfig.update("autoComplete.extraPaths", autoCompletePaths);
|
||||
}
|
||||
}
|
||||
|
||||
export async function activateExtension(context: vscode.ExtensionContext) {
|
||||
extensionContext = context;
|
||||
console.log("Using Continue version: ", getExtensionVersion());
|
||||
|
|
@ -66,6 +89,7 @@ export async function activateExtension(context: vscode.ExtensionContext) {
|
|||
registerAllCodeLensProviders(context);
|
||||
registerAllCommands(context);
|
||||
registerQuickFixProvider();
|
||||
addPythonPathForConfig();
|
||||
|
||||
// Start the server
|
||||
const sessionIdPromise = (async () => {
|
||||
|
|
|
|||
|
|
@ -146,6 +146,17 @@ function ensureDirectoryExistence(filePath: string) {
|
|||
fs.mkdirSync(dirname);
|
||||
}
|
||||
|
||||
function isPreviewExtension() {
|
||||
// If the extension minor version is odd, it is a preview version
|
||||
const extensionVersion = getExtensionVersion();
|
||||
if (!extensionVersion || extensionVersion === "") {
|
||||
return false;
|
||||
}
|
||||
const extensionVersionSplit = extensionVersion.split(".");
|
||||
const extensionMinorVersion = extensionVersionSplit[1];
|
||||
return parseInt(extensionMinorVersion) % 2 === 1;
|
||||
}
|
||||
|
||||
export async function downloadFromS3(
|
||||
bucket: string,
|
||||
fileName: string,
|
||||
|
|
@ -263,7 +274,7 @@ export async function startContinuePythonServer(redownload: boolean = true) {
|
|||
try {
|
||||
await downloadFromS3(
|
||||
bucket,
|
||||
fileName,
|
||||
`${isPreviewExtension() ? "preview/" : ""}${fileName}`,
|
||||
destination,
|
||||
"us-west-1",
|
||||
false
|
||||
|
|
@ -285,7 +296,7 @@ export async function startContinuePythonServer(redownload: boolean = true) {
|
|||
try {
|
||||
await downloadFromS3(
|
||||
bucket,
|
||||
fileName,
|
||||
`${isPreviewExtension() ? "preview/" : ""}${fileName}`,
|
||||
destination,
|
||||
"us-west-1",
|
||||
true
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ a = Analysis(
|
|||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[
|
||||
('continuedev', 'continuedev'),
|
||||
('server/continuedev', 'server/continuedev'),
|
||||
(certifi.where(), 'ca_bundle'),
|
||||
] + copy_metadata('replicate'),
|
||||
hiddenimports=['anthropic', 'github', 'ripgrepy', 'bs4', 'redbaron'],
|
||||
|
|
|
|||
2
run.spec
2
run.spec
|
|
@ -10,7 +10,7 @@ a = Analysis(
|
|||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[
|
||||
('continuedev', 'continuedev'),
|
||||
('server/continuedev', 'server/continuedev'),
|
||||
(certifi.where(), 'ca_bundle')
|
||||
] + copy_metadata('replicate'),
|
||||
hiddenimports=['anthropic', 'github', 'ripgrepy', 'bs4', 'redbaron'],
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"title": "ContextItem",
|
||||
"$ref": "#/definitions/src__continuedev__core__main__ContextItem",
|
||||
"$ref": "#/definitions/continuedev__core__main__ContextItem",
|
||||
"definitions": {
|
||||
"ContextItemId": {
|
||||
"title": "ContextItemId",
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
"id"
|
||||
]
|
||||
},
|
||||
"src__continuedev__core__main__ContextItem": {
|
||||
"continuedev__core__main__ContextItem": {
|
||||
"title": "ContextItem",
|
||||
"description": "A ContextItem is a single item that is stored in the ContextManager.",
|
||||
"type": "object",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"title": "ContinueConfig",
|
||||
"$ref": "#/definitions/src__continuedev__core__config__ContinueConfig",
|
||||
"$ref": "#/definitions/continuedev__core__config__ContinueConfig",
|
||||
"definitions": {
|
||||
"FunctionCall": {
|
||||
"title": "FunctionCall",
|
||||
|
|
@ -126,6 +126,12 @@
|
|||
"description": "The name of the model to be used (e.g. gpt-4, codellama)",
|
||||
"type": "string"
|
||||
},
|
||||
"max_tokens": {
|
||||
"title": "Max Tokens",
|
||||
"description": "The maximum number of tokens to generate.",
|
||||
"default": 1024,
|
||||
"type": "integer"
|
||||
},
|
||||
"stop_tokens": {
|
||||
"title": "Stop Tokens",
|
||||
"description": "Tokens that will stop the completion.",
|
||||
|
|
@ -171,7 +177,7 @@
|
|||
"model"
|
||||
]
|
||||
},
|
||||
"src__continuedev__core__models__ContinueSDK": {
|
||||
"continuedev__core__models__ContinueSDK": {
|
||||
"title": "ContinueSDK",
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
|
|
@ -202,7 +208,7 @@
|
|||
}
|
||||
},
|
||||
"sdk": {
|
||||
"$ref": "#/definitions/src__continuedev__core__models__ContinueSDK"
|
||||
"$ref": "#/definitions/continuedev__core__models__ContinueSDK"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
@ -265,7 +271,7 @@
|
|||
"type": "object",
|
||||
"properties": {}
|
||||
},
|
||||
"src__continuedev__core__context__ContinueSDK": {
|
||||
"continuedev__core__context__ContinueSDK": {
|
||||
"title": "ContinueSDK",
|
||||
"description": "To avoid circular imports",
|
||||
"type": "object",
|
||||
|
|
@ -356,7 +362,7 @@
|
|||
"description": "The ContinueSDK instance accessible by the ContextProvider",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/src__continuedev__core__context__ContinueSDK"
|
||||
"$ref": "#/definitions/continuedev__core__context__ContinueSDK"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -398,7 +404,7 @@
|
|||
"dynamic"
|
||||
]
|
||||
},
|
||||
"src__continuedev__core__config__ContinueConfig": {
|
||||
"continuedev__core__config__ContinueConfig": {
|
||||
"title": "ContinueConfig",
|
||||
"description": "Continue can be deeply customized by editing the `ContinueConfig` object in `~/.continue/config.py` (`%userprofile%\\.continue\\config.py` for Windows) on your machine. This class is instantiated from the config file for every new session.",
|
||||
"type": "object",
|
||||
|
|
@ -436,6 +442,7 @@
|
|||
"system_message": null,
|
||||
"context_length": 2048,
|
||||
"model": "gpt-4",
|
||||
"max_tokens": 1024,
|
||||
"stop_tokens": null,
|
||||
"timeout": 300,
|
||||
"verify_ssl": null,
|
||||
|
|
@ -451,6 +458,7 @@
|
|||
"system_message": null,
|
||||
"context_length": 2048,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"max_tokens": 1024,
|
||||
"stop_tokens": null,
|
||||
"timeout": 300,
|
||||
"verify_ssl": null,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"title": "FileEdit",
|
||||
"$ref": "#/definitions/src__continuedev__models__filesystem_edit__FileEdit",
|
||||
"$ref": "#/definitions/continuedev__models__filesystem_edit__FileEdit",
|
||||
"definitions": {
|
||||
"Position": {
|
||||
"title": "Position",
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
"end"
|
||||
]
|
||||
},
|
||||
"src__continuedev__models__filesystem_edit__FileEdit": {
|
||||
"continuedev__models__filesystem_edit__FileEdit": {
|
||||
"title": "FileEdit",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"title": "FileEditWithFullContents",
|
||||
"$ref": "#/definitions/src__continuedev__models__filesystem_edit__FileEditWithFullContents",
|
||||
"$ref": "#/definitions/continuedev__models__filesystem_edit__FileEditWithFullContents",
|
||||
"definitions": {
|
||||
"Position": {
|
||||
"title": "Position",
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
"replacement"
|
||||
]
|
||||
},
|
||||
"src__continuedev__models__filesystem_edit__FileEditWithFullContents": {
|
||||
"continuedev__models__filesystem_edit__FileEditWithFullContents": {
|
||||
"title": "FileEditWithFullContents",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"title": "FullState",
|
||||
"$ref": "#/definitions/src__continuedev__core__main__FullState",
|
||||
"$ref": "#/definitions/continuedev__core__main__FullState",
|
||||
"definitions": {
|
||||
"FunctionCall": {
|
||||
"title": "FunctionCall",
|
||||
|
|
@ -332,7 +332,7 @@
|
|||
"requires_query"
|
||||
]
|
||||
},
|
||||
"src__continuedev__core__main__FullState": {
|
||||
"continuedev__core__main__FullState": {
|
||||
"title": "FullState",
|
||||
"description": "A full state of the program, including the history",
|
||||
"type": "object",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"title": "History",
|
||||
"$ref": "#/definitions/src__continuedev__core__main__History",
|
||||
"$ref": "#/definitions/continuedev__core__main__History",
|
||||
"definitions": {
|
||||
"FunctionCall": {
|
||||
"title": "FunctionCall",
|
||||
|
|
@ -218,7 +218,7 @@
|
|||
"depth"
|
||||
]
|
||||
},
|
||||
"src__continuedev__core__main__History": {
|
||||
"continuedev__core__main__History": {
|
||||
"title": "History",
|
||||
"description": "A history of steps taken and their results",
|
||||
"type": "object",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"title": "HistoryNode",
|
||||
"$ref": "#/definitions/src__continuedev__core__main__HistoryNode",
|
||||
"$ref": "#/definitions/continuedev__core__main__HistoryNode",
|
||||
"definitions": {
|
||||
"FunctionCall": {
|
||||
"title": "FunctionCall",
|
||||
|
|
@ -171,7 +171,7 @@
|
|||
"content"
|
||||
]
|
||||
},
|
||||
"src__continuedev__core__main__HistoryNode": {
|
||||
"continuedev__core__main__HistoryNode": {
|
||||
"title": "HistoryNode",
|
||||
"description": "A point in history, a list of which make up History",
|
||||
"type": "object",
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"title": "LLM",
|
||||
"$ref": "#/definitions/src__continuedev__libs__llm__LLM",
|
||||
"$ref": "#/definitions/continuedev__libs__llm__LLM",
|
||||
"definitions": {
|
||||
"src__continuedev__libs__llm__LLM": {
|
||||
"continuedev__libs__llm__LLM": {
|
||||
"title": "LLM",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -32,6 +32,12 @@
|
|||
"description": "The name of the model to be used (e.g. gpt-4, codellama)",
|
||||
"type": "string"
|
||||
},
|
||||
"max_tokens": {
|
||||
"title": "Max Tokens",
|
||||
"description": "The maximum number of tokens to generate.",
|
||||
"default": 1024,
|
||||
"type": "integer"
|
||||
},
|
||||
"stop_tokens": {
|
||||
"title": "Stop Tokens",
|
||||
"description": "Tokens that will stop the completion.",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"title": "Models",
|
||||
"$ref": "#/definitions/src__continuedev__core__models__Models",
|
||||
"$ref": "#/definitions/continuedev__core__models__Models",
|
||||
"definitions": {
|
||||
"LLM": {
|
||||
"title": "LLM",
|
||||
|
|
@ -32,6 +32,12 @@
|
|||
"description": "The name of the model to be used (e.g. gpt-4, codellama)",
|
||||
"type": "string"
|
||||
},
|
||||
"max_tokens": {
|
||||
"title": "Max Tokens",
|
||||
"description": "The maximum number of tokens to generate.",
|
||||
"default": 1024,
|
||||
"type": "integer"
|
||||
},
|
||||
"stop_tokens": {
|
||||
"title": "Stop Tokens",
|
||||
"description": "Tokens that will stop the completion.",
|
||||
|
|
@ -82,7 +88,7 @@
|
|||
"type": "object",
|
||||
"properties": {}
|
||||
},
|
||||
"src__continuedev__core__models__Models": {
|
||||
"continuedev__core__models__Models": {
|
||||
"title": "Models",
|
||||
"description": "Main class that holds the current model configuration",
|
||||
"type": "object",
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"title": "Position",
|
||||
"$ref": "#/definitions/src__continuedev__models__main__Position",
|
||||
"$ref": "#/definitions/continuedev__models__main__Position",
|
||||
"definitions": {
|
||||
"src__continuedev__models__main__Position": {
|
||||
"continuedev__models__main__Position": {
|
||||
"title": "Position",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"title": "Range",
|
||||
"$ref": "#/definitions/src__continuedev__models__main__Range",
|
||||
"$ref": "#/definitions/continuedev__models__main__Range",
|
||||
"definitions": {
|
||||
"Position": {
|
||||
"title": "Position",
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
"character"
|
||||
]
|
||||
},
|
||||
"src__continuedev__models__main__Range": {
|
||||
"continuedev__models__main__Range": {
|
||||
"title": "Range",
|
||||
"description": "A range in a file. 0-indexed.",
|
||||
"type": "object",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"title": "RangeInFile",
|
||||
"$ref": "#/definitions/src__continuedev__models__filesystem__RangeInFile",
|
||||
"$ref": "#/definitions/continuedev__models__filesystem__RangeInFile",
|
||||
"definitions": {
|
||||
"Position": {
|
||||
"title": "Position",
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
"end"
|
||||
]
|
||||
},
|
||||
"src__continuedev__models__filesystem__RangeInFile": {
|
||||
"continuedev__models__filesystem__RangeInFile": {
|
||||
"title": "RangeInFile",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"title": "SessionInfo",
|
||||
"$ref": "#/definitions/src__continuedev__core__main__SessionInfo",
|
||||
"$ref": "#/definitions/continuedev__core__main__SessionInfo",
|
||||
"definitions": {
|
||||
"src__continuedev__core__main__SessionInfo": {
|
||||
"continuedev__core__main__SessionInfo": {
|
||||
"title": "SessionInfo",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"title": "Traceback",
|
||||
"$ref": "#/definitions/src__continuedev__models__main__Traceback",
|
||||
"$ref": "#/definitions/continuedev__models__main__Traceback",
|
||||
"definitions": {
|
||||
"TracebackFrame": {
|
||||
"title": "TracebackFrame",
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
"function"
|
||||
]
|
||||
},
|
||||
"src__continuedev__models__main__Traceback": {
|
||||
"continuedev__models__main__Traceback": {
|
||||
"title": "Traceback",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"title": "TracebackFrame",
|
||||
"$ref": "#/definitions/src__continuedev__models__main__TracebackFrame",
|
||||
"$ref": "#/definitions/continuedev__models__main__TracebackFrame",
|
||||
"definitions": {
|
||||
"src__continuedev__models__main__TracebackFrame": {
|
||||
"continuedev__models__main__TracebackFrame": {
|
||||
"title": "TracebackFrame",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ The Continue server acts as a bridge between the Continue React app and your IDE
|
|||
|
||||
Start it by running the following commands:
|
||||
|
||||
1. `cd continuedev`
|
||||
1. `cd server`
|
||||
2. Make sure packages are installed with `poetry install`
|
||||
- If poetry is not installed, you can install with
|
||||
```bash
|
||||
|
|
@ -18,8 +18,7 @@ Start it by running the following commands:
|
|||
```
|
||||
(official instructions [here](https://python-poetry.org/docs/#installing-with-the-official-installer))
|
||||
3. `poetry shell` to activate the virtual environment
|
||||
4. `cd ..`
|
||||
5. `python3 -m continuedev.src.continuedev.server.main` to start the server
|
||||
4. `python3 -m continuedev.server.main` to start the server
|
||||
|
||||
Once you've validated that this works, you'll often want to use a debugger, in which case we've provided a launch configuration for VS Code in `.vscode/launch.json`. To start the debugger in VS Code, ensure that the workspace directory is the root of the `continue` repo, then press F5.
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ Once you've validated that this works, you'll often want to use a debugger, in w
|
|||
|
||||
## Writing Steps
|
||||
|
||||
See the `src/continuedev/libs/steps` folder for examples of writing a Continue step. See our documentation for tutorials.
|
||||
See the `continuedev/libs/steps` folder for examples of writing a Continue step. See our documentation for tutorials.
|
||||
|
||||
## How to contribute
|
||||
|
||||
|
|
@ -71,9 +70,10 @@ cd continue/extension/scripts && python3 install_from_source.py
|
|||
|
||||
> [!IMPORTANT]
|
||||
> Ensure you have a Java Runtime Environment (JRE) installed. Verify this by typing `java
|
||||
> -version` in your command prompt or terminal. If a version number appears, you're set.
|
||||
-version` in your command prompt or terminal. If a version number appears, you're set.
|
||||
> If not, download and install a JRE from Oracle's website or through a package manager,
|
||||
> for example Homebrew.
|
||||
>
|
||||
> ```sh
|
||||
> brew install openjdk@11
|
||||
> ```
|
||||
|
|
@ -83,6 +83,6 @@ cd continue/extension/scripts && python3 install_from_source.py
|
|||
- [Continue Server README](./README.md): learn about the core of Continue, which can be downloaded as a [PyPI package](https://pypi.org/project/continuedev/)
|
||||
- [VS Code Extension README](../extension/README.md): learn about the capabilities of our extension—the first implementation of Continue's IDE Protocol—which makes it possible to use use Continue in VS Code and GitHub Codespaces
|
||||
- [Continue GUI README](../extension/react-app/): learn about the React app that lets users interact with the server and is placed adjacent to the text editor in any supported IDE
|
||||
- [Schema README](../schema/README.md): learn about the JSON Schema types generated from Pydantic models, which we use across the `continuedev/` and `extension/` directories
|
||||
- [Schema README](../schema/README.md): learn about the JSON Schema types generated from Pydantic models, which we use across the `server/` and `extension/` directories
|
||||
- [Continue Docs README](../docs/README.md): learn how our [docs](https://continue.dev/docs) are written and built
|
||||
- [How to debug the VS Code Extension README](../extension/src/README.md): learn how to set up the VS Code extension, so you can debug it
|
||||
|
|
@ -30,12 +30,6 @@ from ..models.main import ContinueBaseModel
|
|||
from ..plugins.context_providers.file import FileContextProvider
|
||||
from ..plugins.context_providers.highlighted_code import HighlightedCodeContextProvider
|
||||
from ..plugins.policies.default import DefaultPolicy
|
||||
from ..plugins.steps.core.core import (
|
||||
DisplayErrorStep,
|
||||
ManualEditStep,
|
||||
ReversibleStep,
|
||||
UserInputStep,
|
||||
)
|
||||
from ..plugins.steps.on_traceback import DefaultOnTracebackStep
|
||||
from ..server.ide_protocol import AbstractIdeProtocolServer
|
||||
from ..server.meilisearch_server import get_meilisearch_url, stop_meilisearch
|
||||
|
|
@ -54,6 +48,7 @@ from .main import (
|
|||
)
|
||||
from .observation import InternalErrorObservation, Observation
|
||||
from .sdk import ContinueSDK
|
||||
from .steps import DisplayErrorStep, ManualEditStep, ReversibleStep, UserInputStep
|
||||
|
||||
|
||||
def get_error_title(e: Exception) -> str:
|
||||
|
|
@ -2,8 +2,8 @@ from typing import List, Optional
|
|||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from ..libs.llm import LLM
|
||||
from ..libs.llm.anthropic import AnthropicLLM
|
||||
from ..libs.llm.base import LLM
|
||||
from ..libs.llm.ggml import GGML
|
||||
from ..libs.llm.google_palm_api import GooglePaLMAPI
|
||||
from ..libs.llm.hf_inference_api import HuggingFaceInferenceAPI
|
||||
|
|
@ -2,7 +2,7 @@ import os
|
|||
import traceback
|
||||
from typing import Coroutine, List, Optional, Union
|
||||
|
||||
from ..libs.llm import LLM
|
||||
from ..libs.llm.base import LLM
|
||||
from ..libs.util.devdata import dev_data_logger
|
||||
from ..libs.util.logging import logger
|
||||
from ..libs.util.paths import (
|
||||
|
|
@ -21,14 +21,6 @@ from ..models.filesystem_edit import (
|
|||
FileSystemEdit,
|
||||
)
|
||||
from ..models.main import Range
|
||||
from ..plugins.steps.core.core import (
|
||||
DefaultModelEditCodeStep,
|
||||
FileSystemEditStep,
|
||||
MessageStep,
|
||||
RangeInFileWithContents,
|
||||
ShellCommandsStep,
|
||||
WaitForUserConfirmationStep,
|
||||
)
|
||||
from ..server.ide_protocol import AbstractIdeProtocolServer
|
||||
from .abstract_sdk import AbstractContinueSDK
|
||||
from .config import ContinueConfig
|
||||
|
|
@ -43,6 +35,14 @@ from .main import (
|
|||
)
|
||||
from .models import Models
|
||||
from .observation import Observation
|
||||
from .steps import (
|
||||
DefaultModelEditCodeStep,
|
||||
FileSystemEditStep,
|
||||
MessageStep,
|
||||
RangeInFileWithContents,
|
||||
ShellCommandsStep,
|
||||
WaitForUserConfirmationStep,
|
||||
)
|
||||
|
||||
|
||||
class Autopilot:
|
||||
|
|
@ -4,20 +4,18 @@ import subprocess
|
|||
from textwrap import dedent
|
||||
from typing import Coroutine, List, Optional, Union
|
||||
|
||||
from ....core.main import ChatMessage, ContinueCustomException, Step
|
||||
from ....core.observation import Observation, TextObservation, UserInputObservation
|
||||
from ....libs.llm import LLM
|
||||
from ....libs.llm.openai_free_trial import OpenAIFreeTrial
|
||||
from ....libs.util.count_tokens import DEFAULT_MAX_TOKENS
|
||||
from ....libs.util.devdata import dev_data_logger
|
||||
from ....libs.util.strings import (
|
||||
from ..libs.llm.base import LLM
|
||||
from ..libs.llm.openai_free_trial import OpenAIFreeTrial
|
||||
from ..libs.util.count_tokens import DEFAULT_MAX_TOKENS
|
||||
from ..libs.util.devdata import dev_data_logger
|
||||
from ..libs.util.strings import (
|
||||
dedent_and_get_common_whitespace,
|
||||
remove_quotes_and_escapes,
|
||||
)
|
||||
from ....libs.util.telemetry import posthog_logger
|
||||
from ....libs.util.templating import render_prompt_template
|
||||
from ....models.filesystem import FileSystem, RangeInFile, RangeInFileWithContents
|
||||
from ....models.filesystem_edit import (
|
||||
from ..libs.util.telemetry import posthog_logger
|
||||
from ..libs.util.templating import render_prompt_template
|
||||
from ..models.filesystem import FileSystem, RangeInFile, RangeInFileWithContents
|
||||
from ..models.filesystem_edit import (
|
||||
EditDiff,
|
||||
FileEdit,
|
||||
FileEditWithFullContents,
|
||||
|
|
@ -25,7 +23,9 @@ from ....models.filesystem_edit import (
|
|||
)
|
||||
|
||||
# from ....libs.llm.replicate import ReplicateLLM
|
||||
from ....models.main import Range
|
||||
from ..models.main import Range
|
||||
from .main import ChatMessage, ContinueCustomException, Step
|
||||
from .observation import Observation, TextObservation, UserInputObservation
|
||||
|
||||
|
||||
class ContinueSDK:
|
||||
|
|
@ -5,20 +5,20 @@ This is the Continue configuration file.
|
|||
See https://continue.dev/docs/customization to for documentation of the available options.
|
||||
\"\"\"
|
||||
|
||||
from continuedev.src.continuedev.core.models import Models
|
||||
from continuedev.src.continuedev.core.config import CustomCommand, SlashCommand, ContinueConfig
|
||||
from continuedev.src.continuedev.plugins.context_providers.github import GitHubIssuesContextProvider
|
||||
from continuedev.src.continuedev.libs.llm.openai_free_trial import OpenAIFreeTrial
|
||||
from continuedev.core.models import Models
|
||||
from continuedev.core.config import CustomCommand, SlashCommand, ContinueConfig
|
||||
from continuedev.plugins.context_providers.github import GitHubIssuesContextProvider
|
||||
from continuedev.libs.llm.openai_free_trial import OpenAIFreeTrial
|
||||
|
||||
from continuedev.src.continuedev.plugins.steps.open_config import OpenConfigStep
|
||||
from continuedev.src.continuedev.plugins.steps.clear_history import ClearHistoryStep
|
||||
from continuedev.src.continuedev.plugins.steps.comment_code import CommentCodeStep
|
||||
from continuedev.src.continuedev.plugins.steps.share_session import ShareSessionStep
|
||||
from continuedev.src.continuedev.plugins.steps.main import EditHighlightedCodeStep
|
||||
from continuedev.src.continuedev.plugins.steps.cmd import GenerateShellCommandStep
|
||||
from continuedev.src.continuedev.plugins.context_providers.diff import DiffContextProvider
|
||||
from continuedev.src.continuedev.plugins.context_providers.url import URLContextProvider
|
||||
from continuedev.src.continuedev.plugins.context_providers.terminal import TerminalContextProvider
|
||||
from continuedev.plugins.steps.open_config import OpenConfigStep
|
||||
from continuedev.plugins.steps.clear_history import ClearHistoryStep
|
||||
from continuedev.plugins.steps.comment_code import CommentCodeStep
|
||||
from continuedev.plugins.steps.share_session import ShareSessionStep
|
||||
from continuedev.plugins.steps.main import EditHighlightedCodeStep
|
||||
from continuedev.plugins.steps.cmd import GenerateShellCommandStep
|
||||
from continuedev.plugins.context_providers.diff import DiffContextProvider
|
||||
from continuedev.plugins.context_providers.url import URLContextProvider
|
||||
from continuedev.plugins.context_providers.terminal import TerminalContextProvider
|
||||
|
||||
config = ContinueConfig(
|
||||
allow_anonymous_telemetry=True,
|
||||
14
server/continuedev/libs/llm/__init__.py
Normal file
14
server/continuedev/libs/llm/__init__.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from .anthropic import AnthropicLLM # noqa: F401
|
||||
from .ggml import GGML # noqa: F401
|
||||
from .google_palm_api import GooglePaLMAPI # noqa: F401
|
||||
from .hf_inference_api import HuggingFaceInferenceAPI # noqa: F401
|
||||
from .hf_tgi import HuggingFaceTGI # noqa: F401
|
||||
from .llamacpp import LlamaCpp # noqa: F401
|
||||
from .ollama import Ollama # noqa: F401
|
||||
from .openai import OpenAI # noqa: F401
|
||||
from .openai_free_trial import OpenAIFreeTrial # noqa: F401
|
||||
from .proxy_server import ProxyServer # noqa: F401
|
||||
from .queued import QueuedLLM # noqa: F401
|
||||
from .replicate import ReplicateLLM # noqa: F401
|
||||
from .text_gen_interface import TextGenUI # noqa: F401
|
||||
from .together import TogetherLLM # noqa: F401
|
||||
|
|
@ -2,7 +2,7 @@ from typing import Any, Callable, Coroutine
|
|||
|
||||
from anthropic import AI_PROMPT, HUMAN_PROMPT, AsyncAnthropic
|
||||
|
||||
from ..llm import LLM, CompletionOptions
|
||||
from .base import LLM, CompletionOptions
|
||||
from .prompts.chat import anthropic_template_messages
|
||||
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ class AnthropicLLM(LLM):
|
|||
Import the `AnthropicLLM` class and set it as the default model:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.anthropic import AnthropicLLM
|
||||
from continuedev.libs.llm.anthropic import AnthropicLLM
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -6,7 +6,6 @@ import certifi
|
|||
from pydantic import Field, validator
|
||||
|
||||
from ...core.main import ChatMessage
|
||||
from ...libs.util.devdata import dev_data_logger
|
||||
from ...models.main import ContinueBaseModel
|
||||
from ..util.count_tokens import (
|
||||
DEFAULT_ARGS,
|
||||
|
|
@ -16,6 +15,7 @@ from ..util.count_tokens import (
|
|||
format_chat_messages,
|
||||
prune_raw_prompt_from_top,
|
||||
)
|
||||
from ..util.devdata import dev_data_logger
|
||||
|
||||
|
||||
class CompletionOptions(ContinueBaseModel):
|
||||
|
|
@ -36,7 +36,7 @@ class CompletionOptions(ContinueBaseModel):
|
|||
top_p: Optional[float] = Field(None, description="The top_p of the completion.")
|
||||
top_k: Optional[int] = Field(None, description="The top_k of the completion.")
|
||||
presence_penalty: Optional[float] = Field(
|
||||
None, description="The presence penalty of the completion."
|
||||
None, description="The presence penalty Aof the completion."
|
||||
)
|
||||
frequency_penalty: Optional[float] = Field(
|
||||
None, description="The frequency penalty of the completion."
|
||||
|
|
@ -57,6 +57,12 @@ class LLM(ContinueBaseModel):
|
|||
None,
|
||||
description="A title that will identify this model in the model selection dropdown",
|
||||
)
|
||||
|
||||
unique_id: Optional[str] = Field(None, description="The unique ID of the user.")
|
||||
model: str = Field(
|
||||
..., description="The name of the model to be used (e.g. gpt-4, codellama)"
|
||||
)
|
||||
|
||||
system_message: Optional[str] = Field(
|
||||
None, description="A system message that will always be followed by the LLM"
|
||||
)
|
||||
|
|
@ -66,18 +72,20 @@ class LLM(ContinueBaseModel):
|
|||
description="The maximum context length of the LLM in tokens, as counted by count_tokens.",
|
||||
)
|
||||
|
||||
unique_id: Optional[str] = Field(None, description="The unique ID of the user.")
|
||||
model: str = Field(
|
||||
..., description="The name of the model to be used (e.g. gpt-4, codellama)"
|
||||
)
|
||||
|
||||
max_tokens: int = Field(
|
||||
DEFAULT_MAX_TOKENS, description="The maximum number of tokens to generate."
|
||||
)
|
||||
|
||||
stop_tokens: Optional[List[str]] = Field(
|
||||
None, description="Tokens that will stop the completion."
|
||||
)
|
||||
temperature: Optional[float] = Field(
|
||||
None, description="The temperature of the completion."
|
||||
)
|
||||
top_p: Optional[float] = Field(None, description="The top_p of the completion.")
|
||||
top_k: Optional[int] = Field(None, description="The top_k of the completion.")
|
||||
presence_penalty: Optional[float] = Field(
|
||||
None, description="The presence penalty Aof the completion."
|
||||
)
|
||||
frequency_penalty: Optional[float] = Field(
|
||||
None, description="The frequency penalty of the completion."
|
||||
)
|
||||
|
||||
timeout: Optional[int] = Field(
|
||||
300,
|
||||
|
|
@ -149,6 +157,22 @@ class LLM(ContinueBaseModel):
|
|||
"description": "Path to a custom CA bundle to use when making the HTTP request"
|
||||
},
|
||||
"proxy": {"description": "Proxy URL to use when making the HTTP request"},
|
||||
"stop_tokens": {"description": "Tokens that will stop the completion."},
|
||||
"temperature": {
|
||||
"description": "The sampling temperature used for generation."
|
||||
},
|
||||
"top_p": {
|
||||
"description": "The top_p sampling parameter used for generation."
|
||||
},
|
||||
"top_k": {
|
||||
"description": "The top_k sampling parameter used for generation."
|
||||
},
|
||||
"presence_penalty": {
|
||||
"description": "The presence penalty used for completions."
|
||||
},
|
||||
"frequency_penalty": {
|
||||
"description": "The frequency penalty used for completions."
|
||||
},
|
||||
}
|
||||
|
||||
def dict(self, **kwargs):
|
||||
|
|
@ -235,13 +259,13 @@ class LLM(ContinueBaseModel):
|
|||
"""Yield completion response, either streamed or not."""
|
||||
options = CompletionOptions(
|
||||
model=model or self.model,
|
||||
temperature=temperature,
|
||||
top_p=top_p,
|
||||
top_k=top_k,
|
||||
presence_penalty=presence_penalty,
|
||||
frequency_penalty=frequency_penalty,
|
||||
temperature=temperature or self.temperature,
|
||||
top_p=top_p or self.top_p,
|
||||
top_k=top_k or self.top_k,
|
||||
presence_penalty=presence_penalty or self.presence_penalty,
|
||||
frequency_penalty=frequency_penalty or self.frequency_penalty,
|
||||
stop=stop or self.stop_tokens,
|
||||
max_tokens=max_tokens or self.max_tokens,
|
||||
max_tokens=max_tokens,
|
||||
functions=functions,
|
||||
)
|
||||
|
||||
|
|
@ -286,13 +310,13 @@ class LLM(ContinueBaseModel):
|
|||
"""Yield completion response, either streamed or not."""
|
||||
options = CompletionOptions(
|
||||
model=model or self.model,
|
||||
temperature=temperature,
|
||||
top_p=top_p,
|
||||
top_k=top_k,
|
||||
presence_penalty=presence_penalty,
|
||||
frequency_penalty=frequency_penalty,
|
||||
temperature=temperature or self.temperature,
|
||||
top_p=top_p or self.top_p,
|
||||
top_k=top_k or self.top_k,
|
||||
presence_penalty=presence_penalty or self.presence_penalty,
|
||||
frequency_penalty=frequency_penalty or self.frequency_penalty,
|
||||
stop=stop or self.stop_tokens,
|
||||
max_tokens=max_tokens or self.max_tokens,
|
||||
max_tokens=max_tokens,
|
||||
functions=functions,
|
||||
)
|
||||
|
||||
|
|
@ -335,13 +359,13 @@ class LLM(ContinueBaseModel):
|
|||
"""Yield completion response, either streamed or not."""
|
||||
options = CompletionOptions(
|
||||
model=model or self.model,
|
||||
temperature=temperature,
|
||||
top_p=top_p,
|
||||
top_k=top_k,
|
||||
presence_penalty=presence_penalty,
|
||||
frequency_penalty=frequency_penalty,
|
||||
temperature=temperature or self.temperature,
|
||||
top_p=top_p or self.top_p,
|
||||
top_k=top_k or self.top_k,
|
||||
presence_penalty=presence_penalty or self.presence_penalty,
|
||||
frequency_penalty=frequency_penalty or self.frequency_penalty,
|
||||
stop=stop or self.stop_tokens,
|
||||
max_tokens=max_tokens or self.max_tokens,
|
||||
max_tokens=max_tokens,
|
||||
functions=functions,
|
||||
)
|
||||
|
||||
|
|
@ -4,9 +4,8 @@ from typing import Any, Callable, Coroutine, Dict, List, Optional
|
|||
from pydantic import Field
|
||||
|
||||
from ...core.main import ChatMessage
|
||||
from ..llm import LLM
|
||||
from ..util.logging import logger
|
||||
from . import CompletionOptions
|
||||
from .base import LLM, CompletionOptions
|
||||
from .openai import CHAT_MODELS
|
||||
from .prompts.chat import llama2_template_messages
|
||||
from .prompts.edit import simplified_edit_prompt
|
||||
|
|
@ -19,7 +18,7 @@ class GGML(LLM):
|
|||
Once the model is running on localhost:8000, change `~/.continue/config.py` to look like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.ggml import GGML
|
||||
from continuedev.libs.llm.ggml import GGML
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -4,7 +4,7 @@ import requests
|
|||
from pydantic import Field
|
||||
|
||||
from ...core.main import ChatMessage
|
||||
from ..llm import LLM
|
||||
from .base import LLM
|
||||
|
||||
|
||||
class GooglePaLMAPI(LLM):
|
||||
|
|
@ -12,8 +12,8 @@ class GooglePaLMAPI(LLM):
|
|||
The Google PaLM API is currently in public preview, so production applications are not supported yet. However, you can [create an API key in Google MakerSuite](https://makersuite.google.com/u/2/app/apikey) and begin trying out the `chat-bison-001` model. Change `~/.continue/config.py` to look like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.core.models import Models
|
||||
from continuedev.src.continuedev.libs.llm.hf_inference_api import GooglePaLMAPI
|
||||
from continuedev.core.models import Models
|
||||
from continuedev.libs.llm.hf_inference_api import GooglePaLMAPI
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -3,7 +3,7 @@ from typing import Callable, Dict, List, Union
|
|||
from huggingface_hub import InferenceClient
|
||||
from pydantic import Field
|
||||
|
||||
from ..llm import LLM, CompletionOptions
|
||||
from .base import LLM, CompletionOptions
|
||||
from .prompts.chat import llama2_template_messages
|
||||
from .prompts.edit import simplified_edit_prompt
|
||||
|
||||
|
|
@ -13,8 +13,8 @@ class HuggingFaceInferenceAPI(LLM):
|
|||
Hugging Face Inference API is a great option for newly released language models. Sign up for an account and add billing [here](https://huggingface.co/settings/billing), access the Inference Endpoints [here](https://ui.endpoints.huggingface.co), click on “New endpoint”, and fill out the form (e.g. select a model like [WizardCoder-Python-34B-V1.0](https://huggingface.co/WizardLM/WizardCoder-Python-34B-V1.0)), and then deploy your model by clicking “Create Endpoint”. Change `~/.continue/config.py` to look like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.core.models import Models
|
||||
from continuedev.src.continuedev.libs.llm.hf_inference_api import HuggingFaceInferenceAPI
|
||||
from continuedev.core.models import Models
|
||||
from continuedev.libs.llm.hf_inference_api import HuggingFaceInferenceAPI
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -4,7 +4,7 @@ from typing import Any, Callable, List
|
|||
from pydantic import Field
|
||||
|
||||
from ...core.main import ChatMessage
|
||||
from ..llm import LLM, CompletionOptions
|
||||
from .base import LLM, CompletionOptions
|
||||
from .prompts.chat import llama2_template_messages
|
||||
from .prompts.edit import simplified_edit_prompt
|
||||
|
||||
|
|
@ -3,7 +3,7 @@ from typing import Any, Callable, Dict
|
|||
|
||||
from pydantic import Field
|
||||
|
||||
from ..llm import LLM
|
||||
from .base import LLM
|
||||
from .prompts.chat import llama2_template_messages
|
||||
from .prompts.edit import simplified_edit_prompt
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ class LlamaCpp(LLM):
|
|||
After it's up and running, change `~/.continue/config.py` to look like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.llamacpp import LlamaCpp
|
||||
from continuedev.libs.llm.llamacpp import LlamaCpp
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -4,8 +4,8 @@ from typing import Callable
|
|||
import aiohttp
|
||||
from pydantic import Field
|
||||
|
||||
from ..llm import LLM
|
||||
from ..util.logging import logger
|
||||
from .base import LLM
|
||||
from .prompts.chat import llama2_template_messages
|
||||
from .prompts.edit import simplified_edit_prompt
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ class Ollama(LLM):
|
|||
[Ollama](https://ollama.ai/) is an application for Mac and Linux that makes it easy to locally run open-source models, including Llama-2. Download the app from the website, and it will walk you through setup in a couple of minutes. You can also read more in their [README](https://github.com/jmorganca/ollama). Continue can then be configured to use the `Ollama` LLM class:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.ollama import Ollama
|
||||
from continuedev.libs.llm.ollama import Ollama
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -5,7 +5,7 @@ import openai
|
|||
from pydantic import Field
|
||||
|
||||
from ...core.main import ChatMessage
|
||||
from ..llm import LLM
|
||||
from .base import LLM
|
||||
|
||||
CHAT_MODELS = {
|
||||
"gpt-3.5-turbo",
|
||||
|
|
@ -33,7 +33,7 @@ class OpenAI(LLM):
|
|||
If you are locally serving a model that uses an OpenAI-compatible server, you can simply change the `api_base` in the `OpenAI` class like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.openai import OpenAI
|
||||
from continuedev.libs.llm.openai import OpenAI
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Callable, List, Optional
|
||||
|
||||
from ...core.main import ChatMessage
|
||||
from . import LLM
|
||||
from .base import LLM
|
||||
from .openai import OpenAI
|
||||
from .proxy_server import ProxyServer
|
||||
|
||||
|
|
@ -5,8 +5,8 @@ from typing import List
|
|||
import aiohttp
|
||||
|
||||
from ...core.main import ChatMessage
|
||||
from ..llm import LLM
|
||||
from ..util.telemetry import posthog_logger
|
||||
from .base import LLM
|
||||
|
||||
# SERVER_URL = "http://127.0.0.1:8080"
|
||||
SERVER_URL = "https://proxy-server-l6vsfbzhba-uw.a.run.app"
|
||||
|
|
@ -4,7 +4,7 @@ from typing import Any, List, Union
|
|||
from pydantic import Field
|
||||
|
||||
from ...core.main import ChatMessage
|
||||
from . import LLM, CompletionOptions
|
||||
from .base import LLM, CompletionOptions
|
||||
|
||||
|
||||
class QueuedLLM(LLM):
|
||||
|
|
@ -14,7 +14,7 @@ class QueuedLLM(LLM):
|
|||
If you are already using another LLM class and are experiencing this problem, you can just wrap it with the QueuedLLM class like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.libs.llm.queued import QueuedLLM
|
||||
from continuedev.libs.llm.queued import QueuedLLM
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
|
|
@ -5,7 +5,7 @@ import replicate
|
|||
from pydantic import Field
|
||||
|
||||
from ...core.main import ChatMessage
|
||||
from . import LLM
|
||||
from .base import LLM
|
||||
from .prompts.edit import simplified_edit_prompt
|
||||
|
||||
|
||||
|
|
@ -14,8 +14,8 @@ class ReplicateLLM(LLM):
|
|||
Replicate is a great option for newly released language models or models that you've deployed through their platform. Sign up for an account [here](https://replicate.ai/), copy your API key, and then select any model from the [Replicate Streaming List](https://replicate.com/collections/streaming-language-models). Change `~/.continue/config.py` to look like this:
|
||||
|
||||
```python title="~/.continue/config.py"
|
||||
from continuedev.src.continuedev.core.models import Models
|
||||
from continuedev.src.continuedev.libs.llm.replicate import ReplicateLLM
|
||||
from continuedev.core.models import Models
|
||||
from continuedev.libs.llm.replicate import ReplicateLLM
|
||||
|
||||
config = ContinueConfig(
|
||||
...
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue