Feature: add link to openai account usage (#319)
* 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
This commit is contained in:
parent
22bcaef805
commit
c1b7b0e070
|
@ -1,5 +1,6 @@
|
||||||
import { OpenAIModel, OpenAIModelID } from '@/types/openai';
|
import { OpenAIModel, OpenAIModelID } from '@/types/openai';
|
||||||
import { useTranslation } from 'next-i18next';
|
import { useTranslation } from 'next-i18next';
|
||||||
|
import { IconExternalLink } from '@tabler/icons-react';
|
||||||
import { FC } from 'react';
|
import { FC } from 'react';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
@ -48,6 +49,12 @@ export const ModelSelect: FC<Props> = ({
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue