This pull request primarily modifies the sdk/js/samples/react directory, with changes aimed at improving the user interface, enhancing the functionality of the chat protocol, and updating the documentation. The most significant changes include the addition of a new Readme.tsx file, updates to the Chat.tsx file to improve the chat interface, and changes to the README.md file to provide better instructions for users.
User Interface Enhancements:
sdk/js/samples/react/src/App.tsx: The App function was modified to include a new Readme component and CSS styles were updated for the application container.
sdk/js/samples/react/src/Chat.module.css: New CSS styles were added for the chat window, messages, user message, assistant message, message bubble, input area, and other elements.
Chat Protocol Functionality Enhancements:
sdk/js/samples/react/src/Chat.tsx: The Chat function was updated to use the getStreamedCompletion and getCompletion methods for streaming and non-streaming requests, respectively. Additionally, the chat interface was improved with the addition of a markdown renderer for messages and an autosizing textarea for user input. [1][2][3][4]
Documentation Updates:
sdk/js/samples/react/README.md: The documentation was updated to provide instructions on how to integrate the chat protocol in a project, and how to use the getStreamedCompletion and getCompletion methods.
This pull request primarily modifies the
sdk/js/samples/react
directory, with changes aimed at improving the user interface, enhancing the functionality of the chat protocol, and updating the documentation. The most significant changes include the addition of a newReadme.tsx
file, updates to theChat.tsx
file to improve the chat interface, and changes to theREADME.md
file to provide better instructions for users.User Interface Enhancements:
sdk/js/samples/react/src/App.tsx
: TheApp
function was modified to include a newReadme
component and CSS styles were updated for the application container.sdk/js/samples/react/src/App.module.css
: New CSS styles were added for the application container.sdk/js/samples/react/src/Chat.module.css
: New CSS styles were added for the chat window, messages, user message, assistant message, message bubble, input area, and other elements.Chat Protocol Functionality Enhancements:
sdk/js/samples/react/src/Chat.tsx
: TheChat
function was updated to use thegetStreamedCompletion
andgetCompletion
methods for streaming and non-streaming requests, respectively. Additionally, the chat interface was improved with the addition of a markdown renderer for messages and an autosizing textarea for user input. [1] [2] [3] [4]Documentation Updates:
sdk/js/samples/react/README.md
: The documentation was updated to provide instructions on how to integrate the chat protocol in a project, and how to use thegetStreamedCompletion
andgetCompletion
methods.sdk/js/samples/react/src/Readme.tsx
: A newReadme
component was added to render theREADME.md
file in the application.Minor Changes:
sdk/js/samples/react/index.html
: The favicon and title of the HTML file were updated.sdk/js/samples/react/package.json
: The order of dependencies was changed.sdk/js/samples/react/vite.config.ts
: The Vite configuration was updated to include markdown files as assets.