CompiledPrompt

marola.llm.CompiledPrompt
See theCompiledPrompt companion object
final case class CompiledPrompt(instructions: String, demos: List[Map[String, String]], outputField: String)

Loads a DSPy-compiled prompt artifact (dspy/compile_recommendation_prompt.py produces two: recommendation_prompt.json for the summarizer, review_prompt.json for Reviewer โ€” see ARCHITECTURE.md ยง5a) and turns it into a plain chat message list any LlmClient can replay.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def buildMessages(inputs: Map[String, String]): List[ChatMessage]

inputs in the same key names as the Python Signature's InputFields (see dspy/compile_recommendation_prompt.py's INPUT_FIELDS/REVIEW_INPUT_FIELDS) โ€” snake_case, e.g. beach_name, sea_temp_c.

inputs in the same key names as the Python Signature's InputFields (see dspy/compile_recommendation_prompt.py's INPUT_FIELDS/REVIEW_INPUT_FIELDS) โ€” snake_case, e.g. beach_name, sea_temp_c.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product