Skip to content

Commit

Permalink
Add temp display (#596)
Browse files Browse the repository at this point in the history
* Made the Model Name Bar Sticky at the top of the Chat Window

* Added Temp to the top bar display

* barliens

---------

Co-authored-by: Chris Wall <[email protected]>
  • Loading branch information
mckaywrigley and horizonchasers committed Apr 18, 2023
1 parent 2aaebfe commit fda7840
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions components/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const Chat = memo(({ stopConversationRef }: Props) => {
messages: updatedConversation.messages,
key: apiKey,
prompt: updatedConversation.prompt,
temperature: updatedConversation.temperature
temperature: updatedConversation.temperature,
};
const endpoint = getEndpoint(plugin);
let body;
Expand Down Expand Up @@ -425,22 +425,23 @@ export const Chat = memo(({ stopConversationRef }: Props) => {
/>

<TemperatureSlider
label="Temperature"
onChangeTemperature={(temperature) =>
handleUpdateConversation(selectedConversation, {
key: 'temperature',
value: temperature,
})
}
/>
label="Temperature"
onChangeTemperature={(temperature) =>
handleUpdateConversation(selectedConversation, {
key: 'temperature',
value: temperature,
})
}
/>
</div>
)}
</div>
</>
) : (
<>
<div className="flex justify-center border border-b-neutral-300 bg-neutral-100 py-2 text-sm text-neutral-500 dark:border-none dark:bg-[#444654] dark:text-neutral-200">
{t('Model')}: {selectedConversation?.model.name}
<div className="sticky top-0 z-10 flex justify-center border border-b-neutral-300 bg-neutral-100 py-2 text-sm text-neutral-500 dark:border-none dark:bg-[#444654] dark:text-neutral-200">
{t('Model')}: {selectedConversation?.model.name} | {t('Temp')}
: {selectedConversation?.temperature} |
<button
className="ml-2 cursor-pointer hover:opacity-50"
onClick={handleSettings}
Expand Down

1 comment on commit fda7840

@vercel
Copy link

@vercel vercel bot commented on fda7840 Apr 18, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.