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

Feature: Scratch pad for notes and/or text splitting? #17

Open
centminmod opened this issue Mar 21, 2023 · 8 comments
Open

Feature: Scratch pad for notes and/or text splitting? #17

centminmod opened this issue Mar 21, 2023 · 8 comments
Labels
depends The issue depends on another issue being closed

Comments

@centminmod
Copy link

centminmod commented Mar 21, 2023

@enricoros Love your work, it was very easy to setup using Cloudflare Pages https://developers.cloudflare.com/pages/framework-guides/deploy-a-nextjs-site/ once you set NODE_VERSION https://developers.cloudflare.com/pages/platform/build-configuration/ 😀

The first suggestion is how about a scratch pad for notes on a expand/collapse sidebar column? Sometimes you work with a text size that is greater than the token length, so need the whole text to be placed somewhere.

Even better, add support for the notepad to allow full-text input and count characters/tokens and then users can define how many characters or tokens to split text by and have neat snippets of text displayed to be copied and pasted. I did a standalone text splitter demo for what I mean at https://slicer.centminmod.com/ 😃

cheers

George

@enricoros enricoros self-assigned this Mar 24, 2023
@enricoros
Copy link
Owner

Hi George thanks for your feedback.

Cloudflare: Will you be willing to write a little Markdown (we put it in /docs/deploy-cloudflare.md) to super briefly explain how to do it? I've never done it, and would love to document, link it from the main Readme, and try it out!

Scratchpad. Love the idea. Shall be there. I'll mark this as a feature and work on it.

Text splitting I like your demo. I am thinking at having a scratchpad with tokens counting, and maybe a splitter button that will create other pads. Before I do this part - can you tell me more about your usecase and your workflow?

@centminmod
Copy link
Author

centminmod commented Mar 24, 2023

For setting up your nextjs app on Cloudflare Pages you can follow Cloudflare developer docs at https://developers.cloudflare.com/pages/framework-guides/deploy-a-nextjs-site/

The only difference is I took these steps below:

  1. I forked your repo to my own Github repo
  2. On the Cloudflare Pages section, click Create a project button > Connect To Git and give Cloudflare Pages either All Github account Repo access or selected Repo access. I use selected Repo access and select the forked repo from step 1
  3. Once you select the forked Github repo, you click Begin Setup button to setup build and deployments. On this page you set you Project name, Production branch i.e. main and your Build settings where you select from Framework preset dropdown menu Next.js. Leave the preset filled Build command and Build output directory as preset defaults. You'd want to set Environmental variables (advanced) on this page to configure some variables as follows:
VARIABLE VALUE
GO_VERSION 1.16
NEXT_TELEMETRY_DISABLED 1
NODE_VERSION 17
PHP_VERSION 7.4
PYTHON_VERSION 3.7
RUBY_VERSION 2.7.1
  1. Click the Save and Deploy button
  2. Then watch the process run to initialize your build environment, clone Github repo, build the application and deploy to Cloudflare Network once that is done, proceed to the project you created.
  3. Custom domains tab allows you to set up your domain via CNAME
  4. Settings page will have 2 settings you want to enable, Access Policy to restrict preview deployments to members of your Cloudflare account via one time pin and to restrict primary *.YOURPROJECT.pages.dev domain see https://developers.cloudflare.com/pages/platform/known-issues/#enabling-access-on-your-pagesdev-domain and enable Web Analytics

If that is something you can follow?

My use case is basically for coding or where inputs are pretty large so needs splitting up to drip feed the inputs to ChatGPT

@enricoros
Copy link
Owner

Added a placeholder for where the scratchpad will be (now that we support multiple chats).

image

@centminmod
Copy link
Author

@enricoros thanks!

@enricoros
Copy link
Owner

@centminmod, used your instructions up here to create deploy-cloudflare.md

@centminmod
Copy link
Author

centminmod commented Apr 14, 2023

that link to md file gives me no search results? edit: ah you mean https://github.com/enricoros/nextjs-chatgpt-app/blob/main/docs/deploy-cloudflare.md :)

Related to scratch pad when pasting in text, not sure if anything can be done for security to protect against prompt injection attacks like

@enricoros
Copy link
Owner

Thanks for pointing this out. Will keep this top on mind in the next refactorings.

@enricoros enricoros removed the feature label Nov 16, 2023
@enricoros enricoros removed their assignment Nov 16, 2023
@enricoros
Copy link
Owner

This will be part of the editor of #202

@enricoros enricoros added the depends The issue depends on another issue being closed label Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends The issue depends on another issue being closed
Projects
Status: Requests
Development

No branches or pull requests

2 participants