From 08f38574fa2633bbf709d24e1c79417d4285ba61 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Wed, 18 Oct 2023 23:27:15 -0700 Subject: cleanup ui --- extension/react-app/src/components/Layout.tsx | 9 --- extension/react-app/src/components/ModelSelect.tsx | 74 +--------------------- .../react-app/src/components/ModelSettings.tsx | 14 +--- extension/react-app/src/components/ProgressBar.tsx | 5 -- .../react-app/src/components/dialogs/FTCDialog.tsx | 73 --------------------- 5 files changed, 3 insertions(+), 172 deletions(-) delete mode 100644 extension/react-app/src/components/dialogs/FTCDialog.tsx (limited to 'extension/react-app/src/components') 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 = () => { /> )} - {defaultModel?.class_name === "OpenAIFreeTrial" && - defaultModel?.api_key === "" && - (location.pathname === "/settings" || - parseInt(localStorage.getItem("ftc") || "0") >= 125) && ( - - )} ", - }, - }, { title: "Ollama", class: "Ollama", @@ -38,65 +22,11 @@ const MODEL_INFO: { title: string; class: string; args: any }[] = [ model: "codellama", }, }, - { - title: "TogetherAI", - class: "TogetherLLM", - args: { - model: "togethercomputer/CodeLlama-13b-Instruct", - api_key: "", - }, - }, - { - title: "Replicate", - class: "ReplicateLLM", - args: { - model: - "replicate/llama-2-70b-chat:58d078176e02c219e11eb4da5a02a7830a283b14cf8f94537af893ccff5ee781", - api_key: "", - }, - }, { title: "llama.cpp", class: "LlamaCpp", args: {}, - }, - { - title: "HuggingFace Inference API", - class: "HuggingFaceInferenceAPI", - args: { - endpoint_url: "", - hf_token: "", - }, - }, - { - title: "Google PaLM API", - class: "GooglePaLMAPI", - args: { - model: "chat-bison-001", - api_key: "", - }, - }, - { - title: "LM Studio", - class: "GGML", - args: { - server_url: "http://localhost:1234", - }, - }, - { - title: "Other OpenAI-compatible API", - class: "GGML", - args: { - 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 )} {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) => {

- - { - "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." - } - ); }; 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 ( -
-

Free Trial Limit Reached

-

- 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{" "} - - documentation - - . 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. -

- - setApiKey(e.target.value)} - /> - - - - -
- ); -} - -export default FTCDialog; -- cgit v1.2.3-70-g09d2