Skip to content

Commit

Permalink
[su24] get student query (#493)
Browse files Browse the repository at this point in the history
* get student query

* allow python prereleases

* update setup python version
  • Loading branch information
LarynQi authored Jun 16, 2024
1 parent 604b4ec commit 796958c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ jobs:
key: v2-${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: ${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Initialize environment
shell: bash
run: python -m venv "${VENV_DIR}"
Expand Down
5 changes: 4 additions & 1 deletion client/protocols/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def run(self, messages):
consent = self._get_consent(email)
context = self._get_context(email)
curr_message = {'role': 'user', 'content': code}
student_query = input("Have a specific question? Enter it here (or leave blank for general advice): ").lower().strip()
print()
help_payload = {
'email': email,
'promptLabel': 'Get_help',
Expand All @@ -84,7 +86,8 @@ def run(self, messages):
'version': 'v2',
'key': self.HELP_KEY,
'consent': consent,
'messages': context + [curr_message]
'messages': context + [curr_message],
'studentQuery': student_query,
}
elif res == 'never':
self._set_disabled(email, disabled=True)
Expand Down

0 comments on commit 796958c

Please sign in to comment.