NamH 6e2210cb22
feat: adding create bot functionality (#368)
* feat: adding create bot functionality

Signed-off-by: James <james@jan.ai>

* update the temperature progress bar

Signed-off-by: James <james@jan.ai>

* chore: remove tgz

Signed-off-by: James <james@jan.ai>

* update core dependency

Signed-off-by: James <james@jan.ai>

* fix e2e test

Signed-off-by: James <james@jan.ai>

---------

Signed-off-by: James <james@jan.ai>
Co-authored-by: James <james@jan.ai>
2023-10-23 15:57:56 +07:00

36 lines
1.0 KiB
TypeScript

import ToggleSwitch from "../ToggleSwitch";
import DraggableProgressBar from "../DraggableProgressBar";
import { Controller } from "react-hook-form";
type Props = {
control?: any;
};
const CutomBotTemperature: React.FC<Props> = ({ control }) => (
<div className="flex flex-col gap-2">
<ToggleSwitch
id="enableCustomTemperature"
title="Custom temperature"
control={control}
/>
<div className="text-gray-500 mt-1 text-[0.8em]">
Controls the creativity of the bot&apos;s responses. Higher values produce more
varied but unpredictable replies, lower values generate more consistent
responses.
</div>
<span className="text-gray-900">default: 0.7</span>
<Controller
name="enableCustomTemperature"
control={control}
render={({ field: { value } }) => {
if (!value) return <div />;
return (
<DraggableProgressBar id="customTemperature" control={control} min={0} max={1} step={0.01} />
);
}}
/>
</div>
);
export default CutomBotTemperature;