Skip to content

Commit

Permalink
Improve short model naming
Browse files Browse the repository at this point in the history
  • Loading branch information
enricoros committed Jul 9, 2023
1 parent 1c7f700 commit c01b1da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apps/chat/components/message/ChatMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export function ChatMessage(props: { message: DMessage, isBottom: boolean, onMes

{/* Avatar */}
{showAvatars && <Stack
sx={{ alignItems: 'center', minWidth: { xs: 50, md: 64 }, textAlign: 'center' }}
sx={{ alignItems: 'center', minWidth: { xs: 50, md: 64 }, maxWidth: 80, textAlign: 'center' }}
onMouseEnter={() => setIsHovering(true)} onMouseLeave={() => setIsHovering(false)}
onClick={event => setMenuAnchor(event.currentTarget)}>

Expand All @@ -296,7 +296,7 @@ export function ChatMessage(props: { message: DMessage, isBottom: boolean, onMes
<Tooltip title={messageOriginLLM || 'unk-model'} variant='solid'>
<Typography level='body2' sx={{
fontSize: { xs: 'xs', sm: 'sm' }, fontWeight: 500,
lineBreak: 'anywhere',
overflowWrap: 'anywhere',
...(messageTyping ? { animation: `${cssRainbowColorKeyframes} 5s linear infinite` } : {}),
}}>
{prettyBaseModel(messageOriginLLM)}
Expand Down
2 changes: 2 additions & 0 deletions src/common/util/conversationToMarkdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export function prettyBaseModel(model: string | undefined): string {
if (!model) return '';
if (model.includes('gpt-4-32k')) return 'gpt-4-32k';
if (model.includes('gpt-4')) return 'gpt-4';
if (model.includes('gpt-3.5-turbo-16k')) return '3.5 Turbo 16k';
if (model.includes('gpt-3.5-turbo')) return '3.5 Turbo';
if (model.endsWith('.bin')) return model.slice(0, -4);
return model;
}

Expand Down

1 comment on commit c01b1da

@vercel
Copy link

@vercel vercel bot commented on c01b1da Jul 9, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

big-agi – ./

big-agi-enricoros.vercel.app
get.big-agi.com
big-agi-git-main-enricoros.vercel.app

Please sign in to comment.