Skip to content

Conversation

AdamFipke
Copy link
Collaborator

@AdamFipke AdamFipke commented Apr 9, 2025

Update:

Here's a list of my TODOs that I was going to include in this PR ('cause I was banging out features at the time). I split these into ones that could be put into their own PR and what's left that absolutely needs to be done for this PR. DO NOTE that I have not looked at this PR in a minute, so some things may be partially implemented or already done, but probably not.

Possibly their own PR:

  • Post response image upload (should probably use AI to generate alt text)
  • Images for comments (which includes editing and deleting images. A lot of the work for this can just be copy-pasted from what was done here, including using AI to generate alt texts)
  • Image upload for chatabot (I think I already made this an issue, here Image upload for chatbot #286 )

What's left for this PR:

  • actually log a question.images.buffer after querying to make sure its undefined and not being loaded into memory (this is just to test to make sure @Exlclude or whatever is working
  • Manually test all places with API.asyncQuestions.studentUpdate and make sure they still work as intended
  • Give option for staff to delete any citations from the AI (checkbox) - I think I already did this
  • Try adding an image while editing without checking "Get a new AI response" and make sure it doesn't fail
  • Update userguide
  • Don't forget to handle case about the course setting for asyncCentreAIAnswers - I may have already done this but not sure. Should manually test to make sure it works well
  • update cloneCourseDocuments to include the new types of documents
  • TESTS, i haven't yet wrote any tests for this I believe. And tests are really important in this case since this actually allows for students to upload images/files (and said images/files will get processed by chatbot). So making sure the file size limit, extension checks, and everything actually work. The chatbot side of the image upload (for /ask) probably already has a fair bit of tests from bridgette, but I would probably write proper tests for this and to also probably mock the chatbot service's response.
  • Maybe add a visual way to show if an anytime question has already been inserted as a chunk, if there isn't already. (It has been so long I have forgotten if I already did this, I think I have)

Description

Still need to write this, though I wrote pretty detailed commit messages

Closes # (issue number)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This requires a run of yarn install
  • This change requires an addition/change to the production .env variables. These changes are below:
  • This change requires developers to add new .env variables. The file and variables needed are below:
  • This change requires a database query to update old data on production. This query is below:

How Has This Been Tested?

Please describe how you tested this PR (both manually and with tests)
Provide instructions so we can reproduce.

  • Test A
  • Test B

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code where needed
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any work that this PR is dependent on has been merged into the main branch
  • Any UI changes have been checked to work on desktop, tablet, and mobile

…me things, and added some QoL so now if you click off your answer won't be reset (and changed the 'clear' button to a 'revert')
@AdamFipke AdamFipke linked an issue Apr 9, 2025 that may be closed by this pull request
…all for getting an AI answer to the backend. Also, the helpme backend will now upload the question with the images to the chatbot backend, which will use ai to generate descriptions for the images, which it then feeds with the rest of the question
…kip the similarity search for getting a chatbot response (since it's very unlikely and was causing issues where uploading the same image kept giving the same response regardless of my question abstract)
…le width of the page! Had to set a min width to allow the flex item to shrink smaller than the content's width
…d re-process new images that are uploaded and re-use existing ones (unless those existing ones were deleted). Some other refactorings for backend of async questions, especially updateQuestionStudent.
@AdamFipke AdamFipke linked an issue Apr 15, 2025 that may be closed by this pull request
…th redis and resetting userinfo). Also fixed some issues with chatbot_token.used not updating on client-side
…s' since SourceDocument was unclear on what it was referring to exactly)
…f async questions. Also refactored the updateQuestionStaff method to use a transaction
@AdamFipke AdamFipke changed the title Async Question Image attachments and SaveToChatbot Async question images, saveToChatbot, and source document citations Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optionally auto-convert Anytime Question answers into document chunks Anytime Question Source Documents Async question image/attachments support

1 participant