chatcraft.org icon indicating copy to clipboard operation
chatcraft.org copied to clipboard

Rework chatcraft message store around the concepts in openai assistants

Open tarasglek opened this issue 8 months ago • 1 comments

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.

  1. Lets change chatcraft backend to store message history in Threads
  2. instead of system prompt history, we should store assistants.
  3. Instead of pasting webhandlers as chat message content, they should attached as attachments to messages
  4. 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/

tarasglek avatar Jun 29 '24 10:06 tarasglek