Skip to content

Commit

Permalink
Added plugin repositories to add-plugin menu (#3638)
Browse files Browse the repository at this point in the history
For now I've added getit.ai as a repository, but we can easily add
others, they're just a link for now
  • Loading branch information
yk committed Aug 8, 2023
1 parent d7111bc commit cbb46c1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions website/public/locales/en/chat.json
Expand Up @@ -33,6 +33,7 @@
"typical_p": "Typical p: Typical sampling is an information-theoretic technique that, in addition to the probability, also considers the sequence entropy (i.e., the information content according to the probability). This means that typical sampling \"overweights\" some of the tokens with lower probability because they are deemed \"interesting,\" and underweights high probability tokens because they are deemed \"boring.\""
},
"plugin_url_placeholder": "Enter plugin URL",
"plugin_repositories": "Plugin Repositories",
"plugins": "Plugins",
"preset": "Preset",
"preset_custom": "Custom",
Expand Down
12 changes: 12 additions & 0 deletions website/src/components/Chat/PluginsChooser.tsx
Expand Up @@ -2,6 +2,7 @@ import {
Avatar,
Box,
Button,
Flex,
IconButton,
Input,
Menu,
Expand Down Expand Up @@ -32,6 +33,7 @@ import { post } from "src/lib/api";
import { OasstError } from "src/lib/oasst_api_client";
import { API_ROUTES } from "src/lib/routes";
import { ChatConfigFormData, PluginEntry } from "src/types/Chat";
import Link from "next/link";

import { JsonCard } from "../JsonCard";

Expand Down Expand Up @@ -234,6 +236,16 @@ export const PluginsChooser = ({ plugins, setPlugins }: PluginsChooserProps) =>
placeholder={t("plugin_url_placeholder")}
/>
{selectedForEditPluginIndex !== null && <JsonCard>{plugins[selectedForEditPluginIndex]}</JsonCard>}
<Box>
<Text fontSize="md" fontWeight="bold" my={2}>
{t("plugin_repositories")}
</Text>
<Flex gap={2}>
<Button as={Link} href="https://www.getit.ai/gpt-plugins" target="_blank" rel="noreferrer">
GetIt.ai
</Button>
</Flex>
</Box>
</ModalBody>
<ModalFooter>
<Button colorScheme="blue" onClick={handlePluginSave} isLoading={loading}>
Expand Down

0 comments on commit cbb46c1

Please sign in to comment.