from __future__ import annotations from typing import Any, Callable, List, Optional, TypedDict class ConfigSelectItem(TypedDict): label: str value: Any class PluginConfigParam(TypedDict): id: str type: str name: str description: str default: Any required: bool min: Optional[float] max: Optional[float] options: Optional[list[ConfigSelectItem]] class HookInfo(TypedDict): id: str name: str description: str class_: Callable class BaseMessage(TypedDict): role: str content: str function_call: Optional[Any] tool_calls: Optional[list] tool_call_id: Optional[str] class LLMFunctionInfo(TypedDict): name_for_llm: str name_for_human: str description: str params: dict class LLMFunctionResponse(TypedDict): response: str """The response text generated by the function.""" direct_return: bool """Directly return the response to the user, without further processing.""" OnProgressCallback = Callable[[int, int], Any]