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

in conversation logs, course_name has an extra space at the end! UGH #87

Open
KastanDay opened this issue Sep 14, 2023 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@KastanDay
Copy link
Member

Need to update all our conversations, to proper naming convention...

CleanShot 2023-09-14 at 12 03 10
@KastanDay KastanDay added the bug Something isn't working label Sep 14, 2023
@KastanDay KastanDay self-assigned this Sep 14, 2023
@KastanDay KastanDay moved this to 📥 Ready to start in UIUC.chat Development Sep 14, 2023
@KastanDay
Copy link
Member Author

KastanDay commented Sep 14, 2023

Ensure we update the auto-create new conversation code in Chat.tsx for this change.

useEffect(() => {
    try {
      if (isCourseMetadataLoading) return
      // TODO: FIX TYPES HERE. see this issue: https://github.com/UIUC-Chatbot/ai-ta-backend/issues/87
      if (
        course_metadata &&
        selectedConversation &&
        selectedConversation.messages &&
        selectedConversation.messages.length > 0 &&
        selectedConversation?.messages[0]?.contexts &&
        selectedConversation.messages[0].contexts.length > 0 &&
        // eslint-disable-next-line
        // @ts-ignore
        selectedConversation?.messages[0]?.contexts[0]?.['course_name '] &&
        course_name !==
        // eslint-disable-next-line
        // @ts-ignore
        selectedConversation.messages[0].contexts[0]['course_name ']
      ) {
        handleNewConversation()
        console.log(
          'Auto-created new conversation. Old course_name',
          // eslint-disable-next-line
          // @ts-ignore
          selectedConversation.messages[0].contexts[0]['course_name '],
          'new course_name',
          course_name,
        )
        // console.log("PASSED CHECK, SHOULD CREATE NEW CONVO ")
        // console.log("selectedConversation.messages[0].contexts[0].course_name", selectedConversation.messages[0].contexts[0])
      }
    } catch (error) {
      console.error('An error occurred in useEffect: ', error)
    }
  }, [course_metadata])

(Crying because it's so messy)

@KastanDay KastanDay moved this from 📥 Ready to start to (📋 Backlog) in UIUC.chat Development Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: (📋 Backlog)
Development

No branches or pull requests

1 participant