Giter VIP home page Giter VIP logo

supermemoryai / supermemory Goto Github PK

View Code? Open in Web Editor NEW
4.8K 4.8K 456.0 61.37 MB

Build your own second brain with supermemory. It's a ChatGPT for your bookmarks. Import tweets or save websites and content using the chrome extension.

Home Page: https://supermemory.ai

License: MIT License

JavaScript 0.95% TypeScript 89.48% CSS 9.53% Shell 0.01% Handlebars 0.03%
cloudflare-ai cloudflare-browser-rendering cloudflare-d1 cloudflare-kv cloudflare-pages cloudflare-queues cloudflare-vectorize cloudflare-workers drizzle-orm nextjs nextjs14 tailwindcss typescript

supermemory's People

Contributors

alankritkhatri avatar aryasaatvik avatar codetorso avatar dhravya avatar gauravburande avatar govind-superu avatar imgbotapp avatar kartikk-k avatar kinfe123 avatar lakshaybhushan avatar luka1104 avatar maheshthedev avatar malisettisamrat avatar meetpateltech avatar mrswastik-robot avatar nexxeln avatar pelps12 avatar priyansh4444 avatar thakerkush avatar yxshv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

supermemory's Issues

Pressing enter key doesn't enter the prompt

Pressing enter key doesn't enter the prompt and instead goes to next line, You always have to press the arrow button, might be nitpick but I feel adding it would give better user experience for pc/laptop users

An error occurred during installation "bun dev" doesn't work...

Hi! I'm pretty new to bun and cloudflare. But this application is amazing so I really want to run it on local.
I followed the setupguide.md and I was able to setup until step 7.
But for step 8, when executing the following command, I encountered an issue: "bun run". During the process, there was an error message:

"$ bun dev
$ dotenv -- turbo run dev --filter=!cf-ai-backend
node:events:491
throw er; // Unhandled 'error' event
^

Error: spawn turbo ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:285:19)
at onErrorNT (node:internal/child_process:483:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:291:12)
at onErrorNT (node:internal/child_process:483:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn turbo',
path: 'turbo',
spawnargs: [ 'run', 'dev', '--filter=!cf-ai-backend' ]
}

Node.js v19.0.0
error: script "dev" exited with code 1"

How can I solve this error? Also, I can share the information until step 7.

Rough Idea: Connecting all data

Connect (& Arrange) all data with some (automated) AI based logic (could be dynamic &/ expandable).
Output may be in form of canvas/knowledge graph like in obsidian/something similar. (Data Arrangement Algorithm Goal: Any data should be reachable with minimum node clicks)
So whenever user has more time to look into, he/she can explore/scroll thru data from knowledge graph.

Directly open notes from the sidebar

Currently, the only way to add notes is from here -
image

Upon recieving feedback about this, I found that the notes feature is actually very helpful and should be a button in the sidebar itself. also because the sidebar is pretty empty right now!

Just download twitter bookmarks

Can this just download your twitter bookmarks and save them locally? To then be integrated with another project I'm working on?

remove the default next auth sign in page with a custom one (default one's ugly)

<button
          onClick={() => {
            signIn("google");
          }}
          className="flex flex-row gap-4 items-center justify-center px-8 py-4 rounded-md text-black font-semibold font-raleway bg-white"
        >
          <Image src={"https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Google_%22G%22_logo.svg/768px-Google_%22G%22_logo.svg.png"} alt="" width={30} height={30} />
          Sign in with Google
        </button>

this button should be ok ig I've just picked it from one of my projects, I've changed the image src to some random google logo I found online.

What is the solution of Supermemory? How does it solve the problem?

Hi,
I saw your project and I was attracted by it. You seem to find a common problem among people (especially developers) with an uncountable to read list. After reading the readme, I couldn't understand your solution to the problem actually, I reread the documentation but couldn't find the solution.

My question is, how do you want to overcome the problem? Just by storing it in a database and starting chatting with that?

Wanna know more about what you are thinking about and what the roadmap of the project is.

Thanks.

Hydration failed error

Unhandled Runtime Error
Error: Hydration failed because the initial UI does not match what was rendered on the server.
See more info here: https://nextjs.org/docs/messages/react-hydration-error

Did not expect server HTML to contain a in

.

Call Stack React throwOnHydrationMismatch node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (6981:1) popHydrationState node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (7384:1) completeWork node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (19764:1) completeUnitOfWork node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (25963:1) performUnitOfWork node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (25759:1) workLoopConcurrent node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (25734:1) renderRootConcurrent node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (25690:1) performConcurrentWorkOnRoot node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js (24504:1) workLoop node_modules/next/dist/compiled/scheduler/cjs/scheduler.development.js (256:1) flushWork node_modules/next/dist/compiled/scheduler/cjs/scheduler.development.js (225:1) MessagePort.performWorkUntilDeadline node_modules/next/dist/compiled/scheduler/cjs/scheduler.development.js (534:1)

After I login I am getting this error. I just started learning next so i am really sure what the issue is. I havent changed anything in the code

Supermemory as writing Assistant

Since it(SM) will have all data, while creating any new note/writing draft in note taking tool (like obsidian or anything else), it would be super useful if it can work as autocomplete/suggest related snippets from existing data.

Not able to login to the application (extension)

Steps to reproduce

  1. I click on login through the extension Screenshot 2024-04-16 at 12 49 39 AM
  2. Then I sign through the app Screenshot 2024-04-16 at 12 50 26 AM
  3. But still it says to login Screenshot 2024-04-16 at 12 50 54 AM
  4. Because of that whatever website I try to bookmark, nothing gets saved and my usage is shown zero
Screenshot 2024-04-16 at 12 51 33 AM

Happy to post any logs if required to solve this!

Thanks Dhravya, curious to check your app :)

An error occurred during authentication with NextAuth.

Hi! I was able to run the application locally, but when I login with google account the error below occurred.

[auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror
web:dev: [auth][cause]: TypeError: Cannot read properties of undefined (reading 'prepare')
web:dev:     at SQLiteD1Session.prepareQuery (webpack-internal:///(rsc)/../../node_modules/drizzle-orm/d1/session.js:29:30)
web:dev:     at SQLiteD1Session.prepareOneTimeQuery (webpack-internal:///(rsc)/../../node_modules/drizzle-orm/sqlite-core/session.js:76:17)
web:dev:     at SQLiteSelectBase._prepare (webpack-internal:///(rsc)/../../node_modules/drizzle-orm/sqlite-core/query-builders/select.js:586:88)
web:dev:     at SQLiteSelectBase.get (webpack-internal:///(rsc)/../../node_modules/drizzle-orm/sqlite-core/query-builders/select.js:604:17)
web:dev:     at getUserByAccount (webpack-internal:///(rsc)/../../node_modules/@auth/drizzle-adapter/lib/sqlite.js:124:18)
web:dev:     at acc.<computed> (webpack-internal:///(rsc)/../../node_modules/next-auth/node_modules/@auth/core/lib/init.js:178:30)
web:dev:     at Module.callback (webpack-internal:///(rsc)/../../node_modules/next-auth/node_modules/@auth/core/lib/actions/callback/index.js:53:39)
web:dev:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
web:dev:     at async AuthInternal (webpack-internal:///(rsc)/../../node_modules/next-auth/node_modules/@auth/core/lib/index.js:39:24)
web:dev:     at async Auth (webpack-internal:///(rsc)/../../node_modules/next-auth/node_modules/@auth/core/index.js:126:34)
web:dev: [auth][details]: {}
web:dev: [auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror
web:dev: [auth][cause]: TypeError: Cannot read properties of undefined (reading 'prepare')
web:dev:     at SQLiteD1Session.prepareQuery (webpack-internal:///(rsc)/../../node_modules/drizzle-orm/d1/session.js:29:30)
web:dev:     at SQLiteD1Session.prepareOneTimeQuery (webpack-internal:///(rsc)/../../node_modules/drizzle-orm/sqlite-core/session.js:76:17)
web:dev:     at SQLiteSelectBase._prepare (webpack-internal:///(rsc)/../../node_modules/drizzle-orm/sqlite-core/query-builders/select.js:586:88)
web:dev:     at SQLiteSelectBase.get (webpack-internal:///(rsc)/../../node_modules/drizzle-orm/sqlite-core/query-builders/select.js:604:17)
web:dev:     at getUserByAccount (webpack-internal:///(rsc)/../../node_modules/@auth/drizzle-adapter/lib/sqlite.js:124:18)
web:dev:     at acc.<computed> (webpack-internal:///(rsc)/../../node_modules/next-auth/node_modules/@auth/core/lib/init.js:178:30)
web:dev:     at Module.callback (webpack-internal:///(rsc)/../../node_modules/next-auth/node_modules/@auth/core/lib/actions/callback/index.js:53:39)
web:dev:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
web:dev:     at async AuthInternal (webpack-internal:///(rsc)/../../node_modules/next-auth/node_modules/@auth/core/lib/index.js:39:24)
web:dev:     at async Auth (webpack-internal:///(rsc)/../../node_modules/next-auth/node_modules/@auth/core/index.js:126:34)
web:dev: [auth][details]: {}
web:dev:  ⨯ Error [TypeError]: immutable

I've tried to debug adding the debug: true flag to next-auth but there was only not useful information.
From this part web:dev: [auth][details]: {} somehow the data is empty and I think the drizzle adaptor is causing this error.
Actually, I'm new to drizzle too ;-(
How can I solve this error?

How about use local llm

"Thank you very much for developing such a fantastic program. However, I have a suggestion. Could we possibly achieve using a local LLM with the OpenAI-like port by
modifying OpenAI's base URL address?"

(new ui) `window is not defined` in useViewport

web:dev:  ⨯ src/hooks/useViewport.ts (4:53) @ window
web:dev:  ⨯ ReferenceError: window is not defined
web:dev:     at getViewport (./src/hooks/useViewport.ts:9:56)
web:dev:     at useViewport (./src/hooks/useViewport.ts:19:85)
web:dev:     at Main (./src/components/Main.tsx:25:85)
web:dev:   2 |
web:dev:   3 | function getViewport() {
web:dev: > 4 |   const { innerWidth: width, innerHeight: height } = window ?? {
web:dev:     |                                                     ^
web:dev:   5 |     innerWidth: 0,
web:dev:   6 |     innerHeight: 0,
web:dev:   7 |   };
web:dev:  ⨯ src/hooks/useViewport.ts (4:53) @ window
web:dev:  ⨯ ReferenceError: window is not defined
web:dev:     at getViewport (./src/hooks/useViewport.ts:9:56)
web:dev:     at useViewport (./src/hooks/useViewport.ts:19:85)
web:dev:     at Main (./src/components/Main.tsx:25:85)
web:dev:   2 |
web:dev:   3 | function getViewport() {
web:dev: > 4 |   const { innerWidth: width, innerHeight: height } = window ?? {
web:dev:     |                                                     ^
web:dev:   5 |     innerWidth: 0,
web:dev:   6 |     innerHeight: 0,
web:dev:   7 |   };
web:dev:  ⨯ src/hooks/useViewport.ts (4:53) @ window
web:dev:  ⨯ ReferenceError: window is not defined
web:dev:     at getViewport (./src/hooks/useViewport.ts:9:56)
web:dev:     at useViewport (./src/hooks/useViewport.ts:19:85)
web:dev:     at Main (./src/components/Main.tsx:25:85)
web:dev:   2 |
web:dev:   3 | function getViewport() {
web:dev: > 4 |   const { innerWidth: width, innerHeight: height } = window ?? {
web:dev:     |                                                     ^
web:dev:   5 |     innerWidth: 0,
web:dev:   6 |     innerHeight: 0,
web:dev:   7 |   };

Adding button for human feedback to prioritise/sort search results

for every search, tool may suggest one or more results from database. If there are more than 1 results , is there any way for human/user/tool to prioritise results? (some kind of score).

So that next time, if same search is carried out, results are sorted by its score.

[Bug] Previous Prompt Results in Next Prompt

So I had multiple questions in sequence, but i had noticed that my previous prompt answer is coming in next prompt entered,
image
image
image

As you can see when i had asked for timeline i got nothing,
then when i asked for distributed sql i got answer of timeline of evolution,
then when i asked for evolution , i got answer for previous prompt on Distributed SQL
same happens again.

Possible Reasons to Issue

  • maybe i had entered new prompt while previous one was processing (but UI was showing no processing like)
  • something wrong with Prompt delivery

Deploy local vite conflict

I tried to deploy the project locally, but when running the bun install command, warning: incorrect peer dependency "[email protected]" appeared. This was due to the two @vitejs/plugin-react": "^4.2.1 and @crxjs /vite-plugin": "^1.0.14 caused by conflicts, how to avoid this?

Tutorial for new users

When I first logged in the only thing I knew was that I can save a webpage and ask question on it but I had no idea of other functions like what does filter do and that purple star thing for bookmark was because of supermemory (lol)

Now that I think its pretty obvious but took me some time for me to figure out
It would be great if we gave the user info about what all the feature at the beginning like a tutorial or maybe a help tab or tool tip explaining what it does

ps: i still dont know what filter does :D

An error occurred during installation....

Hello! I am a beginner. When executing the following command, I encountered an issue: "wrangler vectorize create --dimensions=1536 supermem-vector-1 --metric=cosine". During the process, there was an error message:

"✘ [ERROR] A request to the Cloudflare API (/accounts/fec07a08be890e0ad6303b98d06e74ad/vectorize/indexes) failed.

vectorize.not_entitled [code: 1005]"

What does this error message imply? If this issue arises from a mistake on my part, I apologize for any inconvenience caused, and would you kindly assist me in resolving this problem?

Find a way to avoid vector duplication

This code is mainly here https://github.com/Dhravya/supermemory/blob/5af20f7b6f2cfceed999dbd9e6244238c82a46b4/apps/cf-ai-backend/src/helper.ts#L82

Currently, we are storing a new vector for each user, in this way:
User -> saves google.com -> first, old stuff is deleted -> vector id is google.com/#supermemory-${userid} (which is then reduced to less than 63 bytes using seededRandom()) -> The page content is chunked and each chunk is saved with it's own ID to the KV. a user: userID metadata is added for retrieval.
User 2 -> saves google.com -> duplicate is made and same after that.

Instead, we want to do it in this way, so that there's no duplicates:
User 1 -> saves google.com -> vector id is google.com (which is reduced to less than 63 bytes using seededrandom()) -> Page content is chunked and each chunk is saved with vectorid-chunkid to the KV. THIS TIME, a metadata with user_${userid}: 1 should be added.

User 2 -> we use the vectorize index to get it by ID
let ids = ["11", "22", "33", "44"]; // all chunk Ids, that we can get by doing list with prefix: seededRandom(url)
const vectors = await env.VECTORIZE_INDEX.getByIds(ids);
If found, simply do env.vectorize_index.upsert with the same vector BUT this time with updated metadata (for each chunk), with the user_${userid2}: 1 added to the json. We don't need to add new documents again. I think we don't even need to update the KV again (since KV is just a lookup of our seededRandom for Url)
NOTE: we also need to change the space adding logic, by adding new keys for each space. like space-userid-spaceid: 1 format.

We would also need to update the retrieval logic in /api/chat which will mostly be the same except this time the filter for spaceid and userid is different.

Self host as API?

This is something that I've been wanting to play with for a long time.

However most implementations tend to be based on a browser extension, chrome only, using a proprietary backend or paid service. This project is exciting since the back end is included!!

Are there plans for this to be "one click" self-hostable through docker/K8's, so devs can use it as a solution and build on top of it?

Of course I understand that it could just be forked and modified to fit whatever needs someone might want for it. But improving an existing project is usually better than siloing!

discord?

Hey there - excited about this project, so far its much more robust than the other products I've tried.

Is there a discord or slack for folks who want to contribute seriously? Are you open to active development from others, and if so, how do you recommend the community goes about it?

Ratelimiter not working

Trying to deploy gives the error:

✘ [ERROR] Running configuration file validation for Pages:

- Configuration file for Pages projects does not support "unsafe"

Its due to the unsafe.binding for ratelimiter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.