Skip to content

Commit

Permalink
Feature: add link to openai account usage (mckaywrigley#319)
Browse files Browse the repository at this point in the history
* Update ModelSelect.tsx to include link to account usage

It would be helpful to be able to click a link to see the account usage and billing, and the model selection is related to the pricing.

* updated styling and added icon for external link

* fixed missing import
  • Loading branch information
rudolfolah authored Mar 31, 2023
1 parent 22bcaef commit c1b7b0e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/Chat/ModelSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { OpenAIModel, OpenAIModelID } from '@/types/openai';
import { useTranslation } from 'next-i18next';
import { IconExternalLink } from '@tabler/icons-react';
import { FC } from 'react';

interface Props {
Expand Down Expand Up @@ -48,6 +49,12 @@ export const ModelSelect: FC<Props> = ({
))}
</select>
</div>
<div className="w-full mt-3 text-left text-neutral-700 dark:text-neutral-400 flex items-center">
<a href="https://platform.openai.com/account/usage" target="_blank" className="flex items-center">
<IconExternalLink size={18} className={"inline mr-1"} />
{t('View Account Usage')}
</a>
</div>
</div>
);
};

0 comments on commit c1b7b0e

Please sign in to comment.