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

feat(docx): Integrate triton to next gen docs #2373

Merged
merged 8 commits into from
Feb 24, 2025

Conversation

edison-cy-yang
Copy link
Contributor

@edison-cy-yang edison-cy-yang commented Feb 12, 2025

Motivations

This PR brings chatting with Triton directly into the doc site via a SideDrawer with valid API key

Changes

Added

  • Introduce top nav layout with search, ask Triton button, and theme toggle
  • Chat with Triton with Triton API key

Changed

  • Search and theme toggle are moved into top nav

Deprecated

Removed

Fixed

Security

Testing

  • Pull down the branch and set it up to target local Triton backend as CORS isn't setup for preview build to hit Triton endpoints
  • Note that response streaming doesn't work in non production environments

Changes can be
tested via Pre-release


In Atlantis we use Github's built in pull request reviews.

Random photo of Atlantis

scotttjob and others added 5 commits January 29, 2025 07:43
* create header component

* accurate header width calculation

* ToggleThemeButton into Header

* align ToggleThemeButton to the right of the header

* make sure nav menu aligns with header

* border on the header

* Header takes up the whole width

* make sure only BaseView.Main scrolls with header on top

* move top nav to be inside BaseView.Main

* refactor Triton SideDrawer into its own component and created TritonContext

* header styling

* dont use box as main due to lack of boxShadow

* make header responsive in minimal mode

* fix eslint

* overflow auto on main routed div

* ask triton button styling

* only rounded top corners of main content

* fixed main content not growing

* fix BaseView border radius

* some layout/styling tweaks

* add header to collection pages and make scrollbar inside the content

* isolate blending to only content card wrapper

* align nav with header

* Renamed Header to TopNav

* use Box instead of div

---------

Co-authored-by: Chris Murray <[email protected]>
Copy link

cloudflare-workers-and-pages bot commented Feb 12, 2025

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7c97aa2
Status: ✅  Deploy successful!
Preview URL: https://48de527f.atlantis.pages.dev
Branch Preview URL: https://job-110161-integrate-triton.atlantis.pages.dev

View logs

taylorvnoj and others added 3 commits February 21, 2025 17:03
* Triton SideDrawer knows if ApiKey is valid or not via InputPassword

* add validation message for wrong api key

* stream hooked up, seeing questions and answers flowing in sidedrawer

* fix layout of sidedrawer and update styling of questions

* styling is where I want it

* links are working

* make it so the response appears to be typing, scroll container as responses come in and update InputText button to say Asking when loading

* install react-markdown as a dependency

* package-lock updates

* use component and design lists in TritonLinks

* remove comments

* manage loading state in the provider and fix broken api key

* refactor provider

* refactor TritonSideDrawer

* refactor TritonConversation

* refactor TritonConversation css

* update marginBottom of question

* add the copy code button to code blocks

* use correct url in useTritonApi

* actually make copy  code button work

* rename fetchWithApiKey to invokeTritonApi

* move TritonLinks to utils

* move scrollToBottom function

* adjust validation of api logic and move validateApiKey to useTritonApi

* move scrollToBottom to useTritonApi.ts

* move sendSearch andhandleStreamResponse to useTritonApi

* test out streaming response

* remove handleStreamResponse

* remove unnecessary console.error and other cleanups
@edison-cy-yang edison-cy-yang marked this pull request as ready for review February 24, 2025 17:39
@edison-cy-yang edison-cy-yang requested a review from a team as a code owner February 24, 2025 17:39
@taylorvnoj taylorvnoj self-requested a review February 24, 2025 18:33
Copy link
Contributor

@taylorvnoj taylorvnoj left a comment

Choose a reason for hiding this comment

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

Lets gooooo 🚀

@taylorvnoj taylorvnoj merged commit 5053e7b into master Feb 24, 2025
13 checks passed
@taylorvnoj taylorvnoj deleted the JOB-110161-integrate-triton-to-next-gen-docs branch February 24, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants