chatcraft.org
chatcraft.org copied to clipboard
Rework chatcraft message store around the concepts in openai assistants
For reference openai assistants docs: https://platform.openai.com/docs/assistants/overview
Assistants is a verbose wrapper over chat completion api..but it's a useful way to think about openai chat abstraction.
- Lets change chatcraft backend to store message history in Threads
- instead of system prompt history, we should store assistants.
- Instead of pasting webhandlers as chat message content, they should attached as attachments to messages
- Assistants have vector stores. For now we can just treat files in vector stores and things we can attach to system prompt.
Once we have such an api, we should be able to point chatcraft at official openai assistants as backend or use it locally with indexedb as we do now and just change the schema to match that of assistants.
We might wanna use duckdb to move away from indexedb, as duckdb can import/export in compressed files, can do vector search, etc. It's only 7.6mb
https://duckdb.org/docs/api/wasm/overview.html https://shell.duckdb.org/