Source: factory.core/extend.edit/ObjConversationEdit.py
A class for editing and managing conversation
definitions via YAML import/export.
| Method | Signature | Description |
|---|---|---|
| get_conversation_json | get_conversation_json(conversation_code: str) -> JsonDictType | None |
Generates a JSON-compatible dict from |
| save_conversation_to_file | save_conversation_to_file(conversation: JsonDictType, filename: str) -> None |
Saves the conversation dict to a YAML |
| load_conversation_from_yaml | load_conversation_from_yaml(filename: str, new_conversation_code: str = '') -> None |
Loads a conversation from a YAML file |
| remove_none_values | remove_none_values(data: Any) -> Any |
Recursively removes items with None |
| remove_empty_strings | remove_empty_strings(data: Any) -> Any |
Recursively removes items with empty |
| remove_conversation_code | remove_conversation_code(data: JsonDictListType) -> JsonDictListType |
Strips the ConversationCode key from |
| remove_package | remove_package(data: Any) -> Any |
Recursively removes the Package key |
| safe_sql_insert | safe_sql_insert(sql: str, data: tuple) -> bool |
Inserts safely handling quotes. |
| generate_markdown | generate_markdown(conversation: JsonDictType) -> str |
Generates a Markdown document from a |
| generate_mermaid | generate_mermaid(pages: JsonDictListType) -> str |
Generates a Mermaid flowchart from the |
| save_markdown_to_db | save_markdown_to_db(conversation_code: str, markdown: str, mermaid: str) -> None |
Saves the Markdown and Mermaid text to |
| validate_conversation | validate_conversation(conversation: JsonDictType) -> StringListType |
Validates a conversation dict and returns |
| load_reference | load_reference(filename: str, new_conversation_code: str = '') -> None |
Loads a conversation from a YAML file |
| save_reference | save_reference(conversation_code: str, filename: str) -> None |
Saves a conversation from the database |
| get_next_version | get_next_version(conversation_code: str) -> str |
Returns the next version number for |
| set_version | set_version(conversation_code: str, version: str) -> None |
Updates the version in all three |
Saves a conversation to a YAML file.
Loads a conversation from a YAML file.
Activates a previously saved version by
Validates a conversation definition.