Skip to content

Commit

Permalink
fix Python tutor
Browse files Browse the repository at this point in the history
  • Loading branch information
cgawron committed Mar 16, 2024
1 parent 25c3a84 commit fa3d65a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/chat/apps/context/initState.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const initApps = {
content:
`Du bist ein Tutor in einem Python-Kurs.
Stelle dem Benutzer eine einfache Programmieraufgabe und gib ihm Hinweise, um ihm zu helfen, den Code zu schreiben.
Warte dann auf die Antwort des Benutzers!!
Gib ihm Feedback und erkläre ihm, was er falsch gemacht hat.
Stelle dem Benutzer auf Basis erkannter Schwächen jeweils eine passende Folgeaufgabe.`,
role: "system",
Expand Down
6 changes: 3 additions & 3 deletions src/chat/context/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ export default function action(state, dispatch) {
let messages = [{ content: currentApp?.content || t("system_welcome"), sentTime: Date.now(), role: "system", id: 1, }]
console.log("newChat: ", currentApp, chat)
const chatList = [
...chat,
{
title: currentApp?.title || t("new_conversation"),
id: Date.now(),
messages,
ct: Date.now(),
icon: [2, "files"],
},
...chat,
];
let _chat = chatList;
setState({ chat: _chat, currentChat: chatList.length - 1 });
setState({ chat: _chat, currentChat: 0 });
console.log("newChat: ", _chat)
if (currentApp.botStarts) {
console.log("botStarts");
await executeChatRequest(setState, is, _chat, messages, options, currentChat, chat);
await executeChatRequest(setState, is, _chat, messages, options, 0, chat);
}
},

Expand Down

0 comments on commit fa3d65a

Please sign in to comment.