Merge branch 'preview' of https://github.com/continuedev/continue into preview
This commit is contained in:
commit
b49342300a
32 changed files with 239 additions and 131 deletions
4
.changes/unreleased/Added-20240111-194246.yaml
Normal file
4
.changes/unreleased/Added-20240111-194246.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
project: extensions/vscode
|
||||
kind: Added
|
||||
body: Add codellama and gemini to free trial, using new server
|
||||
time: 2024-01-11T19:42:46.155127-08:00
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
"models": [
|
||||
{
|
||||
"title": "GPT-4",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-4"
|
||||
},
|
||||
{
|
||||
"title": "GPT-3.5-Turbo",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-3.5-turbo"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ class SerializedContinueConfig(BaseModel):
|
|||
default=[
|
||||
ModelDescription(
|
||||
title="GPT-4 (trial)",
|
||||
provider="openai-free-trial",
|
||||
provider="free-trial",
|
||||
model="gpt-4",
|
||||
api_key="",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ def autodetect_prompt_templates(
|
|||
|
||||
ModelProvider = Literal[
|
||||
"openai",
|
||||
"openai-free-trial",
|
||||
"free-trial",
|
||||
"openai-aiohttp",
|
||||
"anthropic",
|
||||
"together",
|
||||
|
|
@ -139,7 +139,7 @@ ModelProvider = Literal[
|
|||
|
||||
MODEL_PROVIDER_TO_MODEL_CLASS = {
|
||||
"openai": "OpenAI",
|
||||
"openai-free-trial": "OpenAIFreeTrial",
|
||||
"free-trial": "OpenAIFreeTrial",
|
||||
"openai-aiohttp": "GGML",
|
||||
"anthropic": "AnthropicLLM",
|
||||
"together": "TogetherLLM",
|
||||
|
|
@ -156,7 +156,7 @@ MODEL_PROVIDER_TO_MODEL_CLASS = {
|
|||
|
||||
MODEL_CLASS_TO_MODEL_PROVIDER: Dict[str, ModelProvider] = {
|
||||
"OpenAI": "openai",
|
||||
"OpenAIFreeTrial": "openai-free-trial",
|
||||
"OpenAIFreeTrial": "free-trial",
|
||||
"AnthropicLLM": "anthropic",
|
||||
"TogetherLLM": "together",
|
||||
"Ollama": "ollama",
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ default_config_json = """\
|
|||
"models": [
|
||||
{
|
||||
"title": "GPT-4",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-4"
|
||||
},
|
||||
{
|
||||
"title": "GPT-3.5-Turbo",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-3.5-turbo"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ from continuedev.core.config import ContinueConfig, ModelDescription
|
|||
config = ContinueConfig(
|
||||
allow_anonymous_telemetry=False,
|
||||
models=[
|
||||
ModelDescription(model="gpt-4", title="GPT-4", provider="openai-free-trial"),
|
||||
ModelDescription(model="gpt-4", title="GPT-4", provider="free-trial"),
|
||||
ModelDescription(
|
||||
model="gpt-3.5-turbo", title="GPT-3.5 Turbo", provider="openai-free-trial"
|
||||
model="gpt-3.5-turbo", title="GPT-3.5 Turbo", provider="free-trial"
|
||||
),
|
||||
],
|
||||
system_message=None,
|
||||
|
|
|
|||
|
|
@ -4,14 +4,24 @@ const defaultConfig: SerializedContinueConfig = {
|
|||
models: [
|
||||
{
|
||||
title: "GPT-4",
|
||||
provider: "openai-free-trial",
|
||||
provider: "free-trial",
|
||||
model: "gpt-4",
|
||||
},
|
||||
{
|
||||
title: "GPT-3.5-Turbo",
|
||||
provider: "openai-free-trial",
|
||||
provider: "free-trial",
|
||||
model: "gpt-3.5-turbo",
|
||||
},
|
||||
{
|
||||
title: "Phind CodeLlama",
|
||||
provider: "free-trial",
|
||||
model: "phind-codellama-34b",
|
||||
},
|
||||
{
|
||||
title: "Gemini Pro",
|
||||
provider: "free-trial",
|
||||
model: "gemini-pro",
|
||||
},
|
||||
],
|
||||
slashCommands: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -362,7 +362,7 @@ declare global {
|
|||
|
||||
type ModelProvider =
|
||||
| "openai"
|
||||
| "openai-free-trial"
|
||||
| "free-trial"
|
||||
| "anthropic"
|
||||
| "together"
|
||||
| "ollama"
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ const PARALLEL_PROVIDERS: ModelProvider[] = [
|
|||
"huggingface-inference-api",
|
||||
"huggingface-tgi",
|
||||
"mistral",
|
||||
"openai-free-trial",
|
||||
"free-trial",
|
||||
"replicate",
|
||||
"together",
|
||||
];
|
||||
|
|
|
|||
2
core/index.d.ts
vendored
2
core/index.d.ts
vendored
|
|
@ -362,7 +362,7 @@ type TemplateType =
|
|||
|
||||
type ModelProvider =
|
||||
| "openai"
|
||||
| "openai-free-trial"
|
||||
| "free-trial"
|
||||
| "anthropic"
|
||||
| "together"
|
||||
| "ollama"
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ import { BaseLLM } from "..";
|
|||
import { ChatMessage, CompletionOptions, ModelProvider } from "../..";
|
||||
import { streamResponse } from "../stream";
|
||||
|
||||
// const SERVER_URL = "http://localhost:8080";
|
||||
const SERVER_URL = "https://proxy-server-l6vsfbzhba-uw.a.run.app";
|
||||
// const SERVER_URL = "http://localhost:3000";
|
||||
const SERVER_URL = "https://node-proxy-server-l6vsfbzhba-uw.a.run.app";
|
||||
|
||||
class FreeTrial extends BaseLLM {
|
||||
static providerName: ModelProvider = "openai-free-trial";
|
||||
static providerName: ModelProvider = "free-trial";
|
||||
|
||||
private _getHeaders() {
|
||||
return {
|
||||
|
|
@ -15,24 +15,6 @@ class FreeTrial extends BaseLLM {
|
|||
};
|
||||
}
|
||||
|
||||
protected async _complete(
|
||||
prompt: string,
|
||||
options: CompletionOptions
|
||||
): Promise<string> {
|
||||
const args = this.collectArgs(options);
|
||||
|
||||
const response = await this.fetch(`${SERVER_URL}/complete`, {
|
||||
method: "POST",
|
||||
headers: this._getHeaders(),
|
||||
body: JSON.stringify({
|
||||
messages: [{ role: "user", content: prompt }],
|
||||
...args,
|
||||
}),
|
||||
});
|
||||
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
protected async *_streamComplete(
|
||||
prompt: string,
|
||||
options: CompletionOptions
|
||||
|
|
@ -43,7 +25,7 @@ class FreeTrial extends BaseLLM {
|
|||
method: "POST",
|
||||
headers: this._getHeaders(),
|
||||
body: JSON.stringify({
|
||||
messages: [{ role: "user", content: prompt }],
|
||||
prompt,
|
||||
...args,
|
||||
}),
|
||||
});
|
||||
|
|
@ -68,31 +50,13 @@ class FreeTrial extends BaseLLM {
|
|||
}),
|
||||
});
|
||||
|
||||
for await (const value of streamResponse(response)) {
|
||||
const chunks = value.split("\n");
|
||||
|
||||
for (const chunk of chunks) {
|
||||
if (chunk.trim() !== "") {
|
||||
const loadedChunk = JSON.parse(chunk);
|
||||
|
||||
yield {
|
||||
role: "assistant",
|
||||
content: loadedChunk.content || "",
|
||||
};
|
||||
|
||||
// if (this.model === "gpt-4") {
|
||||
// await delay(0.03);
|
||||
// } else {
|
||||
// await delay(0.01);
|
||||
// }
|
||||
}
|
||||
}
|
||||
for await (const chunk of streamResponse(response)) {
|
||||
yield {
|
||||
role: "assistant",
|
||||
content: chunk,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function delay(seconds: number) {
|
||||
return new Promise((resolve) => setTimeout(resolve, seconds * 1000));
|
||||
}
|
||||
|
||||
export default FreeTrial;
|
||||
|
|
|
|||
98
core/llm/llms/OpenAIFreeTrial.ts
Normal file
98
core/llm/llms/OpenAIFreeTrial.ts
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
import { BaseLLM } from "..";
|
||||
import { ChatMessage, CompletionOptions, ModelProvider } from "../..";
|
||||
import { streamResponse } from "../stream";
|
||||
|
||||
// const SERVER_URL = "http://localhost:8080";
|
||||
const SERVER_URL = "https://proxy-server-l6vsfbzhba-uw.a.run.app";
|
||||
|
||||
class OpenAIFreeTrial extends BaseLLM {
|
||||
static providerName: ModelProvider = "openai-free-trial" as ModelProvider;
|
||||
|
||||
private _getHeaders() {
|
||||
return {
|
||||
uniqueId: this.uniqueId || "None",
|
||||
"Content-Type": "application/json",
|
||||
};
|
||||
}
|
||||
|
||||
protected async _complete(
|
||||
prompt: string,
|
||||
options: CompletionOptions
|
||||
): Promise<string> {
|
||||
const args = this.collectArgs(options);
|
||||
|
||||
const response = await this.fetch(`${SERVER_URL}/complete`, {
|
||||
method: "POST",
|
||||
headers: this._getHeaders(),
|
||||
body: JSON.stringify({
|
||||
messages: [{ role: "user", content: prompt }],
|
||||
...args,
|
||||
}),
|
||||
});
|
||||
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
protected async *_streamComplete(
|
||||
prompt: string,
|
||||
options: CompletionOptions
|
||||
): AsyncGenerator<string> {
|
||||
const args = this.collectArgs(options);
|
||||
|
||||
const response = await this.fetch(`${SERVER_URL}/stream_complete`, {
|
||||
method: "POST",
|
||||
headers: this._getHeaders(),
|
||||
body: JSON.stringify({
|
||||
messages: [{ role: "user", content: prompt }],
|
||||
...args,
|
||||
}),
|
||||
});
|
||||
|
||||
for await (const value of streamResponse(response)) {
|
||||
yield value;
|
||||
}
|
||||
}
|
||||
|
||||
protected async *_streamChat(
|
||||
messages: ChatMessage[],
|
||||
options: CompletionOptions
|
||||
): AsyncGenerator<ChatMessage> {
|
||||
const args = this.collectArgs(options);
|
||||
|
||||
const response = await this.fetch(`${SERVER_URL}/stream_chat`, {
|
||||
method: "POST",
|
||||
headers: this._getHeaders(),
|
||||
body: JSON.stringify({
|
||||
messages,
|
||||
...args,
|
||||
}),
|
||||
});
|
||||
|
||||
for await (const value of streamResponse(response)) {
|
||||
const chunks = value.split("\n");
|
||||
|
||||
for (const chunk of chunks) {
|
||||
if (chunk.trim() !== "") {
|
||||
const loadedChunk = JSON.parse(chunk);
|
||||
|
||||
yield {
|
||||
role: "assistant",
|
||||
content: loadedChunk.content || "",
|
||||
};
|
||||
|
||||
// if (this.model === "gpt-4") {
|
||||
// await delay(0.03);
|
||||
// } else {
|
||||
// await delay(0.01);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function delay(seconds: number) {
|
||||
return new Promise((resolve) => setTimeout(resolve, seconds * 1000));
|
||||
}
|
||||
|
||||
export default OpenAIFreeTrial;
|
||||
|
|
@ -20,6 +20,7 @@ import Llamafile from "./Llamafile";
|
|||
import Mistral from "./Mistral";
|
||||
import Ollama from "./Ollama";
|
||||
import OpenAI from "./OpenAI";
|
||||
import OpenAIFreeTrial from "./OpenAIFreeTrial";
|
||||
import Replicate from "./Replicate";
|
||||
import TextGenWebUI from "./TextGenWebUI";
|
||||
import Together from "./Together";
|
||||
|
|
@ -89,6 +90,7 @@ const LLMs = [
|
|||
Mistral,
|
||||
Bedrock,
|
||||
DeepInfra,
|
||||
OpenAIFreeTrial,
|
||||
];
|
||||
|
||||
export async function llmFromDescription(
|
||||
|
|
|
|||
|
|
@ -90,19 +90,19 @@ If you were previously using the `PromptTemplate` class in your `config.py` to w
|
|||
|
||||
After the "Full example" these examples will only show the relevant portion of the config file.
|
||||
|
||||
### Full example, with OpenAI Free Trial
|
||||
### Full example, with Free Trial Models
|
||||
|
||||
```json
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "GPT-4",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-4"
|
||||
},
|
||||
{
|
||||
"title": "GPT-3.5-Turbo",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-3.5-turbo"
|
||||
}
|
||||
],
|
||||
|
|
@ -256,7 +256,7 @@ The `completions_options` for each model will override the top-level `completion
|
|||
"models": [
|
||||
{
|
||||
"title": "GPT-4",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-4",
|
||||
"completion_options": {
|
||||
"top_p": 0.9,
|
||||
|
|
@ -266,7 +266,7 @@ The `completions_options` for each model will override the top-level `completion
|
|||
},
|
||||
{
|
||||
"title": "GPT-3.5-Turbo",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-3.5-turbo"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -14,12 +14,12 @@ In `config.json`, you'll find the `models` property, a list of the models that y
|
|||
"models": [
|
||||
{
|
||||
"title": "Smart Model",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-4"
|
||||
},
|
||||
{
|
||||
"title": "Fast Model",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-3.5-turbo"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -2,15 +2,13 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
|
||||
# Configuration Options
|
||||
|
||||
|
||||
|
||||
[View the source](https://github.com/continuedev/continue/blob/main/server/continuedev/core/config.py)
|
||||
|
||||
## Properties
|
||||
|
||||
<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", "default": [{"title": "GPT-4 (trial)", "provider": "openai-free-trial", "model": "gpt-4", "api_key": "", "api_base": null, "context_length": 2048, "template": null, "completion_options": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 1023}, "system_message": null, "request_options": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}}], "type": "array", "items": {"$ref": "#/definitions/ModelDescription"}}' required={false} default="[{'title': 'GPT-4 (trial)', 'provider': 'openai-free-trial', 'model': 'gpt-4', 'api_key': '', 'api_base': None, 'context_length': 2048, 'template': None, 'completion_options': {'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 1023}, 'system_message': None, 'request_options': {'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}}]"/>
|
||||
<ClassPropertyRef name='models' details='{"title": "Models", "default": [{"title": "GPT-4 (trial)", "provider": "free-trial", "model": "gpt-4", "api_key": "", "api_base": null, "context_length": 2048, "template": null, "completion_options": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 1023}, "system_message": null, "request_options": {"timeout": 300, "verify_ssl": null, "ca_bundle_path": null, "proxy": null, "headers": null}}], "type": "array", "items": {"$ref": "#/definitions/ModelDescription"}}' required={false} default="[{'title': 'GPT-4 (trial)', 'provider': 'free-trial', 'model': 'gpt-4', 'api_key': '', 'api_base': None, 'context_length': 2048, 'template': None, 'completion_options': {'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 1023}, 'system_message': None, 'request_options': {'timeout': 300, 'verify_ssl': None, 'ca_bundle_path': None, 'proxy': None, 'headers': None}}]"/>
|
||||
<ClassPropertyRef name='model_roles' details='{"title": "Model Roles", "description": "Roles for models. Each entry should be the title of a model in the models array.", "default": {"default": "GPT-4 (trial)", "chat": null, "edit": null, "summarize": null}, "allOf": [{"$ref": "#/definitions/ModelRoles"}]}' required={false} default="{'default': 'GPT-4 (trial)', 'chat': None, 'edit': None, 'summarize': None}"/>
|
||||
<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='completion_options' details='{"title": "Completion Options", "description": "Default options for completion. These will be overriden by any options set for a specific model.", "default": {"temperature": null, "top_p": null, "top_k": null, "presence_penalty": null, "frequency_penalty": null, "stop": null, "max_tokens": 1023}, "allOf": [{"$ref": "#/definitions/BaseCompletionOptions"}]}' required={false} default="{'temperature': None, 'top_p': None, 'top_k': None, 'presence_penalty': None, 'frequency_penalty': None, 'stop': None, 'max_tokens': 1023}"/>
|
||||
|
|
@ -22,7 +20,3 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
|
|||
<ClassPropertyRef name='disable_summaries' details='{"title": "Disable Summaries", "description": "If set to `True`, Continue will not generate summaries for each Step. This can be useful if you want to save on compute.", "default": false, "type": "boolean"}' required={false} default="False"/>
|
||||
<ClassPropertyRef name='disable_indexing' details='{"title": "Disable Indexing", "description": "If set to `True`, Continue will not index the codebase. This is mainly used for debugging purposes.", "default": false, "type": "boolean"}' required={false} default="False"/>
|
||||
<ClassPropertyRef name='retrieval_settings' details='{"title": "Retrieval Settings", "description": "Settings for the retrieval system. Read more about the retrieval system in the documentation.", "default": {"n_retrieve": 50, "n_final": 10, "use_reranking": true, "rerank_group_size": 5, "ignore_files": [], "openai_api_key": null, "api_base": null, "api_type": null, "api_version": null, "organization_id": null}, "allOf": [{"$ref": "#/definitions/RetrievalSettings"}]}' required={false} default="{'n_retrieve': 50, 'n_final': 10, 'use_reranking': True, 'rerank_group_size': 5, 'ignore_files': [], 'openai_api_key': None, 'api_base': None, 'api_type': None, 'api_version': None, 'organization_id': None}"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -90,19 +90,19 @@ If you were previously using the `PromptTemplate` class in your `config.py` to w
|
|||
|
||||
After the "Full example" these examples will only show the relevant portion of the config file.
|
||||
|
||||
### Full example, with OpenAI Free Trial
|
||||
### Full example, with Free Trial Models
|
||||
|
||||
```json
|
||||
{
|
||||
"models": [
|
||||
{
|
||||
"title": "GPT-4",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-4"
|
||||
},
|
||||
{
|
||||
"title": "GPT-3.5-Turbo",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-3.5-turbo"
|
||||
}
|
||||
],
|
||||
|
|
@ -256,7 +256,7 @@ The `completions_options` for each model will override the top-level `completion
|
|||
"models": [
|
||||
{
|
||||
"title": "GPT-4",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-4",
|
||||
"completion_options": {
|
||||
"top_p": 0.9,
|
||||
|
|
@ -266,7 +266,7 @@ The `completions_options` for each model will override the top-level `completion
|
|||
},
|
||||
{
|
||||
"title": "GPT-3.5-Turbo",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-3.5-turbo"
|
||||
}
|
||||
],
|
||||
|
|
|
|||
|
|
@ -9,13 +9,23 @@ const val DEFAULT_CONFIG = """
|
|||
"models": [
|
||||
{
|
||||
"title": "GPT-4",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-4"
|
||||
},
|
||||
{
|
||||
"title": "GPT-3.5-Turbo",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-3.5-turbo"
|
||||
},
|
||||
{
|
||||
"title": "Phind CodeLlama",
|
||||
"provider": "free-trial",
|
||||
"model": "phind-codellama-34b"
|
||||
},
|
||||
{
|
||||
"title": "Gemini Pro",
|
||||
"provider": "free-trial",
|
||||
"model": "gemini-pro"
|
||||
}
|
||||
],
|
||||
"slashCommands": [
|
||||
|
|
|
|||
|
|
@ -309,6 +309,11 @@ class IdeProtocolClient (
|
|||
}
|
||||
}
|
||||
|
||||
migrate("renameFreeTrialProvider") {
|
||||
config = config.replace("openai-free-trial", "free-trial");
|
||||
File(configPath).writeText(config)
|
||||
}
|
||||
|
||||
val mapType = object : TypeToken<Map<String, Any>>() {}.type
|
||||
val parsed: Map<String, Any> = Gson().fromJson(config, mapType)
|
||||
respond(parsed)
|
||||
|
|
@ -400,7 +405,7 @@ class IdeProtocolClient (
|
|||
val key = data["key"] as String
|
||||
var models = config["models"] as MutableList<MutableMap<String, Any>>
|
||||
models = models.map {
|
||||
if (it["provider"] == "openai-free-trial") {
|
||||
if (it["provider"] == "free-trial") {
|
||||
it["apiKey"] = key
|
||||
it["provider"] = "openai"
|
||||
it
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||
|
||||
|
||||
Pre-release Changes
|
||||
### Added
|
||||
* Add codellama and gemini to free trial, using new server
|
||||
|
||||
## v0.8.1 - 2024-01-08
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@
|
|||
"description": "The provider of the model. This is used to determine the type of model, and how to interact with it.",
|
||||
"enum": [
|
||||
"openai",
|
||||
"openai-free-trial",
|
||||
"free-trial",
|
||||
"anthropic",
|
||||
"together",
|
||||
"ollama",
|
||||
|
|
@ -366,7 +366,7 @@
|
|||
"if": {
|
||||
"properties": {
|
||||
"provider": {
|
||||
"enum": ["openai-free-trial"]
|
||||
"enum": ["free-trial"]
|
||||
}
|
||||
},
|
||||
"required": ["provider"]
|
||||
|
|
@ -374,7 +374,13 @@
|
|||
"then": {
|
||||
"properties": {
|
||||
"model": {
|
||||
"enum": ["gpt-3.5-turbo", "gpt-4"]
|
||||
"enum": [
|
||||
"gpt-3.5-turbo",
|
||||
"gpt-4",
|
||||
"phind-codellama-34b",
|
||||
"gemini-pro",
|
||||
"mistral-medium"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -942,7 +948,7 @@
|
|||
"default": [
|
||||
{
|
||||
"title": "GPT-4 (trial)",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-4",
|
||||
"apiKey": ""
|
||||
}
|
||||
|
|
|
|||
4
extensions/vscode/package-lock.json
generated
4
extensions/vscode/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.9.13",
|
||||
"version": "0.9.14",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.9.13",
|
||||
"version": "0.9.14",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@electron/rebuild": "^3.2.10",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"icon": "media/icon.png",
|
||||
"version": "0.9.13",
|
||||
"version": "0.9.14",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
|
|||
|
|
@ -468,7 +468,7 @@ export function getSidebarContent(
|
|||
case "addOpenAIKey": {
|
||||
const configJson = editConfigJson((config) => {
|
||||
config.models = config.models.map((m: ModelDescription) => {
|
||||
if (m.provider === "openai-free-trial") {
|
||||
if (m.provider === "free-trial") {
|
||||
m.apiKey = data.key;
|
||||
m.provider = "openai";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,6 +106,11 @@ class VsCodeIde implements IDE {
|
|||
);
|
||||
});
|
||||
|
||||
migrate("renameFreeTrialProvider", () => {
|
||||
contents = contents.replace(/openai-free-trial/g, "free-trial");
|
||||
fs.writeFileSync(configPath, contents, "utf8");
|
||||
});
|
||||
|
||||
for (const workspacePath of await this.getWorkspaceDirs()) {
|
||||
const continueRcPath = path.join(workspacePath, ".continuerc.json");
|
||||
if (fs.existsSync(continueRcPath)) {
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ const Layout = () => {
|
|||
)}
|
||||
<ModelSelect />
|
||||
{indexingProgress >= 1 && // Would take up too much space together with indexing progress
|
||||
defaultModel?.providerName === "openai-free-trial" &&
|
||||
defaultModel?.providerName === "free-trial" &&
|
||||
defaultModel?.apiKey === "" &&
|
||||
(location.pathname === "/settings" ||
|
||||
parseInt(localStorage.getItem("ftc") || "0") >= 125) && (
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ function GUI(props: GUIProps) {
|
|||
const sendInput = useCallback(
|
||||
(editorState: JSONContent) => {
|
||||
if (
|
||||
defaultModel.providerName === "openai-free-trial" &&
|
||||
defaultModel.providerName === "free-trial" &&
|
||||
defaultModel?.apiKey === ""
|
||||
) {
|
||||
const ftc = localStorage.getItem("ftc");
|
||||
|
|
|
|||
|
|
@ -268,12 +268,13 @@ const wizardCoder: ModelPackage = {
|
|||
const phindCodeLlama: ModelPackage = {
|
||||
title: "Phind CodeLlama (34b)",
|
||||
description: "A finetune of CodeLlama by Phind",
|
||||
icon: "meta.png",
|
||||
params: {
|
||||
title: "Phind CodeLlama",
|
||||
model: "phind-codellama-34b",
|
||||
contextLength: 2048,
|
||||
},
|
||||
providerOptions: ["ollama", "lmstudio", "llamacpp", "replicate"],
|
||||
providerOptions: ["ollama", "lmstudio", "llamacpp", "replicate", "freetrial"],
|
||||
};
|
||||
|
||||
const mistral: ModelPackage = {
|
||||
|
|
@ -371,7 +372,7 @@ const gemini: ModelPackage = {
|
|||
apiKey: "<API_KEY>",
|
||||
},
|
||||
icon: "gemini.png",
|
||||
providerOptions: ["palm"],
|
||||
providerOptions: ["palm", "freetrial"],
|
||||
};
|
||||
|
||||
const zephyr: ModelPackage = {
|
||||
|
|
@ -763,17 +764,19 @@ After it's up and running, you can start using Continue.`,
|
|||
packages: osModels,
|
||||
},
|
||||
freetrial: {
|
||||
title: "OpenAI limited free trial",
|
||||
provider: "openai-free-trial",
|
||||
title: "Continue limited free trial",
|
||||
provider: "free-trial",
|
||||
description:
|
||||
"New users can try out Continue for free using a proxy server that securely makes calls to OpenAI using our API key",
|
||||
"New users can try out Continue for free using a proxy server that securely makes calls to OpenAI, Google, or Together using our API key",
|
||||
longDescription:
|
||||
'New 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.py where it says `apiKey=""` or select another model provider.',
|
||||
'New users can try out Continue for free using a proxy server that securely makes calls to OpenAI, Google, or Together 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.py where it says `apiKey=""` or select another model provider.',
|
||||
icon: "openai.png",
|
||||
tags: [ModelProviderTag.Free],
|
||||
packages: [
|
||||
{ ...gpt4, title: "GPT-4 (trial)" },
|
||||
{ ...gpt35turbo, title: "GPT-3.5-Turbo (trial)" },
|
||||
{ ...phindCodeLlama, title: "Phind CodeLlama (trial)" },
|
||||
{ ...gemini, title: "Gemini Pro (trial)" },
|
||||
],
|
||||
collectInputFor: [...completionParamsInputs],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
"description": "The provider of the model. This is used to determine the type of model, and how to interact with it.",
|
||||
"enum": [
|
||||
"openai",
|
||||
"openai-free-trial",
|
||||
"free-trial",
|
||||
"openai-aiohttp",
|
||||
"anthropic",
|
||||
"together",
|
||||
|
|
@ -187,11 +187,7 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"provider",
|
||||
"model"
|
||||
]
|
||||
"required": ["title", "provider", "model"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"title": "ModelProvider",
|
||||
"enum": [
|
||||
"openai",
|
||||
"openai-free-trial",
|
||||
"free-trial",
|
||||
"openai-aiohttp",
|
||||
"anthropic",
|
||||
"together",
|
||||
|
|
@ -17,4 +17,4 @@
|
|||
"llamafile"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
"description": "The provider of the model. This is used to determine the type of model, and how to interact with it.",
|
||||
"enum": [
|
||||
"openai",
|
||||
"openai-free-trial",
|
||||
"free-trial",
|
||||
"openai-aiohttp",
|
||||
"anthropic",
|
||||
"together",
|
||||
|
|
@ -187,11 +187,7 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"title",
|
||||
"provider",
|
||||
"model"
|
||||
]
|
||||
"required": ["title", "provider", "model"]
|
||||
},
|
||||
"ModelRoles": {
|
||||
"title": "ModelRoles",
|
||||
|
|
@ -218,9 +214,7 @@
|
|||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"default"
|
||||
]
|
||||
"required": ["default"]
|
||||
},
|
||||
"SlashCommand": {
|
||||
"title": "SlashCommand",
|
||||
|
|
@ -262,11 +256,7 @@
|
|||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"description",
|
||||
"step"
|
||||
]
|
||||
"required": ["name", "description", "step"]
|
||||
},
|
||||
"CustomCommand": {
|
||||
"title": "CustomCommand",
|
||||
|
|
@ -285,11 +275,7 @@
|
|||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"prompt",
|
||||
"description"
|
||||
]
|
||||
"required": ["name", "prompt", "description"]
|
||||
},
|
||||
"ContextProviderWithParams": {
|
||||
"title": "ContextProviderWithParams",
|
||||
|
|
@ -315,9 +301,7 @@
|
|||
"type": "object"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
]
|
||||
"required": ["name"]
|
||||
},
|
||||
"RetrievalSettings": {
|
||||
"title": "RetrievalSettings",
|
||||
|
|
@ -407,7 +391,7 @@
|
|||
"default": [
|
||||
{
|
||||
"title": "GPT-4 (trial)",
|
||||
"provider": "openai-free-trial",
|
||||
"provider": "free-trial",
|
||||
"model": "gpt-4",
|
||||
"api_key": "",
|
||||
"api_base": null,
|
||||
|
|
@ -555,4 +539,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
23
server/CHANGELOG.md
Normal file
23
server/CHANGELOG.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||
|
||||
|
||||
## v0.1.104 - 2023-12-25
|
||||
|
||||
### Added
|
||||
|
||||
- Continuous and faster syncing of codebase index
|
||||
|
||||
### Removed
|
||||
|
||||
- No longer using Continue Python server
|
||||
|
||||
## v0.1.99 - 2023-11-19
|
||||
|
||||
### Changed
|
||||
|
||||
- migrated to .json config file format
|
||||
Loading…
Add table
Reference in a new issue