Skip to main content

Classes

CLASS Query

A Query component.
Methods:

FUNC parts

parts(self) -> list[Component | CBlock]
Get the parts of the query.

FUNC format_for_llm

format_for_llm(self) -> TemplateRepresentation | str
Format the query for llm.

CLASS Transform

A Transform component.
Methods:

FUNC parts

parts(self) -> list[Component | CBlock]
Get the parts of the transform.

FUNC format_for_llm

format_for_llm(self) -> TemplateRepresentation | str
Format the transform for llm.

CLASS MObjectProtocol

Protocol to describe the necessary functionality of a MObject. Implementers should prefer inheriting from MObject than MObjectProtocol.
Methods:

FUNC parts

parts(self) -> list[Component | CBlock]
Returns a list of parts for MObject.

FUNC get_query_object

get_query_object(self, query: str) -> Query
Returns the instantiated query object. Args:
  • query : The query string.

FUNC get_transform_object

get_transform_object(self, transformation: str) -> Transform
Returns the instantiated transform object. Args:
  • transformation: the transform string

FUNC content_as_string

content_as_string(self) -> str
Returns the content of MObject as a string. The default value is just str(self). Subclasses should override this method.

FUNC format_for_llm

format_for_llm(self) -> TemplateRepresentation | str
The template representation used by the formatter. The default TemplateRepresentation uses an automatic parsing for tools and fields. The content is retrieved from content_as_string().

CLASS MObject

An extension of Component for adding query and transform operations.
Methods:

FUNC parts

parts(self) -> list[Component | CBlock]
MObject has no parts because of how format_for_llm is defined.

FUNC get_query_object

get_query_object(self, query: str) -> Query
Returns the instantiated query object. Args:
  • query : The query string.

FUNC get_transform_object

get_transform_object(self, transformation: str) -> Transform
Returns the instantiated transform object. Args:
  • transformation: the transform string

FUNC content_as_string

content_as_string(self) -> str
Returns the content of MObject as a string. The default value is just str(self). Subclasses should override this method.

FUNC format_for_llm

format_for_llm(self) -> TemplateRepresentation | str
The template representation used by the formatter. The default TemplateRepresentation uses an automatic parsing for tools and fields. The content is retrieved from content_as_string().