Add temp display (#596)

* 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 <cwall@wooldata.com>
This commit is contained in:
Mckay Wrigley 2023-04-18 08:35:31 -06:00 committed by GitHub
parent 2aaebfec3f
commit fda784028d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 11 deletions

View File

@ -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;
@ -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}