Merge branch 'preview' of https://github.com/continuedev/continue into preview

This commit is contained in:
Nate Sesti 2024-01-11 19:56:02 -08:00
commit b49342300a
32 changed files with 239 additions and 131 deletions

View 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

View file

@ -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"
}
],

View file

@ -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="",
)

View file

@ -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",

View file

@ -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"
}
],

View file

@ -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,

View file

@ -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: [
{

View file

@ -362,7 +362,7 @@ declare global {
type ModelProvider =
| "openai"
| "openai-free-trial"
| "free-trial"
| "anthropic"
| "together"
| "ollama"

View file

@ -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
View file

@ -362,7 +362,7 @@ type TemplateType =
type ModelProvider =
| "openai"
| "openai-free-trial"
| "free-trial"
| "anthropic"
| "together"
| "ollama"

View file

@ -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;

View 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;

View file

@ -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(

View file

@ -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"
}
],

View file

@ -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"
}
]

View file

@ -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='{&quot;title&quot;: &quot;Disallowed Steps&quot;, &quot;description&quot;: &quot;Steps that are not allowed to be run, and will be skipped if attempted&quot;, &quot;default&quot;: [], &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: {&quot;type&quot;: &quot;string&quot;}}' required={false} default="[]"/>
<ClassPropertyRef name='allow_anonymous_telemetry' details='{&quot;title&quot;: &quot;Allow Anonymous Telemetry&quot;, &quot;description&quot;: &quot;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.&quot;, &quot;default&quot;: true, &quot;type&quot;: &quot;boolean&quot;}' required={false} default="True"/>
<ClassPropertyRef name='models' details='{&quot;title&quot;: &quot;Models&quot;, &quot;default&quot;: [{&quot;title&quot;: &quot;GPT-4 (trial)&quot;, &quot;provider&quot;: &quot;openai-free-trial&quot;, &quot;model&quot;: &quot;gpt-4&quot;, &quot;api_key&quot;: &quot;&quot;, &quot;api_base&quot;: null, &quot;context_length&quot;: 2048, &quot;template&quot;: null, &quot;completion_options&quot;: {&quot;temperature&quot;: null, &quot;top_p&quot;: null, &quot;top_k&quot;: null, &quot;presence_penalty&quot;: null, &quot;frequency_penalty&quot;: null, &quot;stop&quot;: null, &quot;max_tokens&quot;: 1023}, &quot;system_message&quot;: null, &quot;request_options&quot;: {&quot;timeout&quot;: 300, &quot;verify_ssl&quot;: null, &quot;ca_bundle_path&quot;: null, &quot;proxy&quot;: null, &quot;headers&quot;: null}}], &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: {&quot;$ref&quot;: &quot;#/definitions/ModelDescription&quot;}}' required={false} default="[{&#x27;title&#x27;: &#x27;GPT-4 (trial)&#x27;, &#x27;provider&#x27;: &#x27;openai-free-trial&#x27;, &#x27;model&#x27;: &#x27;gpt-4&#x27;, &#x27;api_key&#x27;: &#x27;&#x27;, &#x27;api_base&#x27;: None, &#x27;context_length&#x27;: 2048, &#x27;template&#x27;: None, &#x27;completion_options&#x27;: {&#x27;temperature&#x27;: None, &#x27;top_p&#x27;: None, &#x27;top_k&#x27;: None, &#x27;presence_penalty&#x27;: None, &#x27;frequency_penalty&#x27;: None, &#x27;stop&#x27;: None, &#x27;max_tokens&#x27;: 1023}, &#x27;system_message&#x27;: None, &#x27;request_options&#x27;: {&#x27;timeout&#x27;: 300, &#x27;verify_ssl&#x27;: None, &#x27;ca_bundle_path&#x27;: None, &#x27;proxy&#x27;: None, &#x27;headers&#x27;: None}}]"/>
<ClassPropertyRef name='models' details='{&quot;title&quot;: &quot;Models&quot;, &quot;default&quot;: [{&quot;title&quot;: &quot;GPT-4 (trial)&quot;, &quot;provider&quot;: &quot;free-trial&quot;, &quot;model&quot;: &quot;gpt-4&quot;, &quot;api_key&quot;: &quot;&quot;, &quot;api_base&quot;: null, &quot;context_length&quot;: 2048, &quot;template&quot;: null, &quot;completion_options&quot;: {&quot;temperature&quot;: null, &quot;top_p&quot;: null, &quot;top_k&quot;: null, &quot;presence_penalty&quot;: null, &quot;frequency_penalty&quot;: null, &quot;stop&quot;: null, &quot;max_tokens&quot;: 1023}, &quot;system_message&quot;: null, &quot;request_options&quot;: {&quot;timeout&quot;: 300, &quot;verify_ssl&quot;: null, &quot;ca_bundle_path&quot;: null, &quot;proxy&quot;: null, &quot;headers&quot;: null}}], &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: {&quot;$ref&quot;: &quot;#/definitions/ModelDescription&quot;}}' required={false} default="[{&#x27;title&#x27;: &#x27;GPT-4 (trial)&#x27;, &#x27;provider&#x27;: &#x27;free-trial&#x27;, &#x27;model&#x27;: &#x27;gpt-4&#x27;, &#x27;api_key&#x27;: &#x27;&#x27;, &#x27;api_base&#x27;: None, &#x27;context_length&#x27;: 2048, &#x27;template&#x27;: None, &#x27;completion_options&#x27;: {&#x27;temperature&#x27;: None, &#x27;top_p&#x27;: None, &#x27;top_k&#x27;: None, &#x27;presence_penalty&#x27;: None, &#x27;frequency_penalty&#x27;: None, &#x27;stop&#x27;: None, &#x27;max_tokens&#x27;: 1023}, &#x27;system_message&#x27;: None, &#x27;request_options&#x27;: {&#x27;timeout&#x27;: 300, &#x27;verify_ssl&#x27;: None, &#x27;ca_bundle_path&#x27;: None, &#x27;proxy&#x27;: None, &#x27;headers&#x27;: None}}]"/>
<ClassPropertyRef name='model_roles' details='{&quot;title&quot;: &quot;Model Roles&quot;, &quot;description&quot;: &quot;Roles for models. Each entry should be the title of a model in the models array.&quot;, &quot;default&quot;: {&quot;default&quot;: &quot;GPT-4 (trial)&quot;, &quot;chat&quot;: null, &quot;edit&quot;: null, &quot;summarize&quot;: null}, &quot;allOf&quot;: [{&quot;$ref&quot;: &quot;#/definitions/ModelRoles&quot;}]}' required={false} default="{&#x27;default&#x27;: &#x27;GPT-4 (trial)&#x27;, &#x27;chat&#x27;: None, &#x27;edit&#x27;: None, &#x27;summarize&#x27;: None}"/>
<ClassPropertyRef name='system_message' details='{&quot;title&quot;: &quot;System Message&quot;, &quot;description&quot;: &quot;A system message that will always be followed by the LLM&quot;, &quot;type&quot;: &quot;string&quot;}' required={false} default=""/>
<ClassPropertyRef name='completion_options' details='{&quot;title&quot;: &quot;Completion Options&quot;, &quot;description&quot;: &quot;Default options for completion. These will be overriden by any options set for a specific model.&quot;, &quot;default&quot;: {&quot;temperature&quot;: null, &quot;top_p&quot;: null, &quot;top_k&quot;: null, &quot;presence_penalty&quot;: null, &quot;frequency_penalty&quot;: null, &quot;stop&quot;: null, &quot;max_tokens&quot;: 1023}, &quot;allOf&quot;: [{&quot;$ref&quot;: &quot;#/definitions/BaseCompletionOptions&quot;}]}' required={false} default="{&#x27;temperature&#x27;: None, &#x27;top_p&#x27;: None, &#x27;top_k&#x27;: None, &#x27;presence_penalty&#x27;: None, &#x27;frequency_penalty&#x27;: None, &#x27;stop&#x27;: None, &#x27;max_tokens&#x27;: 1023}"/>
@ -22,7 +20,3 @@ import ClassPropertyRef from '@site/src/components/ClassPropertyRef.tsx';
<ClassPropertyRef name='disable_summaries' details='{&quot;title&quot;: &quot;Disable Summaries&quot;, &quot;description&quot;: &quot;If set to `True`, Continue will not generate summaries for each Step. This can be useful if you want to save on compute.&quot;, &quot;default&quot;: false, &quot;type&quot;: &quot;boolean&quot;}' required={false} default="False"/>
<ClassPropertyRef name='disable_indexing' details='{&quot;title&quot;: &quot;Disable Indexing&quot;, &quot;description&quot;: &quot;If set to `True`, Continue will not index the codebase. This is mainly used for debugging purposes.&quot;, &quot;default&quot;: false, &quot;type&quot;: &quot;boolean&quot;}' required={false} default="False"/>
<ClassPropertyRef name='retrieval_settings' details='{&quot;title&quot;: &quot;Retrieval Settings&quot;, &quot;description&quot;: &quot;Settings for the retrieval system. Read more about the retrieval system in the documentation.&quot;, &quot;default&quot;: {&quot;n_retrieve&quot;: 50, &quot;n_final&quot;: 10, &quot;use_reranking&quot;: true, &quot;rerank_group_size&quot;: 5, &quot;ignore_files&quot;: [], &quot;openai_api_key&quot;: null, &quot;api_base&quot;: null, &quot;api_type&quot;: null, &quot;api_version&quot;: null, &quot;organization_id&quot;: null}, &quot;allOf&quot;: [{&quot;$ref&quot;: &quot;#/definitions/RetrievalSettings&quot;}]}' required={false} default="{&#x27;n_retrieve&#x27;: 50, &#x27;n_final&#x27;: 10, &#x27;use_reranking&#x27;: True, &#x27;rerank_group_size&#x27;: 5, &#x27;ignore_files&#x27;: [], &#x27;openai_api_key&#x27;: None, &#x27;api_base&#x27;: None, &#x27;api_type&#x27;: None, &#x27;api_version&#x27;: None, &#x27;organization_id&#x27;: None}"/>

View file

@ -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"
}
],

View file

@ -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": [

View file

@ -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

View file

@ -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

View file

@ -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": ""
}

View file

@ -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",

View file

@ -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"

View file

@ -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";
}

View file

@ -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)) {

View file

@ -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) && (

View file

@ -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");

View file

@ -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],
},

View file

@ -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"]
}
}
}
}

View file

@ -2,7 +2,7 @@
"title": "ModelProvider",
"enum": [
"openai",
"openai-free-trial",
"free-trial",
"openai-aiohttp",
"anthropic",
"together",
@ -17,4 +17,4 @@
"llamafile"
],
"type": "string"
}
}

View file

@ -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
View 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