Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shanbady/chunk size dropdown #1989

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

shanbady
Copy link
Contributor

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/6552

Description (What does it do?)

This PR adds a dropdown to the syllabus chat page that allows for selection of the chunk size to use when performing content file search.

Screenshots (if appropriate):

Screenshot 2025-01-24 at 2 47 56 PM

How can this be tested?

  1. Checkout this branch
  2. Make sure you have AI_MIT_SYLLABUS_URL="https://api.rc.learn.mit.edu/api/v0/vector_content_files_search/"
  3. set the openai env var OPENAI_API_KEY (can grab from heroku rc)
  4. set "botEnabled" to true in frontends/main/src/app-pages/ChatSyllabusPage/ChatSyllabusPage.tsx
  5. in ai_chat/views.py set permission_classes to [] (there might be better ways of doing this but for testing locally this worked)
  6. visit the syllabus chat bot endpoint http://open.odl.local:8062/chat_syllabus
  7. try talking to the chat bot. change the chunk size selector to different values and see the size of chunks returned is different (it should also respond slightely differently based on this)

Additional Context

@shanbady shanbady marked this pull request as ready for review January 24, 2025 20:04
@shanbady shanbady added the Needs Review An open Pull Request that is ready for review label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review An open Pull Request that is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant