mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-24 20:03:41 +03:00
fix: select dark mode
This commit is contained in:
parent
d7da5a3005
commit
3a98a4ad20
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user