diff --git a/.vscode/launch.json b/.vscode/launch.json index 896793040..835c09089 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -20,7 +20,7 @@ "outFiles": ["${workspaceFolder}/extensions/vscode/out/extension.js"], "preLaunchTask": "vscode-extension:build", "env": { - // "CONTROL_PLANE_ENV": "local" + "CONTROL_PLANE_ENV": "local" } }, { diff --git a/core/control-plane/client.ts b/core/control-plane/client.ts index 80b67bac6..f54b550b2 100644 --- a/core/control-plane/client.ts +++ b/core/control-plane/client.ts @@ -20,7 +20,7 @@ export interface ControlPlaneModelDescription extends ModelDescription {} export const DEFAULT_CONTROL_PLANE_PROXY_URL = process.env.CONTROL_PLANE_ENV === "local" - ? "http://localhost:3002/" + ? "http://localhost:3001/proxy" : "https://control-plane-proxy.continue.dev/"; export const CONTROL_PLANE_URL = diff --git a/core/llm/llms/Bedrock.ts b/core/llm/llms/Bedrock.ts index 415ec0f10..c96330855 100644 --- a/core/llm/llms/Bedrock.ts +++ b/core/llm/llms/Bedrock.ts @@ -18,7 +18,7 @@ class Bedrock extends BaseLLM { static defaultOptions: Partial = { region: "us-east-1", model: "anthropic.claude-3-sonnet-20240229-v1:0", - contextLength: 200_000 + contextLength: 200_000, }; profile?: string | undefined; diff --git a/core/llm/llms/stubs/ContinueProxy.ts b/core/llm/llms/stubs/ContinueProxy.ts index 2713e894b..e91e92e06 100644 --- a/core/llm/llms/stubs/ContinueProxy.ts +++ b/core/llm/llms/stubs/ContinueProxy.ts @@ -5,7 +5,7 @@ import OpenAI from "../OpenAI.js"; class ContinueProxy extends OpenAI { set controlPlaneProxyInfo(value: ControlPlaneProxyInfo) { this.apiKey = value.workOsAccessToken; - this.apiBase = new URL("openai/v1", value.controlPlaneProxyUrl).toString(); + this.apiBase = new URL("openai/v1/", value.controlPlaneProxyUrl).toString(); } static providerName: ModelProvider = "continue-proxy"; diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index 7166520e1..108714449 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -200,8 +200,8 @@ "### Free Trial\nNew users can try out Continue for free using a proxy server that securely makes calls to OpenAI using our API key. If you are ready to use your own API key or have used all 250 free uses, you can enter your API key in config.json where it says `apiKey=\"\"` or select another model provider.\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/freetrial)", "### Anthropic\nTo get started with Anthropic models, you first need to sign up for the open beta [here](https://claude.ai/login) to obtain an API key.\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/anthropicllm)", "### Cohere\nTo use Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/cohere)", - "### Bedrock\nTo get started with Bedrock you need to sign up on AWS [here](https://aws.amazon.com/bedrock/claude/)", - "### Bedrock Imported Models\nTo get started with Bedrock you need to sign up on AWS [here](https://aws.amazon.com/bedrock/claude/)", + "### Bedrock\nTo get started with Bedrock you need to sign up on AWS [here](https://aws.amazon.com/bedrock)", + "### Bedrock Imported Models\nTo get started with Bedrock you need to sign up on AWS [here](https://aws.amazon.com/bedrock)", "### Sagemaker\nSagemaker is AWS' machine learning platform.", "### Together\nTogether is a hosted service that provides extremely fast streaming of open-source language models. To get started with Together:\n1. Obtain an API key from [here](https://together.ai)\n2. Paste below\n3. Select a model preset\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/togetherllm)", "### Ollama\nTo get started with Ollama, follow these steps:\n1. Download from [ollama.ai](https://ollama.ai/) and open the application\n2. Open a terminal and run `ollama run `. Example model names are `codellama:7b-instruct` or `llama2:7b-text`. You can find the full list [here](https://ollama.ai/library).\n3. Make sure that the model name used in step 2 is the same as the one in config.json (e.g. `model=\"codellama:7b-instruct\"`)\n4. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/ollama)", @@ -242,6 +242,21 @@ "description": "The base URL of the LLM API.", "type": "string" }, + "region": { + "title": "Region", + "description": "The region where the model is hosted", + "type": "string" + }, + "profile": { + "title": "Profile", + "description": "The AWS security profile to use", + "type": "string" + }, + "modelArn": { + "title": "Profile", + "description": "The AWS arn for the imported model", + "type": "string" + }, "contextLength": { "title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by countTokens.", @@ -393,6 +408,21 @@ "required": ["apiKey"] } }, + { + "if": { + "properties": { + "provider": { + "enum": [ + "bedrockimport" + ] + } + }, + "required": ["provider"] + }, + "then": { + "required": ["modelArn"] + } + }, { "if": { "properties": { @@ -2030,7 +2060,8 @@ "cohere", "free-trial", "gemini", - "voyage" + "voyage", + "bedrock" ] }, "model": { @@ -2053,6 +2084,16 @@ "type": "integer", "minimum": 128, "exclusiveMaximum": 2147483647 + }, + "region": { + "title": "Region", + "description": "The region where the model is hosted", + "type": "string" + }, + "profile": { + "title": "Profile", + "description": "The AWS security profile to use", + "type": "string" } }, "required": ["provider"], diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 70c584b9e..03d2b147b 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -203,8 +203,8 @@ "### Free Trial\nNew users can try out Continue for free using a proxy server that securely makes calls to OpenAI using our API key. If you are ready to use your own API key or have used all 250 free uses, you can enter your API key in config.json where it says `apiKey=\"\"` or select another model provider.\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/freetrial)", "### Anthropic\nTo get started with Anthropic models, you first need to sign up for the open beta [here](https://claude.ai/login) to obtain an API key.\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/anthropicllm)", "### Cohere\nTo use Cohere, visit the [Cohere dashboard](https://dashboard.cohere.com/api-keys) to create an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/cohere)", - "### Bedrock\nTo get started with Bedrock you need to sign up on AWS [here](https://aws.amazon.com/bedrock/claude/)", - "### Bedrock Imported Models\nTo get started with Bedrock you need to sign up on AWS [here](https://aws.amazon.com/bedrock/claude/)", + "### Bedrock\nTo get started with Bedrock you need to sign up on AWS [here](https://aws.amazon.com/bedrock)", + "### Bedrock Imported Models\nTo get started with Bedrock you need to sign up on AWS [here](https://aws.amazon.com/bedrock)", "### Sagemaker\nSagemaker is AWS' machine learning platform.", "### Together\nTogether is a hosted service that provides extremely fast streaming of open-source language models. To get started with Together:\n1. Obtain an API key from [here](https://together.ai)\n2. Paste below\n3. Select a model preset\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/togetherllm)", "### Ollama\nTo get started with Ollama, follow these steps:\n1. Download from [ollama.ai](https://ollama.ai/) and open the application\n2. Open a terminal and run `ollama run `. Example model names are `codellama:7b-instruct` or `llama2:7b-text`. You can find the full list [here](https://ollama.ai/library).\n3. Make sure that the model name used in step 2 is the same as the one in config.json (e.g. `model=\"codellama:7b-instruct\"`)\n4. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/ollama)", @@ -245,6 +245,21 @@ "description": "The base URL of the LLM API.", "type": "string" }, + "region": { + "title": "Region", + "description": "The region where the model is hosted", + "type": "string" + }, + "profile": { + "title": "Profile", + "description": "The AWS security profile to use", + "type": "string" + }, + "modelArn": { + "title": "Profile", + "description": "The AWS arn for the imported model", + "type": "string" + }, "contextLength": { "title": "Context Length", "description": "The maximum context length of the LLM in tokens, as counted by countTokens.", @@ -409,6 +424,25 @@ ] } }, + { + "if": { + "properties": { + "provider": { + "enum": [ + "bedrockimport" + ] + } + }, + "required": [ + "provider" + ] + }, + "then": { + "required": [ + "modelArn" + ] + } + }, { "if": { "properties": { @@ -2257,7 +2291,8 @@ "cohere", "free-trial", "gemini", - "voyage" + "voyage", + "bedrock" ] }, "model": { @@ -2280,6 +2315,16 @@ "type": "integer", "minimum": 128, "exclusiveMaximum": 2147483647 + }, + "region": { + "title": "Region", + "description": "The region where the model is hosted", + "type": "string" + }, + "profile": { + "title": "Profile", + "description": "The AWS security profile to use", + "type": "string" } }, "required": [