Functions
FUNC generate_walk
Classes
CLASS Backend
An abstract Backend.
Methods:
FUNC generate_from_context
action: The last item of the context should be passed in as anactioninstead of as part of thectx. Seedocs/dev/generate_signature_decisions.md.ctx: The rest of the context.format: A response format to used for structured outputs / constrained decoding.model_options: Any model options to upsert into the defaults for this call.tool_calls: IfTrue, then tool calls are extracts from theactionComponent. Assumption: if tool_calls is enabled, then the actionComponenthas a TemplateRepresentation
- a tuple of (ModelOutputThunk, Context) where the Context is the new context after the generation has been completed.
FUNC generate_from_raw
FUNC generate_from_raw
FUNC generate_from_raw
actions: list of actions to generate responses for. Each action is separate.ctx: context passed to generation. Currently not used in generate_from_rawformat: A response format to used for structured outputs / constrained decoding. Note: some backends do not support this parameter. They will log warnings and continue to generate.model_options: Any model options to upsert into the defaults for this call.tool_calls: Always set to false unless supported by backend.