the chat I think it may be just messages, like user assistant and so on with an optional system prompt
however that may cause issues with tool models, but let's ignore that for now
oh yeah and something to convert the Chat into something the api accepts, but I think that may be just a function
now about requests
I think that's consistent so get post etc. requests
with text or json request body
that responds with a text or json body
but how?
I think a DIY interface is the way since each (or every?) platform has a different networking implementation
we could provide a reference implementation, but I don't know
okay now about scripting
the language that scripts are written in is Groovy
which may be too powerful to be called a scripting language but whatever
so:
- we need to label scripts somehow so a record (actually an object because I want to be compatible) with name, author, version is enough
and other metadata like streaming support or billing? billing later and TODO streaming should be also a setting
- permissions... that for later, including sandboxing
- settings, oh I just came up a name "source"
but as for settings maybe just a list of label, TODO type (slider, text, choice list etc.) and value range (how with various types is for later)
- and how it actually works, like when a message is sent we just call a function with the chat object.
it should return a ChatResponse which TODO has something to stream from and some other metadata?
choice of language
lua:
I considered Lua, but I don't know, it may be simpler to beginners (not to me though) but it's not as powerful and like javascript messy, inconsistent, vague etc.
actually I just found out Lua has coroutines, so maybe I was wrong
and a few more dependencies won't hurt
other languages:
I need a runtime that's maintained and up to date with the language, that doesn't rely on native libraries, and that wouldn't take much storage
here's what claude recommended to consider: (I only edited the headers)