Source: factory.core/ObjConversation.py
| Method | Signature | Description |
|---|---|---|
| safe_getattr | safe_getattr(attr_name: str) -> str |
|
| get_constants | get_constants(constant_name: str) -> Any |
Check def_constant DB table first, then fall back to YAML constants. |
| calculate_next_offset | calculate_next_offset() -> str |
Calculate the next pagination offset |
| get_available_langs | get_available_langs() -> list[str] |
Return a sorted list of language codes used in this conversation. |
| local_process_text | local_process_text(text: str, preserve_lang_blocks: bool = False) -> str |
|
| get_page_detail | get_page_detail(pageno: int = -1) -> Optional[ObjData.ObjData] |
|
| write | write() -> None |
|
| get_page_option | get_page_option(option: str, callback_option: Any, display_option: str = '', context_value: str = '') -> JsonDict |
|
| store_option | store_option(opts: JsonDict) -> None |
Store current page options for later |
| reset_options | reset_options() -> None |
Clear stored page options before |
| get_pagetext | get_pagetext(pageno: int = -1) -> JsonDict |
|
| data_line | data_line(request: str = '') -> str |
|
| read_intent | read_intent(opts: JsonDict, content: str) -> str |
|
| read_contact | read_contact(conversation_code: str = '', engine: str = '', contact_id: str = '') -> None |
|
| resolve_page | resolve_page(identifier: str) -> str |
Resolve a page identifier (number or name) |
| execute_reroute_workflow | execute_reroute_workflow(workflow_code: str) -> str |
Run a synchronous workflow and return param1 |
| execute_context_workflow | execute_context_workflow(workflow_code: str) -> None |
Run a workflow to populate context variables at conversation start. |
| call_ai_prompt | call_ai_prompt(prompt: str, display_data: str, context_data: str = '') -> str |
Call LLM with page data as context and return the result. |
| render_report_as_lines | render_report_as_lines(report_code: str) -> str |
Run a report and format its JSON output |
| reroute_page | reroute_page(pageno: int = -1) -> str |
|
| route_page | route_page(opts: JsonDict, select: str) -> Union[str, int] |
|
| display_context | display_context(opts: JsonDict) -> None |
|
| display_options | display_options(opts: JsonDict) -> None |
|
| display_keys | display_keys(opts: JsonDict) -> Tuple[str, str] |
|
| receive_message | receive_message(sender_guid: str, message: str) -> None |
Receive inbound message and route |
| conversation_factory | conversation_factory(engine: str = '') -> Optional[types.ModuleType] |
|
| read_conversation | read_conversation(conversation_code: str = '', contact_id: str = '', content: str = '', engine: str = 'console') -> None |
|
| journey_test | journey_test(conversation_code: str, contact_id: str = '') -> list[dict] |
BFS traversal of all reachable conversation pages. |
| Method | Signature | Description |
|---|---|---|
| read | read(conversation_code: str) -> None |
|
| recon | recon(conversation_code: str) -> None |
|
| render_flow | render_flow(conversation_code: str) -> None |
|
| display_summary | display_summary(conversation_code: str) -> None |
Fetches and displays a summary of a conversation's configuration using rich tables. |
| list_engines | list_engines() -> None |
Lists all available conversation engines. |
| trace_conversation | trace_conversation(conversation_code: str) -> None |
Display conversation state for |
| check_lang_coverage | check_lang_coverage(conversation_code: str) -> list[dict] |
Check that every [[LANG:...]] group in the conversation has a |
Displays a summary of the conversation configuration.
Lists available conversation engines.
Saves a conversation definition to a YAML file.
Loads a conversation definition from a YAML file.