Merge pull request #21 from heimoshuiyu/master

sync 0124
This commit is contained in:
Zhenghao Wu
2025-01-24 12:28:03 +00:00
committed by GitHub
8 changed files with 88 additions and 13 deletions

View File

@@ -208,6 +208,7 @@ export function ImageGenDrawer({ disableFactor }: Props) {
audio: null,
logprobs: null,
response_model_name: imageGenModel,
reasoning_content: null,
});
setChatStore({ ...chatStore });

View File

@@ -408,6 +408,30 @@ const Number = (props: {
}}
/>
)}
{props.field === "presence_penalty" && (
<Checkbox
checked={chatStore.presence_penalty_enabled}
onCheckedChange={() => {
const newChatStore = { ...chatStore };
newChatStore.presence_penalty_enabled =
!newChatStore.presence_penalty_enabled;
setChatStore({ ...newChatStore });
}}
/>
)}
{props.field === "frequency_penalty" && (
<Checkbox
checked={chatStore.frequency_penalty_enabled}
onCheckedChange={() => {
const newChatStore = { ...chatStore };
newChatStore.frequency_penalty_enabled =
!newChatStore.frequency_penalty_enabled;
setChatStore({ ...newChatStore });
}}
/>
)}
</Label>
<Input

View File

@@ -87,12 +87,15 @@ const Navbar: React.FC = () => {
<MenubarItem>
<ReceiptIcon className="w-4 h-4 mr-2" />
Price:{" "}
{models[chatStore.model]?.price?.prompt * 1000 * 1000}$
/ 1M input tokens
{models[chatStore.model]?.price?.prompt *
1000 *
1000}$ / 1M input tokens
</MenubarItem>
<MenubarItem>
<WalletIcon className="w-4 h-4 mr-2" />
Total: {getTotalCost().toFixed(2)}$
Total: {getTotalCost().toFixed(
2
)}$
</MenubarItem>
<MenubarItem>
<ArrowUpDownIcon className="w-4 h-4 mr-2" />
@@ -112,7 +115,9 @@ const Navbar: React.FC = () => {
</MenubarItem>
<MenubarItem>
<ScissorsIcon className="w-4 h-4 mr-2" />
{chatStore.postBeginIndex} / {chatStore.history.length}
{
chatStore.postBeginIndex
} / {chatStore.history.length}
</MenubarItem>
<MenubarSeparator />
<MenubarItem disabled>