Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added plugin repositories to add-plugin menu #3638

Merged
merged 1 commit into from Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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">
Copy link

@digi604 digi604 Aug 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you have a url for installing plugins you could use getitAI's callback mechanism: https://www.getit.ai/gpt-plugins/chat-integration

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have this yet but sounds like a good idea .. could you maybe create a new issue for this?

GetIt.ai
</Button>
</Flex>
</Box>
</ModalBody>
<ModalFooter>
<Button colorScheme="blue" onClick={handlePluginSave} isLoading={loading}>
Expand Down