Skip to main content

Installation

First, install enochian.
Enochian supports both sglang backends and OpenAI compatible endpoints. To use it with OpenAI, intialize a ProgramState using the OpenAIBackend.
If you have access to a GPU and would like to use a local model, install and launch an sglang server:
We’re now ready to use enochian.
You can build arbitrarily complex logic in your workflows. Enochian maintains the state of your LLM calls as your javascript executes, so as long as it’s programmable in javascript Enochian can execute it.

Prompt Studio

You can optionally run it with Enochian Studio as well, a web view for the prompts being sent in. First, start the server.
Now, add a line where you want to start logging to set the debug info.
Now, let’s run our multiturn question and head over to http://localhost:56765. You should see the prompt you just submitted in the “multiTurnQuestion” section. We can see that under the hood, enochian applied the Llama-3 chat template to the prompt along with some default sampling params. We can also see the response, along with the metadata associated with it. This is all you need to do to get started writing advanced workflows for your application!