Skip to content

Commit d2589e5

Browse files
committed
llm state updated
1 parent e5526bd commit d2589e5

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

bases/rsptx/web2py_server/applications/runestone/controllers/peer.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,7 @@ def peer_async():
758758
all_done=all_done,
759759
has_vote1=has_vote1,
760760
has_reflection=has_reflection,
761+
llm_enabled=_llm_enabled(),
761762
llm_reply=None,
762763
**course_attrs,
763764
)
@@ -1010,6 +1011,10 @@ def send_lti_scores():
10101011

10111012

10121013

1014+
def _llm_enabled():
1015+
return bool(_get_course_openai_key())
1016+
1017+
10131018
def _get_course_openai_key():
10141019
try:
10151020
token_record = asyncio.get_event_loop().run_until_complete(

bases/rsptx/web2py_server/applications/runestone/views/peer/peer_async.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{{extend 'runestone.html'}}
2+
<script>
3+
window.ASYNC_LLM_ENABLED = {{='true' if llm_enabled else 'false'}};
4+
</script>
25
<script>
36
window.DISABLE_LLMTEST = true;
47
window.PI_LLM_MODE = false;

0 commit comments

Comments
 (0)