diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 991ef312e..09ab0a781 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -10,6 +10,7 @@ import CopyIcon from "../icons/copy.svg"; import DownloadIcon from "../icons/download.svg"; import LoadingIcon from "../icons/three-dots.svg"; import BotIcon from "../icons/bot.svg"; +import Bot4Icon from "../icons/bot-4.svg"; import AddIcon from "../icons/add.svg"; import DeleteIcon from "../icons/delete.svg"; import MaxIcon from "../icons/max.svg"; @@ -64,10 +65,20 @@ const Emoji = dynamic(async () => (await import("emoji-picker-react")).Emoji, { loading: () => , }); -export function Avatar(props: { role: Message["role"] }) { +export function Avatar(props: { + role: Message["role"]; + model: Message["model"]; +}) { const config = useChatStore((state) => state.config); if (props.role !== "user") { + if (props.model?.startsWith("gpt-4")) { + return ( +
+ +
+ ); + } return (
@@ -727,7 +738,7 @@ export function Chat(props: { >
- +
{(message.preview || message.streaming) && (
diff --git a/app/icons/bot-4.svg b/app/icons/bot-4.svg new file mode 100644 index 000000000..e0c92e60a --- /dev/null +++ b/app/icons/bot-4.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/store/app.ts b/app/store/app.ts index 39df9ef79..05b9b70cc 100644 --- a/app/store/app.ts +++ b/app/store/app.ts @@ -17,6 +17,7 @@ export type Message = ChatCompletionResponseMessage & { streaming?: boolean; isError?: boolean; id?: number; + model?: string; }; export function createMessage(override: Partial): Message { @@ -387,6 +388,7 @@ export const useChatStore = create()( role: "assistant", streaming: true, id: userMessage.id! + 1, + model: get().config.modelConfig.model, }); // get recent messages