memoryscope.core.operation.frontend_operation
- class memoryscope.core.operation.frontend_operation.FrontendOperation(name: str, user_name: str, target_names: List[str], chat_messages: List[List[Message]], description: str, **kwargs)[源代码]
基类:
BaseWorkflow
,BaseOperation
- operation_type: Literal['frontend', 'backend'] = 'frontend'
- __init__(name: str, user_name: str, target_names: List[str], chat_messages: List[List[Message]], description: str, **kwargs)[源代码]
Initializes a new instance of the BaseOperation.
- init_workflow(**kwargs)[源代码]
Initializes the workflow by setting up workers with provided keyword arguments.
- 参数:
**kwargs -- Arbitrary keyword arguments to be passed during worker initialization.
- run_operation(target_name: str, **kwargs)[源代码]
Executes the main operation of reading recent chat messages, initializing workflow, and returning the result of the workflow execution.
- 参数:
target_name (str) -- target_name(human name).
**kwargs -- Additional keyword arguments used in the operation context.
- 返回:
The result obtained from executing the workflow.
- 返回类型:
Any
- name: str
- memoryscope_context: MemoryscopeContext
- thread_pool: ThreadPoolExecutor
- workflow: str
- workflow_worker_list: List[List[List[str]]]
- worker_dict: Dict[str, BaseWorker | bool]
- workflow_context: Dict[str, Any]
- user_name: str
- target_names: List[str]
- description: str