ui enhancements, model tuning

This commit is contained in:
Steve Androulakis
2025-01-03 09:25:50 -08:00
parent 193dad0d77
commit dde076f3ed
6 changed files with 28 additions and 25 deletions

View File

@@ -60,7 +60,7 @@ export default function App() {
try {
await fetch("http://127.0.0.1:8000/end-chat", { method: "POST" });
// sleep for a bit to allow the server to process the end-chat request
await new Promise((resolve) => setTimeout(resolve, 4000)); // todo make less dodgy
await new Promise((resolve) => setTimeout(resolve, 1000)); // todo make less dodgy
await fetch(
`http://127.0.0.1:8000/send-prompt?prompt=${encodeURIComponent("I'd like to travel to an event.")}`,
{ method: "POST" }
@@ -71,6 +71,12 @@ export default function App() {
}
};
const handleKeyPress = (e) => {
if (e.key === "Enter") {
handleSendMessage();
}
};
return (
<div className="flex flex-col min-h-screen">
<NavBar title="Temporal AI Agent" />
@@ -91,6 +97,7 @@ export default function App() {
placeholder="Type your message..."
value={userInput}
onChange={(e) => setUserInput(e.target.value)}
onKeyPress={handleKeyPress}
/>
<button
onClick={handleSendMessage}