diff options
Diffstat (limited to 'extension/react-app/src/components')
5 files changed, 3 insertions, 172 deletions
diff --git a/extension/react-app/src/components/Layout.tsx b/extension/react-app/src/components/Layout.tsx index db31c8db..9a2dd2b8 100644 --- a/extension/react-app/src/components/Layout.tsx +++ b/extension/react-app/src/components/Layout.tsx @@ -211,15 +211,6 @@ const Layout = () => { /> )} <ModelSelect /> - {defaultModel?.class_name === "OpenAIFreeTrial" && - defaultModel?.api_key === "" && - (location.pathname === "/settings" || - parseInt(localStorage.getItem("ftc") || "0") >= 125) && ( - <ProgressBar - completed={parseInt(localStorage.getItem("ftc") || "0")} - total={250} - /> - )} </div> <HeaderButtonWithText text="Help" diff --git a/extension/react-app/src/components/ModelSelect.tsx b/extension/react-app/src/components/ModelSelect.tsx index cd27067f..faa64f69 100644 --- a/extension/react-app/src/components/ModelSelect.tsx +++ b/extension/react-app/src/components/ModelSelect.tsx @@ -16,22 +16,6 @@ import { useNavigate } from "react-router-dom"; const MODEL_INFO: { title: string; class: string; args: any }[] = [ { - title: "OpenAI", - class: "OpenAI", - args: { - model: "gpt-4", - api_key: "", - }, - }, - { - title: "Anthropic", - class: "AnthropicLLM", - args: { - model: "claude-2", - api_key: "<ANTHROPIC_API_KEY>", - }, - }, - { title: "Ollama", class: "Ollama", args: { @@ -39,64 +23,10 @@ const MODEL_INFO: { title: string; class: string; args: any }[] = [ }, }, { - title: "TogetherAI", - class: "TogetherLLM", - args: { - model: "togethercomputer/CodeLlama-13b-Instruct", - api_key: "<TOGETHER_API_KEY>", - }, - }, - { - title: "Replicate", - class: "ReplicateLLM", - args: { - model: - "replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781", - api_key: "<REPLICATE_API_KEY>", - }, - }, - { title: "llama.cpp", class: "LlamaCpp", args: {}, - }, - { - title: "HuggingFace Inference API", - class: "HuggingFaceInferenceAPI", - args: { - endpoint_url: "<INFERENCE_API_ENDPOINT_URL>", - hf_token: "<HUGGING_FACE_TOKEN>", - }, - }, - { - title: "Google PaLM API", - class: "GooglePaLMAPI", - args: { - model: "chat-bison-001", - api_key: "<MAKERSUITE_API_KEY>", - }, - }, - { - title: "LM Studio", - class: "GGML", - args: { - server_url: "http://localhost:1234", - }, - }, - { - title: "Other OpenAI-compatible API", - class: "GGML", - args: { - server_url: "<SERVER_URL>", - }, - }, - { - title: "GPT-4 limited free trial", - class: "OpenAIFreeTrial", - args: { - model: "gpt-4", - }, - }, + } ]; const GridDiv = styled.div` @@ -196,7 +126,7 @@ function ModelSelect(props: {}) { idx: -1, })} > - OpenAIFreeTrial - gpt-4 + Ollama </option> )} {defaultModel && ( diff --git a/extension/react-app/src/components/ModelSettings.tsx b/extension/react-app/src/components/ModelSettings.tsx index 3f9414b1..730aefdd 100644 --- a/extension/react-app/src/components/ModelSettings.tsx +++ b/extension/react-app/src/components/ModelSettings.tsx @@ -24,21 +24,9 @@ type ModelOption = "api_key" | "model" | "context_length"; const DefaultModelOptions: { [key: string]: { [key in ModelOption]?: string }; } = { - OpenAI: { - api_key: "", - model: "gpt-4", - }, - OpenAIFreeTrial: { - api_key: "", - model: "gpt-4", - }, - Anthropic: { - api_key: "", - model: "claude-2", - }, default: { api_key: "", - model: "gpt-4", + model: "codellama", }, }; diff --git a/extension/react-app/src/components/ProgressBar.tsx b/extension/react-app/src/components/ProgressBar.tsx index 27972ffc..4ca0469f 100644 --- a/extension/react-app/src/components/ProgressBar.tsx +++ b/extension/react-app/src/components/ProgressBar.tsx @@ -68,11 +68,6 @@ const ProgressBar = ({ completed, total }: ProgressBarProps) => { </P> </GridDiv> </a> - <StyledTooltip id="usage_progress_bar" place="bottom"> - { - "Continue allows you to use our OpenAI API key for up to 250 inputs. After this, you can either use your own API key, or use a local LLM. Click the progress bar to go to the docs and learn more." - } - </StyledTooltip> </> ); }; diff --git a/extension/react-app/src/components/dialogs/FTCDialog.tsx b/extension/react-app/src/components/dialogs/FTCDialog.tsx deleted file mode 100644 index 5fa2d4e6..00000000 --- a/extension/react-app/src/components/dialogs/FTCDialog.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import React, { useContext } from "react"; -import styled from "styled-components"; -import { Button, Input } from ".."; -import { useNavigate } from "react-router-dom"; -import { GUIClientContext } from "../../App"; -import { useDispatch } from "react-redux"; -import { setShowDialog } from "../../redux/slices/uiStateSlice"; - -const GridDiv = styled.div` - display: grid; - grid-template-columns: 1fr 1fr; - grid-gap: 8px; - align-items: center; -`; - -function FTCDialog() { - const navigate = useNavigate(); - const [apiKey, setApiKey] = React.useState(""); - const client = useContext(GUIClientContext); - const dispatch = useDispatch(); - - return ( - <div className="p-4"> - <h3>Free Trial Limit Reached</h3> - <p> - You've reached the free trial limit of 250 free inputs with Continue's - OpenAI API key. 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://continue.dev/docs/customization/models" - target="_blank" - > - documentation - </a> - . If you're just looking for fastest way to keep going, type '/config' - to open your Continue config file and paste your API key into the - OpenAIFreeTrial object. - </p> - - <Input - type="text" - placeholder="Enter your OpenAI API key" - value={apiKey} - onChange={(e) => setApiKey(e.target.value)} - /> - <GridDiv> - <Button - onClick={() => { - dispatch(setShowDialog(false)); - navigate("/models"); - }} - > - Select model - </Button> - <Button - disabled={!apiKey} - onClick={() => { - client?.addModelForRole("*", "OpenAI", { - model: "gpt-4", - api_key: apiKey, - title: "GPT-4", - }); - dispatch(setShowDialog(false)); - }} - > - Use my API key - </Button> - </GridDiv> - </div> - ); -} - -export default FTCDialog; |