Skip to content

Commit

Permalink
add link to get google key
Browse files Browse the repository at this point in the history
  • Loading branch information
ghgoodreau committed Dec 15, 2023
1 parent bb01478 commit ae95384
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/modals/SettingsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export const SettingsModal = memo(function SettingsModal({
setApiKey={setGoogleApiKey}
label="Google Gemini API Key"
placeholder="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
link="https://makersuite.google.com/app/apikey"
/>

<LabeledSlider
Expand Down
4 changes: 3 additions & 1 deletion src/components/utils/APIKeyInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@ export function APIKeyInput({
setApiKey,
label,
placeholder,
link,
...others
}: {
apiKey: string | null;
setApiKey: (apiKey: string) => void;
label: string;
placeholder: string;
link?: string;
} & BoxProps) {
return (
<LabeledPasswordInputWithLink
width="80%"
label={label}
linkLabel="Get a key"
placeholder={placeholder}
link="https://platform.openai.com/account/api-keys"
link={link ?? "https://platform.openai.com/account/api-keys"}
value={apiKey ?? ""}
setValue={setApiKey}
{...others}
Expand Down

0 comments on commit ae95384

Please sign in to comment.