Types
Monoprompt = ref object promptFilename*: string promptDir*: string filename*: string config*: MonopromptConfig prompt*: string
- structure for a monoprompt file Source Edit
MonopromptConfig = ref object model*: string context*: seq[string] depends*: seq[string] output*: MonopromptOutput
- Configuration for a monoprompt file Source Edit
MonopromptOutput = enum undef, overwrite, augment, append, noop
- What strategy to use when writing the output file Source Edit
Procs
proc execute(mp: Monoprompt) {....raises: [Exception, OSError, IOError, ZippyError, CatchableError, OpenAiError, JsonError, ValueError], tags: [ReadIOEffect, ReadDirEffect, RootEffect, WriteIOEffect], forbids: [].}
- Execute a parsed monoprompt. iterates over all the outputs in the monoprompt and executes them with the specified LLM in the config. Source Edit
proc loadConfig(content: string): MonopromptConfig {. ...raises: [Exception, Exception], tags: [], forbids: [].}
- Parse YAML-like config content and return a new MonopromptConfig object Source Edit
proc parseMonoprompt(filename, content: string): seq[Monoprompt] {. ...raises: [Exception], tags: [], forbids: [].}
- Parse the contents of a monoprompt file. file is passed as args, no fs reads or writes are done. Source Edit
proc readMonoprompt(filename: string): seq[Monoprompt] {. ...raises: [IOError, Exception], tags: [ReadIOEffect], forbids: [].}
- Read a monoprompt file and parse it Source Edit