Closed Fermain closed 10 months ago
Hey @Fermain or @ShaindalDev, you can add me as one of the assignees on this issue :) also, will i need an API key to use molly? it is probably useful to have for testing
im somewhat new to readable stream, so correct me if im missing the target here. do we need a readableStream store with the current setup? right now stream is enabled and the front end is using EventSource to recieve data from the server.
EventSource is limited (can only use GET requests) and there is a limited length to a GET request. Using this approach with the readablestream store will allow for us to use POST requests with a longer body, i.e. more lesson context.
the backend is implemented and working, but i still need to test larger documents. How many tokens did it used to break at? i also need to add a chat history, shouldn't be too hard, but if anyone has any ideas im all ears.
For chat history something like a localstorage store would be the most sveltey way to do it.
Could use a package or construct a store file yourself: https://www.npmjs.com/package/svelte-local-storage-store
I don't have exact figures for when it used to break but I have a test lesson that fails, you can see it live here: https://mollify.noroff.dev/content/feu1/design/module-1/visual-hierarchy
Failed to load resource: the server responded with a status of 431 ()
i see, but i fear that it ends up being a lot of tokens very fast after a session of conversation, costing a lot of extra. im going to research langchain possibilities of memory first, but if i come up empty ill add a store for now :)
The current Molly backend implementation was written very quickly as an MVP and does not tolerate long contexts. This breaks it for long lessons.
Solution:
This sounds hard but I have working code to reference.