fix: select dark mode

This commit is contained in:
iMADi-ARCH 2023-05-22 23:33:38 +05:30
parent d7da5a3005
commit 3a98a4ad20

View File

@ -28,13 +28,16 @@ export default function ChatPage() {
const askQuestion = async () => { const askQuestion = async () => {
setHistory((hist) => [...hist, ["user", question]]); setHistory((hist) => [...hist, ["user", question]]);
setIsPending(true); setIsPending(true);
const response = await axios.post(`${process.env.NEXT_PUBLIC_BACKEND_URL}/chat/`, { const response = await axios.post(
model, `${process.env.NEXT_PUBLIC_BACKEND_URL}/chat/`,
question, {
history, model,
temperature, question,
max_tokens: maxTokens, history,
}); temperature,
max_tokens: maxTokens,
}
);
setHistory(response.data.history); setHistory(response.data.history);
console.log(response.data.history); console.log(response.data.history);
@ -92,6 +95,7 @@ export default function ChatPage() {
name="model" name="model"
id="model" id="model"
value={model} value={model}
className="px-5 py-2 dark:bg-gray-700 bg-gray-200 rounded-md"
onChange={(e) => setModel(e.target.value)} onChange={(e) => setModel(e.target.value)}
> >
<option value="gpt-3.5-turbo">gpt-3.5-turbo</option> <option value="gpt-3.5-turbo">gpt-3.5-turbo</option>