AI Models¶
lumen.ai.models
¶
LineEdit = Annotated[InsertLine | ReplaceLine | DeleteLine, Field(discriminator='op')]
module-attribute
¶
DeleteLine
¶
EscapeBaseModel
¶
Bases:
insufficient_context = Field(description='True if lacking context, else False. If True, leave other fields empty.')
class-attribute
instance-attribute
¶
insufficient_context_reason = Field(description="If lacking sufficient context, explain why; else use ''. Do not base off the user query; only from the data context provided.", examples=['A timeseries is requested but SQL only provides customer and order data; please include a time dimension', 'The previous result is one aggregated value; try a different aggregation or more dimensions', ''])
class-attribute
instance-attribute
¶
model_post_init(__context)
¶
After model initialization, check if insufficient_context. If it is, raise a MissingContextError with the provided explanation to stop further processing.
InsertLine
¶
Bases:
line = Field(min_length=1, description='Content for the new line (must be non-empty).')
class-attribute
instance-attribute
¶
line_no = Field(ge=1, description='Insert BEFORE this 1-based line number. Use line_no == len(lines) to append at the end.')
class-attribute
instance-attribute
¶
op = 'insert'
class-attribute
instance-attribute
¶
MissingContextError
¶
Bases:
Raise to indicate missing context for a query.
PartialBaseModel
¶
Bases: ,
ReplaceLine
¶
RetrySpec
¶
Bases:
Represents a revision of text with its content and changes.