summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2023-10-18 23:27:15 -0700
committerTuowen Zhao <ztuowen@gmail.com>2023-10-18 23:30:20 -0700
commit08f38574fa2633bbf709d24e1c79417d4285ba61 (patch)
tree6a60ee3f013295b56d6d2c1c67f46761054023b1
parent9168219b829aab55fefcb114937d3fc196548cde (diff)
downloadsncontinue-08f38574fa2633bbf709d24e1c79417d4285ba61.tar.gz
sncontinue-08f38574fa2633bbf709d24e1c79417d4285ba61.tar.bz2
sncontinue-08f38574fa2633bbf709d24e1c79417d4285ba61.zip
cleanup ui
-rw-r--r--extension/react-app/public/logos/anthropic.pngbin13331 -> 0 bytes
-rw-r--r--extension/react-app/public/logos/google-palm.pngbin2608 -> 0 bytes
-rw-r--r--extension/react-app/public/logos/hf.pngbin185450 -> 0 bytes
-rw-r--r--extension/react-app/public/logos/lmstudio.pngbin108401 -> 0 bytes
-rw-r--r--extension/react-app/public/logos/openai.svg2
-rw-r--r--extension/react-app/public/logos/replicate.pngbin6143 -> 0 bytes
-rw-r--r--extension/react-app/public/logos/together.pngbin49102 -> 0 bytes
-rw-r--r--extension/react-app/src/components/Layout.tsx9
-rw-r--r--extension/react-app/src/components/ModelSelect.tsx74
-rw-r--r--extension/react-app/src/components/ModelSettings.tsx14
-rw-r--r--extension/react-app/src/components/ProgressBar.tsx5
-rw-r--r--extension/react-app/src/components/dialogs/FTCDialog.tsx73
-rw-r--r--extension/react-app/src/hooks/CustomPostHogProvider.tsx29
-rw-r--r--extension/react-app/src/pages/gui.tsx21
-rw-r--r--extension/react-app/src/util/modelData.ts336
15 files changed, 6 insertions, 557 deletions
diff --git a/extension/react-app/public/logos/anthropic.png b/extension/react-app/public/logos/anthropic.png
deleted file mode 100644
index 9adf1b71..00000000
--- a/extension/react-app/public/logos/anthropic.png
+++ /dev/null
Binary files differ
diff --git a/extension/react-app/public/logos/google-palm.png b/extension/react-app/public/logos/google-palm.png
deleted file mode 100644
index 0f9dc345..00000000
--- a/extension/react-app/public/logos/google-palm.png
+++ /dev/null
Binary files differ
diff --git a/extension/react-app/public/logos/hf.png b/extension/react-app/public/logos/hf.png
deleted file mode 100644
index 49e2841d..00000000
--- a/extension/react-app/public/logos/hf.png
+++ /dev/null
Binary files differ
diff --git a/extension/react-app/public/logos/lmstudio.png b/extension/react-app/public/logos/lmstudio.png
deleted file mode 100644
index b2b73591..00000000
--- a/extension/react-app/public/logos/lmstudio.png
+++ /dev/null
Binary files differ
diff --git a/extension/react-app/public/logos/openai.svg b/extension/react-app/public/logos/openai.svg
deleted file mode 100644
index 9aacd2a1..00000000
--- a/extension/react-app/public/logos/openai.svg
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
-<svg fill="#fff" width="800px" height="800px" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg"><title>OpenAI icon</title><path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/></svg> \ No newline at end of file
diff --git a/extension/react-app/public/logos/replicate.png b/extension/react-app/public/logos/replicate.png
deleted file mode 100644
index f71504f5..00000000
--- a/extension/react-app/public/logos/replicate.png
+++ /dev/null
Binary files differ
diff --git a/extension/react-app/public/logos/together.png b/extension/react-app/public/logos/together.png
deleted file mode 100644
index 21295358..00000000
--- a/extension/react-app/public/logos/together.png
+++ /dev/null
Binary files differ
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;
diff --git a/extension/react-app/src/hooks/CustomPostHogProvider.tsx b/extension/react-app/src/hooks/CustomPostHogProvider.tsx
index cc6de4a2..208297d4 100644
--- a/extension/react-app/src/hooks/CustomPostHogProvider.tsx
+++ b/extension/react-app/src/hooks/CustomPostHogProvider.tsx
@@ -1,32 +1,7 @@
-import posthog from "posthog-js";
-import { PostHogProvider } from "posthog-js/react";
-import { PropsWithChildren, useEffect } from "react";
-import { RootStore } from "../redux/store";
-import { useSelector } from "react-redux";
-import React from "react";
+import { PropsWithChildren } from "react";
const CustomPostHogProvider = ({ children }: PropsWithChildren) => {
- const allowAnonymousTelemetry = useSelector(
- (store: RootStore) => store?.serverState?.config?.allow_anonymous_telemetry
- );
-
- const [client, setClient] = React.useState<any>(undefined);
-
- useEffect(() => {
- if (allowAnonymousTelemetry) {
- posthog.init("phc_JS6XFROuNbhJtVCEdTSYk6gl5ArRrTNMpCcguAXlSPs", {
- api_host: "https://app.posthog.com",
- disable_session_recording: true,
- });
- setClient(client);
- } else {
- setClient(undefined);
- }
- }, [allowAnonymousTelemetry]);
-
- return allowAnonymousTelemetry ? (
- <PostHogProvider client={client}>{children}</PostHogProvider>
- ) : (
+ return (
<>{children}</>
);
};
diff --git a/extension/react-app/src/pages/gui.tsx b/extension/react-app/src/pages/gui.tsx
index 637896c6..de0c8ce9 100644
--- a/extension/react-app/src/pages/gui.tsx
+++ b/extension/react-app/src/pages/gui.tsx
@@ -41,7 +41,6 @@ import {
FolderIcon,
PlusIcon,
} from "@heroicons/react/24/outline";
-import FTCDialog from "../components/dialogs/FTCDialog";
import HeaderButtonWithText from "../components/HeaderButtonWithText";
import { useNavigate } from "react-router-dom";
import SuggestionsArea from "../components/Suggestions";
@@ -291,26 +290,6 @@ function GUI(props: GUIProps) {
return;
}
- if (
- defaultModel?.class_name === "OpenAIFreeTrial" &&
- defaultModel?.api_key === "" &&
- (!input.startsWith("/") || input.startsWith("/edit"))
- ) {
- const ftc = localStorage.getItem("ftc");
- if (ftc) {
- const u = parseInt(ftc);
- localStorage.setItem("ftc", (u + 1).toString());
-
- if (u >= 250) {
- dispatch(setShowDialog(true));
- dispatch(setDialogMessage(<FTCDialog />));
- return;
- }
- } else {
- localStorage.setItem("ftc", "1");
- }
- }
-
setWaitingForSteps(true);
if (
diff --git a/extension/react-app/src/util/modelData.ts b/extension/react-app/src/util/modelData.ts
index 035e4af2..bbb31d00 100644
--- a/extension/react-app/src/util/modelData.ts
+++ b/extension/react-app/src/util/modelData.ts
@@ -339,98 +339,7 @@ const osModels = [
codeup,
];
-const gpt4: ModelPackage = {
- title: "GPT-4",
- description: "The latest model from OpenAI",
- params: {
- model: "gpt-4",
- context_length: 8096,
- api_key: "",
- title: "GPT-4",
- },
-};
-
-const gpt35turbo: ModelPackage = {
- title: "GPT-3.5-Turbo",
- description:
- "A faster, cheaper OpenAI model with slightly lower capabilities",
- params: {
- model: "gpt-3.5-turbo",
- context_length: 8096,
- title: "GPT-3.5-Turbo",
- api_key: "",
- },
-};
-
-const OLLAMA_TO_REPLICATE_MODEL_NAMES: { [key: string]: string } = {
- "codellama:7b-instruct":
- "meta/codellama-7b-instruct:6527b83e01e41412db37de5110a8670e3701ee95872697481a355e05ce12af0e",
- "codellama:13b-instruct":
- "meta/codellama-13b-instruct:1f01a52ff933873dff339d5fb5e1fd6f24f77456836f514fa05e91c1a42699c7",
- "codellama:34b-instruct":
- "meta/codellama-34b-instruct:8281a5c610f6e88237ff3ddaf3c33b56f60809e2bdd19fbec2fda742aa18167e",
- "llama2:7b-chat":
- "meta/llama-2-7b-chat:8e6975e5ed6174911a6ff3d60540dfd4844201974602551e10e9e87ab143d81e",
- "llama2:13b-chat":
- "meta/llama-2-13b-chat:f4e2de70d66816a838a89eeeb621910adffb0dd0baba3976c96980970978018d",
-};
-
-function replicateConvertModelName(model: string): string {
- return OLLAMA_TO_REPLICATE_MODEL_NAMES[model] || model;
-}
-
export const MODEL_INFO: { [key: string]: ModelInfo } = {
- openai: {
- title: "OpenAI",
- class: "OpenAI",
- description: "Use gpt-4, gpt-3.5-turbo, or any other OpenAI model",
- longDescription:
- "Use gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.",
- icon: "openai.svg",
- tags: [ModelProviderTag["Requires API Key"]],
- packages: [gpt4, gpt35turbo],
- collectInputFor: [
- {
- inputType: CollectInputType.text,
- key: "api_key",
- label: "API Key",
- placeholder: "Enter your OpenAI API key",
- required: true,
- },
- ...completionParamsInputs,
- ],
- },
- anthropic: {
- title: "Anthropic",
- class: "AnthropicLLM",
- description:
- "Claude-2 is a highly capable model with a 100k context length",
- icon: "anthropic.png",
- tags: [ModelProviderTag["Requires API Key"]],
- longDescription:
- "To get started with Anthropic models, you first need to sign up for the open beta [here](https://claude.ai/login) to obtain an API key.",
- collectInputFor: [
- {
- inputType: CollectInputType.text,
- key: "api_key",
- label: "API Key",
- placeholder: "Enter your Anthropic API key",
- required: true,
- },
- ...completionParamsInputs,
- ],
- packages: [
- {
- title: "Claude-2",
- description: "A highly capable model with a 100k context length",
- params: {
- model: "claude-2",
- context_length: 100000,
- title: "Claude-2",
- },
- },
- ],
- },
ollama: {
title: "Ollama",
class: "Ollama",
@@ -443,167 +352,6 @@ export const MODEL_INFO: { [key: string]: ModelInfo } = {
packages: osModels,
collectInputFor: [...completionParamsInputs],
},
- together: {
- title: "TogetherAI",
- class: "TogetherLLM",
- description:
- "Use the TogetherAI API for extremely fast streaming of open-source models",
- icon: "together.png",
- longDescription: `Together is a hosted service that provides extremely fast streaming of open-source language models. To get started with Together:\n1. Obtain an API key from [here](https://together.ai)\n2. Paste below\n3. Select a model preset`,
- tags: [
- ModelProviderTag["Requires API Key"],
- ModelProviderTag["Open-Source"],
- ],
- params: {
- api_key: "",
- },
- collectInputFor: [
- {
- inputType: CollectInputType.text,
- key: "api_key",
- label: "API Key",
- placeholder: "Enter your TogetherAI API key",
- required: true,
- },
- ...completionParamsInputs,
- ],
- packages: [
- updatedObj(llama2Chat, {
- "dimensions[0].options": (options: any) =>
- _.mapValues(options, (option) => {
- return _.assign({}, option, {
- model:
- "togethercomputer/" +
- option.model.replace("llama2", "llama-2").replace(":", "-"),
- });
- }),
- }),
- updatedObj(codeLlamaInstruct, {
- "dimensions[0].options": (options: any) =>
- _.mapValues(options, (option) => {
- return _.assign({}, option, {
- model:
- "togethercomputer/" +
- option.model
- .replace("codellama", "CodeLlama")
- .replace(":", "-")
- .replace("instruct", "Instruct"),
- });
- }),
- }),
- updatedObj(wizardCoder, {
- "params.model": "WizardLM/WizardCoder-15B-V1.0",
- "params.title": "WizardCoder-15b",
- "dimensions[0].options": {
- "15b": {
- model: "WizardLM/WizardCoder-15B-V1.0",
- title: "WizardCoder-15b",
- },
- "34b (Python)": {
- model: "WizardLM/WizardCoder-Python-34B-V1.0",
- title: "WizardCoder-34b-Python",
- },
- },
- }),
- updatedObj(phindCodeLlama, {
- "params.model": "Phind/Phind-CodeLlama-34B-Python-v1",
- }),
- updatedObj(mistral, {
- "params.model": "mistralai/Mistral-7B-Instruct-v0.1",
- }),
- ].map((p) => {
- p.params.context_length = 4096;
- return p;
- }),
- },
- lmstudio: {
- title: "LM Studio",
- class: "GGML",
- description:
- "One of the fastest ways to get started with local models on Mac or Windows",
- longDescription:
- "LMStudio provides a professional and well-designed GUI for exploring, configuring, and serving LLMs. It is available on both Mac and Windows. To get started:\n1. Download from [lmstudio.ai](https://lmstudio.ai/) and open the application\n2. Search for and download the desired model from the home screen of LMStudio.\n3. In the left-bar, click the '<->' icon to open the Local Inference Server and press 'Start Server'.\n4. Once your model is loaded and the server has started, you can begin using Continue.",
- icon: "lmstudio.png",
- tags: [ModelProviderTag["Local"], ModelProviderTag["Open-Source"]],
- params: {
- server_url: "http://localhost:1234",
- },
- packages: osModels,
- collectInputFor: [...completionParamsInputs],
- },
- replicate: {
- title: "Replicate",
- class: "ReplicateLLM",
- description: "Use the Replicate API to run open-source models",
- longDescription: `Replicate is a hosted service that makes it easy to run ML models. To get started with Replicate:\n1. Obtain an API key from [here](https://replicate.com)\n2. Paste below\n3. Select a model preset`,
- params: {
- api_key: "",
- },
- collectInputFor: [
- {
- inputType: CollectInputType.text,
- key: "api_key",
- label: "API Key",
- placeholder: "Enter your Replicate API key",
- required: true,
- },
- ...completionParamsInputs,
- ],
- icon: "replicate.png",
- tags: [
- ModelProviderTag["Requires API Key"],
- ModelProviderTag["Open-Source"],
- ],
- packages: [
- ...[codeLlamaInstruct, llama2Chat]
- .map((p: ModelPackage) => {
- if (p.title === "Llama2 Chat") {
- return updatedObj(p, {
- "dimensions[0].options.34b": undefined,
- "dimensions[0].options.70b": {
- model:
- "meta/llama-2-70b-chat:02e509c789964a7ea8736978a43525956ef40397be9033abf9fd2badfe68c9e3",
- title: "Llama2-70b-Chat",
- },
- });
- }
- return p;
- })
- .map((p) => {
- return updatedObj(p, {
- "params.model": (model: string) => {
- return replicateConvertModelName(model);
- },
- "dimensions[0].options": (options: any) => {
- const newOptions: any = {};
- for (const key in options) {
- newOptions[key] = {
- ...options[key],
- model: replicateConvertModelName(options[key]?.model),
- };
- }
- return newOptions;
- },
- });
- }),
- updatedObj(wizardCoder, {
- title: "WizardCoder (15b)",
- "params.model":
- "andreasjansson/wizardcoder-python-34b-v1-gguf:67eed332a5389263b8ede41be3ee7dc119fa984e2bde287814c4abed19a45e54",
- dimensions: undefined,
- }),
- updatedObj(sqlCoder, {
- dimensions: undefined,
- title: "SQLCoder (15b)",
- "params.model":
- "gregwdata/defog-sqlcoder-q8:0a9abc0d143072fd5d8920ad90b8fbaafaf16b10ffdad24bd897b5bffacfce0b",
- }),
- updatedObj(mistral, {
- "params.model":
- "a16z-infra/mistral-7b-instruct-v0.1:83b6a56e7c828e667f21fd596c338fd4f0039b46bcfa18d973e8e70e455fda70",
- }),
- ],
- },
llamacpp: {
title: "llama.cpp",
class: "LlamaCpp",
@@ -624,87 +372,5 @@ After it's up and running, you can start using Continue.`,
tags: [ModelProviderTag.Local, ModelProviderTag["Open-Source"]],
packages: osModels,
collectInputFor: [...completionParamsInputs],
- },
- palm: {
- title: "Google PaLM API",
- class: "GooglePaLMAPI",
- description:
- "Try out the Google PaLM API, which is currently in public preview, using an API key from Google Makersuite",
- longDescription: `To get started with Google Makersuite, obtain your API key from [here](https://developers.generativeai.google/products/makersuite) and paste it below.
-> Note: Google's PaLM language models do not support streaming, so the response will appear all at once after a few seconds.`,
- icon: "google-palm.png",
- tags: [ModelProviderTag["Requires API Key"]],
- collectInputFor: [
- {
- inputType: CollectInputType.text,
- key: "api_key",
- label: "API Key",
- placeholder: "Enter your MakerSpace API key",
- required: true,
- },
- ],
- packages: [
- {
- title: "chat-bison-001",
- description:
- "Google PaLM's chat-bison-001 model, fine-tuned for chatting about code",
- params: {
- model: "chat-bison-001",
- context_length: 8000,
- },
- },
- ],
- },
- hftgi: {
- title: "HuggingFace TGI",
- class: "HuggingFaceTGI",
- description:
- "HuggingFace Text Generation Inference is an advanced, highly-performant option for serving open-source models to multiple people",
- longDescription:
- "HuggingFace Text Generation Inference is an advanced, highly-performant option for serving open-source models to multiple people. To get started, follow the [Quick Tour](https://huggingface.co/docs/text-generation-inference/quicktour) on their website to set up the Docker container. Make sure to enter the server URL below that corresponds to the host and port you set up for the Docker container.",
- icon: "hf.png",
- tags: [ModelProviderTag.Local, ModelProviderTag["Open-Source"]],
- packages: osModels,
- collectInputFor: [
- ...completionParamsInputs,
- { ...serverUrlInput, defaultValue: "http://localhost:8080" },
- ],
- },
- ggml: {
- title: "Other OpenAI-compatible API",
- class: "GGML",
- description:
- "If you are using any other OpenAI-compatible API, for example text-gen-webui, FastChat, LocalAI, or llama-cpp-python, you can simply enter your server URL",
- longDescription: `If you are using any other OpenAI-compatible API, you can simply enter your server URL. If you still need to set up your model server, you can follow a guide below:
-
-- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation)
-- [LocalAI](https://localai.io/basics/getting_started/)
-- [llama-cpp-python](https://github.com/continuedev/ggml-server-example)
-- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md)`,
- params: {
- server_url: "",
- },
- collectInputFor: [
- {
- ...serverUrlInput,
- defaultValue: "http://localhost:8000",
- },
- ...completionParamsInputs,
- ],
- icon: "openai.svg",
- tags: [ModelProviderTag.Local, ModelProviderTag["Open-Source"]],
- packages: osModels,
- },
- freetrial: {
- title: "GPT-4 limited free trial",
- class: "OpenAIFreeTrial",
- description:
- "New users can try out Continue for free using a proxy server that securely makes calls to OpenAI 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 `api_key=""` or select another model provider.',
- icon: "openai.svg",
- tags: [ModelProviderTag.Free],
- packages: [gpt4, gpt35turbo],
- collectInputFor: [...completionParamsInputs],
- },
+ }
};