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

Chat With Website Feature #168

Open
wants to merge 2 commits into
base: staging
Choose a base branch
from
Open

Conversation

kmankan
Copy link

@kmankan kmankan commented Nov 5, 2024

PR Notes:

  • Update README.md in /www to add jina.ai stuff and some small helpful changes to the root README.md
  • Update .env.template to add jina.ai key template
  • created new helper function getPromptFromURL that uses Jina reader to parse websites from the url provided
  • new dynamic route handler at r/[...url]
    • + error and loading page logic
  • page.tsx in the dynamic route parses the provided url, checks it is valid and then calls the helper function to use jina reader to get parsed content. then passes these as params to the Home component.
  • modified components/messagebox to create specific window for url-based chat conversations, specifically an accordion for hiding website content by default. Note: Bloom seems to render all images in the chat window...
  • page.tsx react content -> home.tsx
  • root page.tsx passes in the home component
  • added three functions to the main react code in home.tsx:
    • createChatFromUrl(): initiates a new conversation window
    • First useEffect: Creates the conversation container
    • Second useEffect: Initiates the actual conversation with the URL content

How to use:

just append the root url with /r/whateverwebsite
e.g for testing. http://localhost:3000/r/https://example.com

Demo

bloom-chat-with-website-feature-demo.mov

Copy link

vercel bot commented Nov 5, 2024

@kmankan is attempting to deploy a commit to the Plastic Labs Team on Vercel.

A member of the Team first needs to authorize it.

@kmankan kmankan mentioned this pull request Nov 5, 2024
@VVoruganti VVoruganti requested a review from bLopata November 12, 2024 16:23
Copy link
Contributor

@bLopata bLopata left a comment

Choose a reason for hiding this comment

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

Awesome work! One things we will need are a feature flag override to hide the page routes.

Along with that it would be really nice if after the content was fetched, the page cleared the URL or reverted it back to the original URL. This could also be done in the case of the feature flag being disabled.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should not be deleted. See here

@kmankan
Copy link
Author

kmankan commented Nov 20, 2024

Awesome work! One things we will need are a feature flag override to hide the page routes.

Along with that it would be really nice if after the content was fetched, the page cleared the URL or reverted it back to the original URL. This could also be done in the case of the feature flag being disabled.

awesome. alright I'll work on those updates!

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.

2 participants