Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sestinj committed May 22, 2024
2 parents 9aeb425 + a50b37c commit 6b91fe5
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 48 deletions.
27 changes: 7 additions & 20 deletions core/config/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
export const defaultConfig: SerializedContinueConfig = {
models: [
{
title: "GPT-4-Turbo (Free Trial)",
title: "GPT-4o (Free Trial)",
provider: "free-trial",
model: "gpt-4-turbo",
model: "gpt-4o",
systemMessage:
"You are an expert software developer. You give helpful and concise responses.",
},
Expand All @@ -19,13 +19,6 @@ export const defaultConfig: SerializedContinueConfig = {
systemMessage:
"You are an expert software developer. You give helpful and concise responses. Whenever you write a code block you include the language after the opening ticks.",
},
{
title: "GPT-4o (Free Trial)",
provider: "free-trial",
model: "gpt-4o",
systemMessage:
"You are an expert software developer. You give helpful and concise responses.",
},
{
title: "Claude 3 Sonnet (Free Trial)",
provider: "free-trial",
Expand All @@ -50,9 +43,9 @@ export const defaultConfig: SerializedContinueConfig = {
export const defaultConfigJetBrains: SerializedContinueConfig = {
models: [
{
title: "GPT-4-Turbo (Free Trial)",
title: "GPT-4o (Free Trial)",
provider: "free-trial",
model: "gpt-4-turbo",
model: "gpt-4o",
systemMessage:
"You are an expert software developer. You give helpful and concise responses.",
},
Expand All @@ -63,13 +56,6 @@ export const defaultConfigJetBrains: SerializedContinueConfig = {
systemMessage:
"You are an expert software developer. You give helpful and concise responses. Whenever you write a code block you include the language after the opening ticks.",
},
{
title: "GPT-4o (Free Trial)",
provider: "free-trial",
model: "gpt-4o",
systemMessage:
"You are an expert software developer. You give helpful and concise responses.",
},
{
title: "Claude 3 Sonnet (Free Trial)",
provider: "free-trial",
Expand Down Expand Up @@ -129,13 +115,14 @@ export const defaultContextProvidersVsCode: ContextProviderWithParams[] = [
{ name: "code", params: {} },
{ name: "docs", params: {} },
{ name: "diff", params: {} },
{ name: "open", params: {} },
{ name: "terminal", params: {} },
{ name: "problems", params: {} },
{ name: "folder", params: {} },
{ name: "codebase", params: {} },
];

export const defaultContextProvidersJetBrains: ContextProviderWithParams[] = [
{ name: "open", params: {} },
{ name: "diff", params: {} },
{ name: "folder", params: {} },
{ name: "codebase", params: {} },
];
11 changes: 2 additions & 9 deletions core/config/onboarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ export function setupOptimizedMode(
...config,
models: [
{
title: "GPT-4-Turbo (Free Trial)",
title: "GPT-4o (Free Trial)",
provider: "free-trial",
model: "gpt-4-turbo",
model: "gpt-4o",
systemMessage:
"You are an expert software developer. You give helpful and concise responses.",
},
Expand All @@ -20,13 +20,6 @@ export function setupOptimizedMode(
systemMessage:
"You are an expert software developer. You give helpful and concise responses. Whenever you write a code block you include the language after the opening ticks.",
},
{
title: "GPT-4o (Free Trial)",
provider: "free-trial",
model: "gpt-4o",
systemMessage:
"You are an expert software developer. You give helpful and concise responses.",
},
{
title: "Claude 3 Sonnet (Free Trial)",
provider: "free-trial",
Expand Down
2 changes: 0 additions & 2 deletions core/llm/llms/FreeTrial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ class FreeTrial extends BaseLLM {
"llama3-70b",
"gpt-3.5-turbo",
"gpt-4o",
"gpt-4-turbo",
"gemini-1.5-pro-latest",
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-haiku-20240307",
];
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/reference/Model Providers/freetrial.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ Groq provides lightning fast inference for open-source LLMs like Llama3, up to t
{
"models": [
{
"title": "GPT-4-Turbo",
"title": "GPT-4o",
"provider": "openai",
"model": "gpt-4-turbo",
"model": "gpt-4o",
"apiKey": "YOUR_API_KEY"
}
]
Expand Down
2 changes: 0 additions & 2 deletions extensions/vscode/config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -438,14 +438,12 @@
"properties": {
"model": {
"enum": [
"gpt-4-turbo",
"gpt-4o",
"llama3-70b",
"gpt-3.5-turbo",
"phind-codellama-34b",
"gemini-pro",
"mistral-8x7b",
"claude-3-opus-20240229",
"claude-3-sonnet-20240229",
"claude-3-haiku-20240307",
"starcoder-7b",
Expand Down
2 changes: 1 addition & 1 deletion extensions/vscode/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "continue",
"icon": "media/icon.png",
"version": "0.8.29",
"version": "0.9.140",
"repository": {
"type": "git",
"url": "https://github.com/continuedev/continue"
Expand Down
2 changes: 1 addition & 1 deletion extensions/vscode/scripts/prepackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ function validateFilesPresent() {
`bin/napi-v3/${os}/${arch}/onnxruntime_binding.node`,
`bin/napi-v3/${os}/${arch}/${
os === "darwin"
? "libonnxruntime.1.17.3.dylib"
? "libonnxruntime.1.14.0.dylib"
: os === "linux"
? "libonnxruntime.so.1.14.0"
: "onnxruntime.dll"
Expand Down
7 changes: 3 additions & 4 deletions gui/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { isJetBrains, postToIde } from "../util/ide";
import { getLocalStorage } from "../util/localStorage";
import HeaderButtonWithText from "./HeaderButtonWithText";
import TextDialog from "./dialogs";
import { ftl } from "./dialogs/FTCDialog";
import IndexingProgressBar from "./loaders/IndexingProgressBar";
import ProgressBar from "./loaders/ProgressBar";
import ModelSelect from "./modelSelection/ModelSelect";
Expand Down Expand Up @@ -267,12 +268,10 @@ const Layout = () => {
)} */}
<ModelSelect />
{indexingState.status !== "indexing" && // Would take up too much space together with indexing progress
defaultModel?.provider === "free-trial" &&
(location.pathname === "/settings" ||
parseInt(localStorage.getItem("ftc") || "0") >= 10) && (
defaultModel?.provider === "free-trial" && (
<ProgressBar
completed={parseInt(localStorage.getItem("ftc") || "0")}
total={100}
total={ftl()}
/>
)}

Expand Down
14 changes: 11 additions & 3 deletions gui/src/components/dialogs/FTCDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ const GridDiv = styled.div`
align-items: center;
`;

export const ftl = () => {
const ftc = parseInt(localStorage.getItem("ftc"));
if (ftc && ftc > 52) {
return 100;
}
return 50;
};

function FTCDialog() {
const navigate = useNavigate();
const [apiKey, setApiKey] = React.useState("");
Expand All @@ -23,9 +31,9 @@ function FTCDialog() {
<div className="p-4">
<h3>Free Trial Limit Reached</h3>
<p>
You've reached the free trial limit of 100 free inputs. To keep using
Continue, you can either use your own API key, or use a local LLM. To
read more about the options, see our{" "}
You've reached the free trial limit of {ftl()} free inputs. To keep
using Continue, you can either use your own API key, or use a local LLM.
To read more about the options, see our{" "}
<a
href="https://docs.continue.dev/customization/models"
target="_blank"
Expand Down
4 changes: 2 additions & 2 deletions gui/src/pages/gui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
vscBackground,
vscForeground,
} from "../components";
import FTCDialog from "../components/dialogs/FTCDialog";
import FTCDialog, { ftl } from "../components/dialogs/FTCDialog";
import StepContainer from "../components/gui/StepContainer";
import TimelineItem from "../components/gui/TimelineItem";
import ContinueInputBox from "../components/mainInput/ContinueInputBox";
Expand Down Expand Up @@ -244,7 +244,7 @@ function GUI(props: GUIProps) {
const u = parseInt(ftc);
localStorage.setItem("ftc", (u + 1).toString());

if (u >= 100) {
if (u >= ftl()) {
dispatch(setShowDialog(true));
dispatch(setDialogMessage(<FTCDialog />));
posthog?.capture("ftc_reached");
Expand Down
3 changes: 1 addition & 2 deletions gui/src/util/modelData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ const gpt4turbo: ModelPackage = {
contextLength: 128_000,
title: "GPT-4 Turbo",
},
providerOptions: ["openai", "freetrial"],
providerOptions: ["openai"],
icon: "openai.png",
};

Expand Down Expand Up @@ -1039,7 +1039,6 @@ After it's up and running, you can start using Continue.`,
{ ...claude3Haiku, title: "Claude 3 Haiku (trial)" },
{ ...gemini15Pro, title: "Gemini 1.5 Pro (trial)" },
{ ...gpt4o, title: "GPT-4o (trial)" },
{ ...gpt4turbo, title: "GPT-4-Turbo (trial)" },
{ ...gpt35turbo, title: "GPT-3.5-Turbo (trial)" },
{
...AUTODETECT,
Expand Down

0 comments on commit 6b91fe5

Please sign in to comment.