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

Citations to Chat with file #246

Merged
merged 18 commits into from
Nov 2, 2023
Merged

Citations to Chat with file #246

merged 18 commits into from
Nov 2, 2023

Conversation

thivy
Copy link
Contributor

@thivy thivy commented Nov 1, 2023

This pull request includes a variety of changes to improve the functionality and usability of the codebase. The most important changes include adding a new sheet component to display content in a modal-like interface, adding error handling to the chat menu, improving the code quality and readability of several components, and updating import paths for various components.

Main interface changes:

  • src/components/ui/sheet.tsx: Added a new sheet component to display content in a modal-like interface.

Chat menu improvements:

  • src/features/chat/chat-menu/menu-items.tsx: Added error handling to the chat menu and displays error messages using the useGlobalMessageContext hook. Changed the key prop of the MenuItem component to use the index of the mapped array instead of the thread id. (Fa924a70)

Code quality improvements:

  • src/components/ui/label.tsx: Improved code quality and fixed export issue in Label component. [1] [2]
  • src/components/ui/toaster.tsx: Minor changes to improve the code quality and readability of src/components/ui/toaster.tsx. [1] [2] [3]

Documentation improvements:

  • src/app/change-log/page.tsx: Replaced ReactMarkdown component with a custom Markdown component and updated the file name and location for update.md. [1] [2]
  • src/app/change-log/update.md: Added a new section for citations in the chat with file feature.
  • docs/1-introduction.md: Removed the LangChain JS line from the introduction documentation.

Styling improvements:

  • src/app/layout.tsx: Added support for light theme by adding the light class to the html element in src/app/layout.tsx.
  • src/components/chat/chat-row.tsx: Replaced the MemoizedReactMarkdown component with the Markdown component and added the prose class for styling in src/components/chat/chat-row.tsx. [1] [2]

Component import updates:

  • src/app/chat/layout.tsx: Updated import path for MainMenu component in src/app/chat/layout.tsx.
  • src/app/unauthorized/layout.tsx: Updated import path and removed whitespace in src/app/unauthorized/layout.tsx. [1] [2]4R14)
  • src/app/change-log/layout.tsx: Updated import path for MainMenu component in src/app/change-log/layout.tsx.
  • src/app/reporting/layout.tsx: Updated import statement for MainMenu in src/app/reporting/layout.tsx.
  • src/features/chat/chat-menu/chat-menu-container.tsx: Updated import statement for useMenuContext in chat-menu-container.tsx.
  • src/components/chat/memoized-react-markdown.tsx: Replaced the MemoizedReactMarkdown component with the Markdown component.
  • src/components/chat/markdown.tsx: Added Markdown component with dependencies and props.

@thivy thivy changed the title Package upgrade Citations to Chat with file Nov 1, 2023
@superpoussin22
Copy link

@thivy
testing it in my env : I got an error message in logs :
" error_OpenAIError: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' })."
and the interface no more works : I cant send a prompt to the openai instance.

The main branch is working fine

@thivy
Copy link
Contributor Author

thivy commented Nov 1, 2023

OPENAI_API_KEY

We added the latest OpenAI JS SDK which requires OPENAI_API_KEY environment variable name. Will update the documentation

https://github.com/openai/openai-node#usage

@superpoussin22
Copy link

superpoussin22 commented Nov 1, 2023

that's clear thanks @thivy
Need to adapt the bicep too

Copy link
Member

@davidxw davidxw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed:

  • Update version check logic so that newer versions don't show as out of date
  • Group repeating filenames in the citation

@davidxw davidxw merged commit 1708a4a into main Nov 2, 2023
3 checks passed
Sandeep-FED pushed a commit to Sandeep-FED/azurechat that referenced this pull request Jun 14, 2024
Sandeep-FED pushed a commit to Sandeep-FED/azurechat that referenced this pull request Jun 14, 2024
jnxjent pushed a commit to jnxjent/azurechat that referenced this pull request Aug 26, 2024
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.

3 participants