mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-16 14:38:08 +01:00
works a lot better with 4o!
This commit is contained in:
@@ -18,9 +18,12 @@ export default function App() {
|
||||
const data = await res.json();
|
||||
// data is now an object like { messages: [ ... ] }
|
||||
|
||||
if (data.messages && data.messages.some(msg => msg.actor === "response" || msg.actor === "tool_result")) {
|
||||
if (data.messages && data.messages.length > 0 && (data.messages[data.messages.length - 1].actor === "agent")) {
|
||||
setLoading(false);
|
||||
}
|
||||
else {
|
||||
setLoading(true);
|
||||
}
|
||||
setConversation(data.messages || []);
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user