InvokerFactory#

class langchain_prompty.core.InvokerFactory[source]#

Factory for creating invokers.

Methods

__init__()

register(type, name, invoker)

register_executor(name, executor_class)

register_parser(name, parser_class)

register_processor(name, processor_class)

register_renderer(name, renderer_class)

to_dict()

to_json()

Return type:

InvokerFactory

__init__()#
register(type: Literal['renderer', 'parser', 'executor', 'processor'], name: str, invoker: Type[Invoker]) None[source]#
Parameters:
  • type (Literal['renderer', 'parser', 'executor', 'processor'])

  • name (str)

  • invoker (Type[Invoker])

Return type:

None

register_executor(name: str, executor_class: Any) None[source]#
Parameters:
  • name (str)

  • executor_class (Any)

Return type:

None

register_parser(name: str, parser_class: Any) None[source]#
Parameters:
  • name (str)

  • parser_class (Any)

Return type:

None

register_processor(name: str, processor_class: Any) None[source]#
Parameters:
  • name (str)

  • processor_class (Any)

Return type:

None

register_renderer(name: str, renderer_class: Any) None[source]#
Parameters:
  • name (str)

  • renderer_class (Any)

Return type:

None

to_dict() Dict[str, Any][source]#
Return type:

Dict[str, Any]

to_json() str[source]#
Return type:

str