SYMBOL INDEX (2024 symbols across 230 files) FILE: kirara_ai/__main__.py function main (line 10) | def main(): FILE: kirara_ai/alembic/env.py function run_migrations_offline (line 30) | def run_migrations_offline() -> None: function run_migrations_online (line 54) | def run_migrations_online() -> None: FILE: kirara_ai/alembic/versions/4a364dbb8dab_initial_migration.py function upgrade (line 20) | def upgrade() -> None: function downgrade (line 51) | def downgrade() -> None: FILE: kirara_ai/config/config_loader.py class ConfigLoader (line 17) | class ConfigLoader: method load_config (line 25) | def load_config(config_path: str, config_class: Type[T]) -> T: method save_config (line 42) | def save_config(config_path: str, config_object: BaseModel): method save_config_with_backup (line 52) | def save_config_with_backup(config_path: str, config_object: BaseModel): function pydantic_validation_wrapper (line 65) | def pydantic_validation_wrapper(func): class ConfigJsonSchema (line 86) | class ConfigJsonSchema(GenerateJsonSchema): method sort (line 87) | def sort( FILE: kirara_ai/config/global_config.py class IMConfig (line 8) | class IMConfig(BaseModel): class ModelConfig (line 17) | class ModelConfig(BaseModel): class LLMBackendConfig (line 26) | class LLMBackendConfig(BaseModel): method migrate_models_format (line 39) | def migrate_models_format(cls, data: Dict[str, Any]) -> Dict[str, Any]: class LLMConfig (line 61) | class LLMConfig(BaseModel): class MCPServerConfig (line 66) | class MCPServerConfig(BaseModel): class MCPConfig (line 80) | class MCPConfig(BaseModel): class DefaultConfig (line 85) | class DefaultConfig(BaseModel): class MemoryPersistenceConfig (line 91) | class MemoryPersistenceConfig(BaseModel): class MemoryConfig (line 102) | class MemoryConfig(BaseModel): class WebConfig (line 108) | class WebConfig(BaseModel): class PluginConfig (line 117) | class PluginConfig(BaseModel): class UpdateConfig (line 127) | class UpdateConfig(BaseModel): class FrpcConfig (line 132) | class FrpcConfig(BaseModel): class SystemConfig (line 142) | class SystemConfig(BaseModel): class TracingConfig (line 148) | class TracingConfig(BaseModel): class MediaConfig (line 153) | class MediaConfig(BaseModel): class GlobalConfig (line 159) | class GlobalConfig(BaseModel): FILE: kirara_ai/database/manager.py class DatabaseManager (line 20) | class DatabaseManager: method __init__ (line 23) | def __init__(self, container: DependencyContainer, database_url: Optio... method initialize (line 32) | def initialize(self): method _run_migrations (line 53) | def _run_migrations(self): method get_session (line 89) | def get_session(self) -> Session: method shutdown (line 96) | def shutdown(self): FILE: kirara_ai/entry.py function check_update (line 40) | async def check_update(): function _signal_handler (line 52) | def _signal_handler(*args): function init_container (line 67) | def init_container() -> DependencyContainer: function init_memory_system (line 73) | def init_memory_system(container: DependencyContainer): function init_media_carrier (line 90) | def init_media_carrier(container: DependencyContainer): function init_tracing_system (line 96) | def init_tracing_system(container: DependencyContainer): function init_application (line 115) | def init_application() -> DependencyContainer: function run_application (line 229) | def run_application(container: DependencyContainer): FILE: kirara_ai/events/application.py class ApplicationStarted (line 2) | class ApplicationStarted: method __repr__ (line 3) | def __repr__(self): class ApplicationStopping (line 6) | class ApplicationStopping: method __repr__ (line 7) | def __repr__(self): FILE: kirara_ai/events/event_bus.py class EventBus (line 7) | class EventBus: method __init__ (line 8) | def __init__(self): method register (line 11) | def register(self, event_type: Type, listener: Callable): method unregister (line 16) | def unregister(self, event_type: Type, listener: Callable): method post (line 20) | def post(self, event): FILE: kirara_ai/events/im.py class IMEvent (line 7) | class IMEvent: method __init__ (line 8) | def __init__(self, im: "IMAdapter"): method __repr__ (line 11) | def __repr__(self): class IMAdapterStarted (line 14) | class IMAdapterStarted(IMEvent): class IMAdapterStopped (line 17) | class IMAdapterStopped(IMEvent): FILE: kirara_ai/events/listen.py function listen (line 7) | def listen(event_bus: EventBus): FILE: kirara_ai/events/llm.py class LLMAdapterEvent (line 4) | class LLMAdapterEvent: method __init__ (line 5) | def __init__(self, adapter: LLMBackendAdapter, backend_name: str): method __repr__ (line 9) | def __repr__(self): class LLMAdapterLoaded (line 12) | class LLMAdapterLoaded(LLMAdapterEvent): class LLMAdapterUnloaded (line 15) | class LLMAdapterUnloaded(LLMAdapterEvent): FILE: kirara_ai/events/plugin.py class PluginEvent (line 5) | class PluginEvent: method __init__ (line 6) | def __init__(self, plugin: Plugin): method __repr__ (line 9) | def __repr__(self): class PluginStarted (line 12) | class PluginStarted(PluginEvent): class PluginStopped (line 15) | class PluginStopped(PluginEvent): class PluginLoaded (line 18) | class PluginLoaded(PluginEvent): FILE: kirara_ai/events/tracing/base.py class TraceEvent (line 6) | class TraceEvent(abc.ABC): method __init__ (line 9) | def __init__(self, trace_id: str): method __repr__ (line 13) | def __repr__(self): class TraceStartEvent (line 17) | class TraceStartEvent(TraceEvent): class TraceCompleteEvent (line 21) | class TraceCompleteEvent(TraceEvent): class TraceFailEvent (line 25) | class TraceFailEvent(TraceEvent): FILE: kirara_ai/events/tracing/llm.py class LLMTraceEvent (line 10) | class LLMTraceEvent(TraceEvent): method __init__ (line 13) | def __init__(self, method __repr__ (line 21) | def __repr__(self): class LLMRequestStartEvent (line 25) | class LLMRequestStartEvent(LLMTraceEvent, TraceStartEvent): method __init__ (line 28) | def __init__(self, class LLMRequestCompleteEvent (line 38) | class LLMRequestCompleteEvent(LLMTraceEvent, TraceCompleteEvent): method __init__ (line 41) | def __init__(self, class LLMRequestFailEvent (line 55) | class LLMRequestFailEvent(LLMTraceEvent, TraceFailEvent): method __init__ (line 58) | def __init__(self, FILE: kirara_ai/events/workflow.py class WorkflowExecutionBegin (line 7) | class WorkflowExecutionBegin: method __init__ (line 8) | def __init__(self, workflow: Workflow, executor: WorkflowExecutor): method __repr__ (line 12) | def __repr__(self): class WorkflowExecutionEnd (line 16) | class WorkflowExecutionEnd: method __init__ (line 17) | def __init__(self, workflow: Workflow, executor: WorkflowExecutor, res... FILE: kirara_ai/im/adapter.py class BotStatus (line 14) | class BotStatus(BaseModel): class EditStateAdapter (line 23) | class EditStateAdapter(Protocol): method set_chat_editing_state (line 28) | async def set_chat_editing_state( class UserProfileAdapter (line 39) | class UserProfileAdapter(Protocol): method query_user_profile (line 44) | async def query_user_profile(self, chat_sender: ChatSender) -> UserPro... class BotProfileAdapter (line 52) | class BotProfileAdapter(Protocol): method get_bot_profile (line 57) | async def get_bot_profile(self) -> Optional[UserProfile]: class IMAdapter (line 63) | class IMAdapter(ABC): method convert_to_message (line 73) | async def convert_to_message(self, raw_message: Any) -> IMMessage: method send_message (line 81) | async def send_message(self, message: IMMessage, recipient: Any): method start (line 89) | async def start(self): method stop (line 93) | async def stop(self): FILE: kirara_ai/im/im_registry.py class IMAdapterInfo (line 8) | class IMAdapterInfo(BaseModel): class IMRegistry (line 18) | class IMRegistry: method register (line 25) | def register( method unregister (line 49) | def unregister(self, name: str): method get (line 56) | def get(self, name: str) -> Type[IMAdapter]: method get_config_class (line 67) | def get_config_class(self, name: str) -> Type[BaseModel]: method get_all_adapters (line 79) | def get_all_adapters(self) -> Dict[str, IMAdapterInfo]: FILE: kirara_ai/im/manager.py class IMManager (line 19) | class IMManager: method __init__ (line 33) | def __init__( method get_adapter_type (line 46) | def get_adapter_type(self, name: str) -> str: method has_adapter (line 54) | def has_adapter(self, name: str) -> bool: method get_adapter_config (line 62) | def get_adapter_config(self, name: str) -> IMConfig: method update_adapter_config (line 73) | def update_adapter_config(self, name: str, config: BaseModel): method delete_adapter (line 81) | def delete_adapter(self, name: str): method start_adapters (line 90) | def start_adapters(self, loop=None): method stop_adapters (line 126) | def stop_adapters(self, loop=None): method get_adapters (line 137) | def get_adapters(self) -> Dict[str, IMAdapter]: method get_adapter (line 144) | def get_adapter(self, key: str) -> IMAdapter: method _start_adapter (line 152) | async def _start_adapter(self, key: str, adapter: IMAdapter): method _stop_adapter (line 159) | async def _stop_adapter(self, key: str, adapter: IMAdapter): method stop_adapter (line 166) | def stop_adapter(self, adapter_id: str, loop: asyncio.AbstractEventLoop): method start_adapter (line 172) | def start_adapter(self, adapter_id: str, loop: asyncio.AbstractEventLo... method is_adapter_running (line 180) | def is_adapter_running(self, key: str) -> bool: method create_adapter (line 189) | def create_adapter( FILE: kirara_ai/im/message.py class MessageElement (line 16) | class MessageElement(ABC): method to_dict (line 18) | def to_dict(self): method to_plain (line 22) | def to_plain(self) -> str: class TextMessage (line 27) | class TextMessage(MessageElement): method __init__ (line 28) | def __init__(self, text: str): method to_dict (line 31) | def to_dict(self): method to_plain (line 34) | def to_plain(self): method __repr__ (line 37) | def __repr__(self): class MediaMessage (line 42) | class MediaMessage(MessageElement): method __init__ (line 48) | def __init__( method _register_media (line 102) | async def _register_media(self) -> None: method get_url (line 126) | async def get_url(self) -> str: method get_path (line 144) | async def get_path(self) -> str: method get_data (line 162) | async def get_data(self) -> bytes: method get_base64_url (line 180) | async def get_base64_url(self) -> str: method get_description (line 195) | def get_description(self) -> str: method to_dict (line 204) | def to_dict(self) -> Dict[str, Any]: class VoiceMessage (line 223) | class VoiceMessage(MediaMessage): method to_dict (line 226) | def to_dict(self): method to_plain (line 231) | def to_plain(self): class ImageMessage (line 236) | class ImageMessage(MediaMessage): method to_dict (line 239) | def to_dict(self): method to_plain (line 244) | def to_plain(self): method __repr__ (line 247) | def __repr__(self): class AtElement (line 252) | class AtElement(MessageElement): method __init__ (line 253) | def __init__(self, user_id: str, nickname: str = ""): method to_dict (line 257) | def to_dict(self): method to_plain (line 260) | def to_plain(self): method __repr__ (line 263) | def __repr__(self): class MentionElement (line 267) | class MentionElement(MessageElement): method __init__ (line 268) | def __init__(self, target: ChatSender): method to_dict (line 271) | def to_dict(self): method to_plain (line 274) | def to_plain(self): method __repr__ (line 277) | def __repr__(self): class ReplyElement (line 281) | class ReplyElement(MessageElement): method __init__ (line 283) | def __init__(self, message_id: str): method to_dict (line 286) | def to_dict(self): method to_plain (line 290) | def to_plain(self): method __repr__ (line 293) | def __repr__(self): class FileMessage (line 298) | class FileMessage(MediaMessage): method to_dict (line 301) | def to_dict(self): method to_plain (line 306) | def to_plain(self): method __repr__ (line 309) | def __repr__(self): class JsonMessage (line 314) | class JsonMessage(MessageElement): method __init__ (line 316) | def __init__(self, data: str): method to_dict (line 319) | def to_dict(self): method to_plain (line 322) | def to_plain(self): method __repr__ (line 325) | def __repr__(self): class EmojiMessage (line 330) | class EmojiMessage(MessageElement): method __init__ (line 332) | def __init__(self, face_id: str): method to_dict (line 335) | def to_dict(self): method to_plain (line 339) | def to_plain(self): method __repr__ (line 342) | def __repr__(self): class VideoMessage (line 347) | class VideoMessage(MediaMessage): method to_dict (line 350) | def to_dict(self): method to_plain (line 355) | def to_plain(self): method __repr__ (line 358) | def __repr__(self): class IMMessage (line 363) | class IMMessage: method __repr__ (line 381) | def __repr__(self): method content (line 385) | def content(self) -> str: method images (line 395) | def images(self) -> List[ImageMessage]: method voices (line 404) | def voices(self) -> List[VoiceMessage]: method __init__ (line 412) | def __init__( method to_dict (line 422) | def to_dict(self): FILE: kirara_ai/im/profile.py class Gender (line 7) | class Gender(Enum): class UserProfile (line 14) | class UserProfile(BaseModel): method __init__ (line 30) | def __init__(self, **kwargs): FILE: kirara_ai/im/sender.py class ChatType (line 6) | class ChatType(Enum): method from_str (line 11) | def from_str(cls, value: str) -> "ChatType": method to_str (line 18) | def to_str(self) -> str: class ChatSender (line 26) | class ChatSender: method from_group_chat (line 37) | def from_group_chat( method from_c2c_chat (line 54) | def from_c2c_chat( method get_bot_sender (line 66) | def get_bot_sender(cls) -> "ChatSender": method __str__ (line 74) | def __str__(self) -> str: method __eq__ (line 80) | def __eq__(self, other: Any) -> bool: method __hash__ (line 87) | def __hash__(self) -> int: FILE: kirara_ai/internal.py function set_restart_flag (line 9) | def set_restart_flag(): function get_and_reset_restart_flag (line 13) | def get_and_reset_restart_flag(): FILE: kirara_ai/ioc/container.py class DependencyContainer (line 6) | class DependencyContainer: method __init__ (line 52) | def __init__(self, parent=None): method register (line 56) | def register(self, key, value): method resolve (line 69) | def resolve(self, key: Type[T]) -> T: ... method resolve (line 72) | def resolve(self, key: Any) -> Any: ... method resolve (line 74) | def resolve(self, key: Type[T] | Any) -> T | Any: method has (line 98) | def has(self, key: Type[T] | Any) -> bool: method destroy (line 109) | def destroy(self, key: Type[T], recursive: bool = False) -> None: ... method destroy (line 112) | def destroy(self, key: Any, recursive: bool = False) -> None: ... method destroy (line 114) | def destroy(self, key: Type[T] | Any, recursive: bool = False) -> None: method scoped (line 133) | def scoped(self): class ScopedContainer (line 146) | class ScopedContainer(DependencyContainer): method __init__ (line 147) | def __init__(self, parent): method __enter__ (line 150) | def __enter__(self): method __exit__ (line 155) | def __exit__(self, exc_type, exc_value, traceback): FILE: kirara_ai/ioc/inject.py function get_all_attributes (line 8) | def get_all_attributes(cls): class Inject (line 19) | class Inject: method __init__ (line 20) | def __init__(self, container: Optional[DependencyContainer] = None): method create (line 23) | def create(self, target: type): method __call__ (line 29) | def __call__(self, target: Any): method inject_class (line 41) | def inject_class(self, cls: Type): method inject_function (line 48) | def inject_function(self, func: Callable): method inject_property (line 77) | def inject_property(self, name, cls, injecting_type, prop: Optional[pr... method find_container (line 117) | def find_container(self, args, kwargs): FILE: kirara_ai/llm/adapter.py class AutoDetectModelsProtocol (line 14) | class AutoDetectModelsProtocol(Protocol): method auto_detect_models (line 15) | async def auto_detect_models(self) -> List[ModelConfig]: ... class LLMChatProtocol (line 18) | class LLMChatProtocol(Protocol): method chat (line 19) | def chat(self, req: LLMChatRequest) -> LLMChatResponse: ... class LLMEmbeddingProtocol (line 22) | class LLMEmbeddingProtocol(Protocol): method embed (line 23) | def embed(self, req: LLMEmbeddingRequest) -> LLMEmbeddingResponse: ... class LLMReRankProtocol (line 26) | class LLMReRankProtocol(Protocol): method rerank (line 27) | def rerank(self, req: LLMReRankRequest) -> LLMReRankResponse: ... class LLMBackendAdapter (line 29) | class LLMBackendAdapter(ABC): FILE: kirara_ai/llm/format/embedding.py class LLMEmbeddingRequest (line 12) | class LLMEmbeddingRequest(BaseModel): class LLMEmbeddingResponse (line 36) | class LLMEmbeddingResponse(BaseModel): FILE: kirara_ai/llm/format/message.py class LLMChatTextContent (line 11) | class LLMChatTextContent(BaseModel): class LLMChatImageContent (line 15) | class LLMChatImageContent(BaseModel): class LLMToolCallContent (line 19) | class LLMToolCallContent(BaseModel): method convert_parameters_to_dict (line 33) | def convert_parameters_to_dict(cls, v: Optional[Union[str, dict]]) -> ... class LLMChatMessage (line 41) | class LLMChatMessage(BaseModel): method check_content_type (line 49) | def check_content_type(self) -> Self: FILE: kirara_ai/llm/format/request.py class ResponseFormat (line 8) | class ResponseFormat(BaseModel): class LLMChatRequest (line 11) | class LLMChatRequest(BaseModel): FILE: kirara_ai/llm/format/rerank.py class LLMReRankRequest (line 7) | class LLMReRankRequest(BaseModel): method check (line 34) | def check(self) -> Self: class ReRankerContent (line 39) | class ReRankerContent(BaseModel): class LLMReRankResponse (line 51) | class LLMReRankResponse(BaseModel): method sort_content (line 66) | def sort_content(self) -> Self: FILE: kirara_ai/llm/format/response.py class Message (line 9) | class Message(LLMChatMessage): class Usage (line 13) | class Usage(BaseModel): class LLMChatResponse (line 19) | class LLMChatResponse(BaseModel): FILE: kirara_ai/llm/format/tool.py class TextContent (line 6) | class TextContent(BaseModel): class MediaContent (line 10) | class MediaContent(BaseModel): class LLMToolResultContent (line 18) | class LLMToolResultContent(BaseModel): class Function (line 32) | class Function(BaseModel): method convert_arguments (line 41) | def convert_arguments(cls, v: Optional[Union[str, dict]]) -> Optional[... class ToolCall (line 44) | class ToolCall(BaseModel): class CallableWrapper (line 55) | class CallableWrapper(Generic[T]): method __init__ (line 57) | def __init__(self, func: T): method __call__ (line 60) | def __call__(self, *args, **kwargs) -> Coroutine[Any, Any, "LLMToolRes... method __deepcopy__ (line 63) | def __deepcopy__(self, memo): class ToolInputSchema (line 68) | class ToolInputSchema(BaseModel): class Tool (line 83) | class Tool(BaseModel): method serialize_invoke_func (line 106) | def serialize_invoke_func(self, invoke_func: CallableWrapper[ToolInvok... FILE: kirara_ai/llm/llm_manager.py class LLMManager (line 17) | class LLMManager: method __init__ (line 30) | def __init__( method load_config (line 46) | def load_config(self): method load_backend (line 56) | def load_backend(self, backend_name: str): method unload_backend (line 101) | async def unload_backend(self, backend_name: str): method reload_backend (line 131) | async def reload_backend(self, backend_name: str): method is_backend_available (line 139) | def is_backend_available(self, backend_name: str) -> bool: method get (line 161) | def get(self, backend_name: str) -> Optional[LLMBackendAdapter]: method get_llm (line 169) | def get_llm(self, model_id: str) -> Optional[LLMBackendAdapter]: method get_supported_models (line 184) | def get_supported_models(self, model_type: ModelType, ability: ModelAb... method get_llm_id_by_ability (line 198) | def get_llm_id_by_ability(self, ability: ModelAbility) -> Optional[str]: method get_models_by_ability (line 208) | def get_models_by_ability(self, model_type: ModelType, ability: ModelA... method get_models_by_type (line 220) | def get_models_by_type(self, model_type: ModelType) -> List[str]: FILE: kirara_ai/llm/llm_registry.py class LLMBackendRegistry (line 11) | class LLMBackendRegistry: method __init__ (line 19) | def __init__(self): method register (line 24) | def register( method get (line 44) | def get(self, adapter_type: str) -> Optional[Type[LLMBackendAdapter]]: method get_config_class (line 55) | def get_config_class(self, adapter_type: str) -> Optional[Type[BaseMod... method get_adapter_types (line 66) | def get_adapter_types(self) -> list[str]: method get_all_adapters (line 73) | def get_all_adapters(self) -> Dict[str, Type[LLMBackendAdapter]]: FILE: kirara_ai/llm/model_types.py class ModelType (line 5) | class ModelType(Enum): method from_str (line 16) | def from_str(cls, value: str) -> "ModelType": class ModelAbility (line 25) | class ModelAbility(Enum): method is_capable (line 31) | def is_capable(self, ability: int) -> bool: class LLMAbility (line 38) | class LLMAbility(ModelAbility): method is_capable (line 60) | def is_capable(self, ability: int) -> bool: class EmbeddingModelAbility (line 67) | class EmbeddingModelAbility(ModelAbility): method is_capable (line 78) | def is_capable(self, ability: int) -> bool: class ImageModelAbility (line 85) | class ImageModelAbility(ModelAbility): method is_capable (line 96) | def is_capable(self, ability: int) -> bool: class AudioModelAbility (line 102) | class AudioModelAbility(ModelAbility): method is_capable (line 113) | def is_capable(self, ability: int) -> bool: FILE: kirara_ai/logger.py class LogBroadcaster (line 56) | class LogBroadcaster: method __new__ (line 64) | def __new__(cls): method __init__ (line 72) | def __init__(self): method _setup_log_handler (line 78) | def _setup_log_handler(self): method _broadcast_log (line 111) | def _broadcast_log(self, log_entry: Dict): method subscribe (line 125) | def subscribe(self, callback: LogBroadcasterCallback) -> int: method unsubscribe (line 136) | def unsubscribe(self, subscriber_id: int) -> bool: method send_recent_logs (line 147) | def send_recent_logs(self, callback: LogBroadcasterCallback): class WebSocketLogHandler (line 155) | class WebSocketLogHandler: method add_websocket (line 162) | def add_websocket(cls, ws, loop: asyncio.AbstractEventLoop): method remove_websocket (line 182) | def remove_websocket(cls, ws): function init_log_broadcaster (line 193) | def init_log_broadcaster(): function get_logger (line 199) | def get_logger(tag: str): class HypercornLoggerWrapper (line 208) | class HypercornLoggerWrapper: method __init__ (line 209) | def __init__(self, logger): method critical (line 212) | def critical(self, message: str, *args: Any, **kwargs: Any) -> None: method error (line 215) | def error(self, message: str, *args: Any, **kwargs: Any) -> None: method warning (line 218) | def warning(self, message: str, *args: Any, **kwargs: Any) -> None: method info (line 221) | def info(self, message: str, *args: Any, **kwargs: Any) -> None: method debug (line 226) | def debug(self, message: str, *args: Any, **kwargs: Any) -> None: method exception (line 229) | def exception(self, message: str, *args: Any, **kwargs: Any) -> None: method log (line 232) | def log(self, level: int, message: str, *args: Any, **kwargs: Any) -> ... function get_async_logger (line 236) | def get_async_logger(tag: str): FILE: kirara_ai/mcp_module/manager.py class ToolCacheEntry (line 19) | class ToolCacheEntry(NamedTuple): class MCPServerManager (line 25) | class MCPServerManager: method __init__ (line 28) | def __init__(self, container: DependencyContainer): method load_servers (line 37) | def load_servers(self): method load_server (line 46) | def load_server(self, server_config: MCPServerConfig) -> MCPServer: method get_all_servers (line 53) | def get_all_servers(self) -> Dict[str, MCPServer]: method get_server (line 57) | def get_server(self, server_id: str) -> Optional[MCPServer]: method is_server_id_available (line 61) | def is_server_id_available(self, server_id: str) -> bool: method get_statistics (line 75) | def get_statistics(self) -> Dict[str, int]: method connect_all_servers (line 92) | def connect_all_servers(self, loop: asyncio.AbstractEventLoop): method connect_server (line 108) | async def connect_server(self, server_id: str) -> bool: method disconnect_all_servers (line 143) | def disconnect_all_servers(self, loop: asyncio.AbstractEventLoop): method stop_server (line 157) | async def stop_server(self, server_id: str) -> bool: method _update_tools_cache (line 189) | async def _update_tools_cache(self, server_id: str) -> bool: method _remove_server_tools_from_cache (line 239) | def _remove_server_tools_from_cache(self, server_id: str): method get_tools (line 255) | def get_tools(self) -> Dict[str, ToolCacheEntry]: method get_tool_server (line 262) | def get_tool_server(self, tool_name: str) -> Optional[Tuple[MCPServer,... method call_tool (line 282) | async def call_tool(self, tool_name: str, tool_args: dict) -> Optional... method _update_prompts_cache (line 312) | async def _update_prompts_cache(self, server_id: str) -> bool: method get_prompt_list (line 346) | async def get_prompt_list(self, server_id: str) -> Optional[list[types... method get_prompt (line 362) | async def get_prompt(self, server_id: str, prompt_name: str, prompt_ar... method _update_resources_cache (line 372) | async def _update_resources_cache(self, server_id: str) -> bool: method get_resource_list (line 406) | async def get_resource_list(self, server_id: str) -> Optional[list[typ... method get_resource (line 421) | async def get_resource(self, server_id: str, uri: str) -> Optional[typ... method _handle_server_message (line 438) | async def _handle_server_message(self, server_id: str, message: Reques... FILE: kirara_ai/mcp_module/models.py class MCPConnectionState (line 4) | class MCPConnectionState(Enum): FILE: kirara_ai/mcp_module/server.py class MCPServer (line 19) | class MCPServer: method __init__ (line 32) | def __init__(self, server_config: MCPServerConfig): method connect (line 48) | async def connect(self): method disconnect (line 88) | async def disconnect(self): method _lifecycle_manager (line 123) | async def _lifecycle_manager(self): method get_tools (line 183) | async def get_tools(self) -> types.ListToolsResult: method call_tool (line 188) | async def call_tool(self, tool_name: str, tool_args: Optional[dict] = ... method complete (line 202) | async def complete(self, prompt: str, tool_args: dict): method get_prompt (line 218) | async def get_prompt(self, prompt_name: str, prompt_args: dict[str, st... method list_prompts (line 232) | async def list_prompts(self) -> types.ListPromptsResult: method list_resources (line 239) | async def list_resources(self) -> types.ListResourcesResult: method list_resource_templates (line 244) | async def list_resource_templates(self) -> types.ListResourceTemplates... method read_resource (line 249) | async def read_resource(self, uri: str) -> types.ReadResourceResult: method subscribe_resource (line 262) | async def subscribe_resource(self, uri: str) -> types.EmptyResult: method unsubscribe_resource (line 275) | async def unsubscribe_resource(self, uri: str) -> types.EmptyResult: method message_handler_callback (line 288) | async def message_handler_callback( method list_client_roots_callback (line 305) | async def list_client_roots_callback(self, ctx) -> types.ListRootsResu... method send_ping (line 318) | async def send_ping(self) -> None: method send_notification (line 322) | async def send_notification(self, notification: types.ClientNotificati... method sampling_callback (line 334) | async def sampling_callback(self): method logging_callback (line 338) | async def logging_callback(self): FILE: kirara_ai/media/carrier/provider.py class MediaReferenceProvider (line 6) | class MediaReferenceProvider(ABC, Generic[T]): method get_reference_owner (line 10) | def get_reference_owner(self, reference_key: str) -> Optional[T]: FILE: kirara_ai/media/carrier/registry.py class MediaCarrierRegistry (line 8) | class MediaCarrierRegistry: method __init__ (line 11) | def __init__(self, container: DependencyContainer): method register (line 15) | def register(self, provider_name: str, provider_instance: MediaReferen... method unregister (line 19) | def unregister(self, provider_name: str) -> None: method get_provider (line 24) | def get_provider(self, provider_name: str) -> MediaReferenceProvider: method get_all_providers (line 30) | def get_all_providers(self) -> Dict[str, MediaReferenceProvider]: FILE: kirara_ai/media/carrier/service.py class MediaCarrierService (line 10) | class MediaCarrierService: method __init__ (line 13) | def __init__(self, container: DependencyContainer, media_manager: Medi... method _build_reference_index (line 21) | def _build_reference_index(self) -> None: method register_reference (line 33) | def register_reference(self, media_id: str, provider_name: str, refere... method remove_reference (line 48) | def remove_reference(self, media_id: str, provider_name: str, referenc... method get_reference_owner (line 64) | def get_reference_owner(self, reference_key: str) -> Optional[Any]: method get_media_by_reference (line 76) | def get_media_by_reference(self, provider_name: str, reference_key: st... method get_references_by_media (line 89) | def get_references_by_media(self, media_id: str) -> List[Tuple[str, st... method cleanup_orphaned_references (line 104) | def cleanup_orphaned_references(self) -> int: FILE: kirara_ai/media/manager.py class MediaManager (line 25) | class MediaManager: method __init__ (line 28) | def __init__(self, media_dir: str = "data/media"): method _load_all_metadata (line 45) | def _load_all_metadata(self) -> None: method _save_metadata (line 56) | def _save_metadata(self, metadata: MediaMetadata) -> None: method _get_file_path (line 63) | def _get_file_path(self, media_id: str, format: str) -> Path: method _create_task (line 67) | def _create_task(self, coro, name=None, loop=None): method _save_file_async (line 76) | async def _save_file_async(self, data: bytes, target_path: Path): method _download_file_async (line 81) | async def _download_file_async(self, url: str) -> bytes: method _download_file_sync (line 95) | def _download_file_sync(self, url: str) -> bytes: method register_media (line 109) | async def register_media( method register_from_path (line 216) | async def register_from_path( method register_from_url (line 238) | async def register_from_url( method register_from_data (line 255) | async def register_from_data( method add_reference (line 276) | def add_reference(self, media_id: str, reference_id: str) -> None: method remove_reference (line 285) | def remove_reference(self, media_id: str, reference_id: str) -> None: method delete_media (line 301) | def delete_media(self, media_id: str) -> None: method update_metadata (line 324) | def update_metadata( method add_tags (line 356) | def add_tags(self, media_id: str, tags: List[str]) -> None: method remove_tags (line 368) | def remove_tags(self, media_id: str, tags: List[str]) -> None: method get_metadata (line 380) | def get_metadata(self, media_id: str) -> Optional[MediaMetadata]: method ensure_file_exists (line 384) | async def ensure_file_exists(self, media_id: str) -> Optional[Path]: method get_file_path (line 466) | async def get_file_path(self, media_id: str) -> Optional[Path]: method get_data (line 480) | async def get_data(self, media_id: str) -> Optional[bytes]: method get_url (line 505) | async def get_url(self, media_id: str) -> Optional[str]: method get_base64_url (line 524) | async def get_base64_url(self, media_id: str) -> Optional[str]: method search_by_tags (line 539) | def search_by_tags(self, tags: List[str], match_all: bool = False) -> ... method search_by_description (line 555) | def search_by_description(self, query: str) -> List[str]: method search_by_source (line 565) | def search_by_source(self, source: str) -> List[str]: method search_by_type (line 575) | def search_by_type(self, media_type: MediaType) -> List[str]: method get_all_media_ids (line 585) | def get_all_media_ids(self) -> List[str]: method cleanup_unreferenced (line 589) | def cleanup_unreferenced(self) -> int: method create_media_message (line 598) | async def create_media_message(self, media_id: str) -> Optional["Media... method get_media (line 616) | def get_media(self, media_id: str) -> Optional["Media"]: method __new__ (line 623) | def __new__(cls, *args, **kwargs) -> "MediaManager": method setup_cleanup_task (line 629) | def setup_cleanup_task(self, container: DependencyContainer): FILE: kirara_ai/media/media_object.py class Media (line 12) | class Media: method __init__ (line 17) | def __init__(self, media_id: str, media_manager: MediaManager): method media_type (line 31) | def media_type(self) -> MediaType: method format (line 36) | def format(self) -> str: method size (line 41) | def size(self) -> Optional[int]: method description (line 46) | def description(self) -> Optional[str]: method description (line 51) | def description(self, value: str) -> None: method tags (line 56) | def tags(self) -> List[str]: method mime_type (line 62) | def mime_type(self) -> str: method add_tags (line 66) | def add_tags(self, tags: List[str]) -> None: method remove_tags (line 70) | def remove_tags(self, tags: List[str]) -> None: method add_reference (line 74) | def add_reference(self, reference_id: str) -> None: method remove_reference (line 78) | def remove_reference(self, reference_id: str) -> None: method get_file_path (line 82) | async def get_file_path(self) -> Path: method get_data (line 88) | async def get_data(self) -> bytes: method get_base64 (line 94) | async def get_base64(self) -> str: method get_url (line 100) | async def get_url(self) -> str: method get_base64_url (line 106) | async def get_base64_url(self) -> str: method create_message (line 110) | async def create_message(self) -> "MediaMessage": method __str__ (line 116) | def __str__(self) -> str: method __repr__ (line 122) | def __repr__(self) -> str: FILE: kirara_ai/media/metadata.py class MediaMetadata (line 7) | class MediaMetadata: method __init__ (line 10) | def __init__( method to_dict (line 36) | def to_dict(self) -> Dict[str, Any]: method mime_type (line 63) | def mime_type(self) -> str: method from_dict (line 68) | def from_dict(cls, data: Dict[str, Any]) -> 'MediaMetadata': FILE: kirara_ai/media/types/media_type.py class MediaType (line 4) | class MediaType(Enum): method from_mime (line 12) | def from_mime(cls, mime_type: str) -> 'MediaType': FILE: kirara_ai/media/utils/mime.py function detect_mime_type (line 16) | def detect_mime_type(data: Optional[bytes] = None, path: Optional[str] =... FILE: kirara_ai/memory/composes/base.py class MemoryComposer (line 15) | class MemoryComposer(ABC): method compose (line 21) | def compose( class MemoryDecomposer (line 27) | class MemoryDecomposer(ABC): method decompose (line 33) | def decompose(self, entries: List[MemoryEntry]) -> List[ComposableMess... method empty_message (line 37) | def empty_message(self) -> ComposableMessageType: FILE: kirara_ai/memory/composes/builtin_composes.py class DefaultMemoryComposer (line 16) | class DefaultMemoryComposer(MemoryComposer): method __init__ (line 17) | def __init__(self): method compose (line 20) | def compose( class DefaultMemoryDecomposer (line 59) | class DefaultMemoryDecomposer(MemoryDecomposer): method __init__ (line 60) | def __init__(self): method decompose (line 63) | def decompose(self, entries: List[MemoryEntry]) -> List[ComposableMess... class MultiElementDecomposer (line 77) | class MultiElementDecomposer(MemoryDecomposer): method __init__ (line 80) | def __init__(self): method decompose (line 83) | def decompose(self, entries: List[MemoryEntry]) -> List[Union[IMMessag... FILE: kirara_ai/memory/composes/composer_strategy.py function drop_think_part (line 14) | def drop_think_part(text: str) -> str: class MessageProcessor (line 20) | class MessageProcessor(ABC): method __init__ (line 23) | def __init__(self, container: DependencyContainer): method process (line 27) | def process(self, message: Any, context: Dict) -> str: class TextMessageProcessor (line 31) | class TextMessageProcessor(MessageProcessor): method process (line 34) | def process(self, message: TextMessage, context: Dict) -> str: class MediaMessageProcessor (line 38) | class MediaMessageProcessor(MessageProcessor): method process (line 41) | def process(self, message: MediaMessage, context: Dict) -> str: class LLMChatTextContentProcessor (line 50) | class LLMChatTextContentProcessor(MessageProcessor): method process (line 53) | def process(self, content: LLMChatTextContent, context: Dict) -> str: class LLMChatImageContentProcessor (line 57) | class LLMChatImageContentProcessor(MessageProcessor): method process (line 60) | def process(self, content: LLMChatImageContent, context: Dict) -> str: class LLMToolCallContentProcessor (line 72) | class LLMToolCallContentProcessor(MessageProcessor): method process (line 75) | def process(self, content: LLMToolCallContent, context: Dict) -> str: class LLMToolResultContentProcessor (line 86) | class LLMToolResultContentProcessor(MessageProcessor): method process (line 89) | def process(self, content: LLMToolResultContent, context: Dict) -> str: class IMMessageProcessor (line 122) | class IMMessageProcessor(MessageProcessor): method __init__ (line 125) | def __init__(self, container: DependencyContainer): method process (line 132) | def process(self, message: IMMessage, context: Dict) -> str: class LLMChatMessageProcessor (line 146) | class LLMChatMessageProcessor(MessageProcessor): method __init__ (line 149) | def __init__(self, container: DependencyContainer): method process (line 158) | def process(self, message: LLMChatMessage, context: Dict) -> str: class ProcessorFactory (line 179) | class ProcessorFactory: method __init__ (line 182) | def __init__(self, container: DependencyContainer): method get_processor (line 189) | def get_processor(self, message_type: Type) -> Optional[MessageProcess... FILE: kirara_ai/memory/composes/decomposer_strategy.py class ContentInfo (line 15) | class ContentInfo(NamedTuple): class ContentParseStrategy (line 24) | class ContentParseStrategy(Protocol): method extract_content (line 27) | def extract_content(self, content: str, entry: MemoryEntry) -> List[Co... method to_llm_content (line 31) | def to_llm_content(self, info: ContentInfo) -> LLMChatContentPartType: method to_text (line 35) | def to_text(self, info: ContentInfo) -> str: class TextContentStrategy (line 40) | class TextContentStrategy: method extract_content (line 43) | def extract_content(self, content: str, entry: MemoryEntry) -> List[Co... method to_llm_content (line 83) | def to_llm_content(self, info: ContentInfo) -> LLMChatContentPartType: method to_text (line 86) | def to_text(self, info: ContentInfo) -> str: class MediaContentStrategy (line 90) | class MediaContentStrategy: method __init__ (line 93) | def __init__(self): method extract_content (line 96) | def extract_content(self, content: str, entry: MemoryEntry) -> List[Co... method to_llm_content (line 115) | def to_llm_content(self, info: ContentInfo) -> LLMChatContentPartType: method to_text (line 118) | def to_text(self, info: ContentInfo) -> str: class ToolCallContentStrategy (line 122) | class ToolCallContentStrategy: method extract_content (line 125) | def extract_content(self, content: str, entry: MemoryEntry) -> List[Co... method to_llm_content (line 151) | def to_llm_content(self, info: ContentInfo) -> LLMChatContentPartType: method to_text (line 154) | def to_text(self, info: ContentInfo) -> str: class ToolResultContentStrategy (line 158) | class ToolResultContentStrategy: method extract_content (line 161) | def extract_content(self, content: str, entry: MemoryEntry) -> List[Co... method to_llm_content (line 187) | def to_llm_content(self, info: ContentInfo) -> LLMChatContentPartType: method to_text (line 190) | def to_text(self, info: ContentInfo) -> str: class ContentParser (line 194) | class ContentParser: method __init__ (line 197) | def __init__(self): method parse_content (line 205) | def parse_content(self, content: str, entry: MemoryEntry) -> List[Cont... method to_llm_message (line 216) | def to_llm_message(self, content_infos: List[ContentInfo], role: RoleT... method to_text (line 263) | def to_text(self, content_infos: List[ContentInfo]) -> str: class DefaultDecomposerStrategy (line 273) | class DefaultDecomposerStrategy: method __init__ (line 276) | def __init__(self): method decompose (line 279) | def decompose(self, entries: List[MemoryEntry], context: Dict[str, Any... method _get_time_str (line 321) | def _get_time_str(self, time_diff: timedelta) -> str: class MultiElementDecomposerStrategy (line 333) | class MultiElementDecomposerStrategy: method __init__ (line 336) | def __init__(self): method decompose (line 339) | def decompose(self, entries: List[MemoryEntry], context: Dict[str, Any... method _process_entry (line 353) | def _process_entry(self, entry: MemoryEntry) -> List[LLMChatMessage]: method _merge_adjacent_messages (line 389) | def _merge_adjacent_messages(self, messages: List[LLMChatMessage]) -> ... FILE: kirara_ai/memory/composes/xml_helper.py class XMLHelper (line 5) | class XMLHelper: method escape_xml_attr (line 9) | def escape_xml_attr(text: str) -> str: method unescape_xml_attr (line 16) | def unescape_xml_attr(text: str) -> str: method create_xml_tag (line 21) | def create_xml_tag(tag_name: str, attributes: Dict[str, Optional[str]]... method parse_xml_tag (line 30) | def parse_xml_tag(content: str, tag_name: str) -> List[Tuple[Dict[str,... method get_attr (line 46) | def get_attr(attrs: Dict[str, Optional[str]], key: str, default: Optio... FILE: kirara_ai/memory/entry.py class MemoryEntry (line 9) | class MemoryEntry: FILE: kirara_ai/memory/memory_manager.py class MemoryManager (line 19) | class MemoryManager(MediaReferenceProvider[List[MemoryEntry]]): method __init__ (line 22) | def __init__( method _init_persistence (line 49) | def _init_persistence(self): method register_scope (line 64) | def register_scope(self, name: str, scope_class: Type[MemoryScope]): method register_composer (line 68) | def register_composer(self, name: str, composer_class: Type[MemoryComp... method register_decomposer (line 72) | def register_decomposer(self, name: str, decomposer_class: Type[Memory... method store (line 76) | def store(self, scope: MemoryScope, entry: MemoryEntry, extra_identifi... method query (line 100) | def query(self, scope: MemoryScope, sender: ChatSender, extra_identifi... method shutdown (line 121) | def shutdown(self): method clear_memory (line 130) | def clear_memory(self, scope: MemoryScope, sender: ChatSender) -> None: method get_reference_owner (line 148) | def get_reference_owner(self, reference_key: str) -> Optional[List[Mem... method _register_media_reference (line 154) | def _register_media_reference(self, entry: MemoryEntry, reference_key:... method _remove_media_references (line 160) | def _remove_media_references(self, removed_entries: List[MemoryEntry],... FILE: kirara_ai/memory/persistences/base.py class MemoryPersistence (line 10) | class MemoryPersistence(ABC): method save (line 14) | def save(self, scope_key: str, entries: List[MemoryEntry]) -> None: method load (line 18) | def load(self, scope_key: str) -> List[MemoryEntry]: method flush (line 22) | def flush(self) -> None: class AsyncMemoryPersistence (line 26) | class AsyncMemoryPersistence: method __init__ (line 29) | def __init__(self, persistence: MemoryPersistence): method _worker (line 36) | def _worker(self): method load (line 49) | def load(self, scope_key: str) -> List[MemoryEntry]: method save (line 52) | def save(self, scope_key: str, entries: List[MemoryEntry]): method stop (line 55) | def stop(self): FILE: kirara_ai/memory/persistences/codecs.py class MemoryJSONEncoder (line 9) | class MemoryJSONEncoder(json.JSONEncoder): method default (line 10) | def default(self, obj): function memory_json_decoder (line 40) | def memory_json_decoder(obj): FILE: kirara_ai/memory/persistences/file_persistence.py class FileMemoryPersistence (line 12) | class FileMemoryPersistence(MemoryPersistence): method __init__ (line 15) | def __init__(self, data_dir: str): method _get_file_path (line 22) | def _get_file_path(self, scope_key: str) -> str: method save (line 26) | def save(self, scope_key: str, entries: List[MemoryEntry]) -> None: method load (line 50) | def load(self, scope_key: str) -> List[MemoryEntry]: method flush (line 74) | def flush(self) -> None: FILE: kirara_ai/memory/persistences/redis_persistence.py class RedisMemoryPersistence (line 11) | class RedisMemoryPersistence(MemoryPersistence): method __init__ (line 14) | def __init__( method save (line 28) | def save(self, scope_key: str, entries: List[MemoryEntry]) -> None: method load (line 46) | def load(self, scope_key: str) -> List[MemoryEntry]: method flush (line 68) | def flush(self) -> None: FILE: kirara_ai/memory/registry.py class Registry (line 9) | class Registry: method __init__ (line 15) | def __init__(self, container: DependencyContainer): method register (line 19) | def register(self, name: str, cls: Type) -> None: method unregister (line 23) | def unregister(self, name: str) -> None: class ScopeRegistry (line 29) | class ScopeRegistry(Registry): method get_scope (line 32) | def get_scope(self, name: str) -> MemoryScope: class ComposerRegistry (line 39) | class ComposerRegistry(Registry): method get_composer (line 42) | def get_composer(self, name: str) -> MemoryComposer: class DecomposerRegistry (line 49) | class DecomposerRegistry(Registry): method get_decomposer (line 52) | def get_decomposer(self, name: str) -> MemoryDecomposer: FILE: kirara_ai/memory/scopes/base.py class MemoryScope (line 6) | class MemoryScope(ABC): method get_scope_key (line 10) | def get_scope_key(self, sender: ChatSender) -> str: method is_in_scope (line 14) | def is_in_scope(self, target_sender: ChatSender, query_sender: ChatSen... FILE: kirara_ai/memory/scopes/builtin_scopes.py class MemberScope (line 7) | class MemberScope(MemoryScope): method get_scope_key (line 10) | def get_scope_key(self, sender: ChatSender) -> str: method is_in_scope (line 16) | def is_in_scope(self, target_sender: ChatSender, query_sender: ChatSen... class GroupScope (line 29) | class GroupScope(MemoryScope): method get_scope_key (line 32) | def get_scope_key(self, sender: ChatSender) -> str: method is_in_scope (line 38) | def is_in_scope(self, target_sender: ChatSender, query_sender: ChatSen... class GlobalScope (line 48) | class GlobalScope(MemoryScope): method get_scope_key (line 51) | def get_scope_key(self, sender: ChatSender) -> str: method is_in_scope (line 54) | def is_in_scope(self, target_sender: ChatSender, query_sender: ChatSen... FILE: kirara_ai/plugin_manager/models.py class PluginInfo (line 6) | class PluginInfo(BaseModel): FILE: kirara_ai/plugin_manager/plugin.py class Plugin (line 10) | class Plugin(ABC): method on_load (line 35) | def on_load(self): method on_start (line 39) | def on_start(self): method on_stop (line 43) | def on_stop(self): FILE: kirara_ai/plugin_manager/plugin_event_bus.py class PluginEventBus (line 6) | class PluginEventBus: method __init__ (line 7) | def __init__(self, event_bus: EventBus): method register (line 11) | def register(self, event_type: Type, listener: Callable): method unregister (line 15) | def unregister(self, event_type: Type, listener: Callable): method post (line 18) | def post(self, event): method unregister_all (line 21) | def unregister_all(self): FILE: kirara_ai/plugin_manager/plugin_loader.py class PluginLoader (line 18) | class PluginLoader: method __init__ (line 19) | def __init__(self, container: DependencyContainer, plugin_dir: str): method register_plugin (line 30) | def register_plugin(self, plugin_class: Type[Plugin], plugin_name: Opt... method discover_internal_plugins (line 51) | def discover_internal_plugins(self, plugin_dir=None): method load_plugin (line 71) | def load_plugin(self, plugin_name: str): method _load_internal_plugin (line 82) | def _load_internal_plugin(self, plugin_name: str): method _load_external_plugin (line 110) | def _load_external_plugin(self, plugin_name: str): method instantiate_plugin (line 151) | def instantiate_plugin(self, plugin_class): method load_plugins (line 159) | def load_plugins(self): method start_plugins (line 172) | def start_plugins(self): method stop_plugins (line 186) | def stop_plugins(self): method get_plugin_info (line 201) | def get_plugin_info(self, plugin_name: str) -> Optional[PluginInfo]: method get_all_plugin_infos (line 205) | def get_all_plugin_infos(self) -> List[PluginInfo]: method install_plugin (line 209) | async def install_plugin( method uninstall_plugin (line 263) | async def uninstall_plugin(self, plugin_name: str) -> bool: method enable_plugin (line 322) | async def enable_plugin(self, plugin_name: str) -> bool: method disable_plugin (line 356) | async def disable_plugin(self, plugin_name: str) -> bool: method update_plugin (line 391) | async def update_plugin(self, plugin_name: str, new_package_name: Opti... method discover_external_plugins (line 465) | def discover_external_plugins(self): FILE: kirara_ai/plugin_manager/utils.py function get_package_metadata (line 5) | def get_package_metadata(package_name: str) -> Optional[Dict[str, Any]]: FILE: kirara_ai/plugins/bundled_frpc/__init__.py class FrpcPlugin (line 14) | class FrpcPlugin(Plugin): method __init__ (line 23) | def __init__(self): method on_load (line 26) | def on_load(self): method on_start (line 35) | def on_start(self): method on_stop (line 46) | def on_stop(self): FILE: kirara_ai/plugins/bundled_frpc/frpc_manager.py class FrpcManager (line 24) | class FrpcManager: method __init__ (line 27) | def __init__(self, global_config: GlobalConfig): method download_frpc (line 53) | async def download_frpc(self, progress_callback: Optional[Callable[[fl... method _get_frpc_version (line 180) | def _get_frpc_version(self): method _generate_config (line 198) | def _generate_config(self, web_port: int) -> bool: method start_frpc (line 249) | def start_frpc(self, web_port: int) -> bool: method stop_frpc (line 310) | def stop_frpc(self) -> bool: method _calculate_remote_url (line 336) | def _calculate_remote_url(self): method get_status (line 345) | def get_status(self) -> Tuple[bool, str, str, str, float]: method is_installed (line 371) | def is_installed(self) -> bool: FILE: kirara_ai/plugins/bundled_frpc/models.py class FrpcStatus (line 8) | class FrpcStatus(BaseModel): class FrpcConfigUpdate (line 19) | class FrpcConfigUpdate(BaseModel): class FrpcDownloadProgress (line 28) | class FrpcDownloadProgress(BaseModel): FILE: kirara_ai/plugins/bundled_frpc/routes.py function get_status (line 17) | async def get_status(): function update_config (line 38) | async def update_config(): function start_frpc (line 88) | async def start_frpc(): function stop_frpc (line 119) | async def stop_frpc(): function download_frpc (line 149) | async def download_frpc(): FILE: kirara_ai/plugins/im_http_legacy_adapter/__init__.py class HttpLegacyAdapterPlugin (line 12) | class HttpLegacyAdapterPlugin(Plugin): method __init__ (line 16) | def __init__(self): method on_load (line 19) | def on_load(self): method on_start (line 33) | def on_start(self): method on_stop (line 36) | def on_stop(self): FILE: kirara_ai/plugins/im_http_legacy_adapter/adapter.py class HttpLegacyConfig (line 23) | class HttpLegacyConfig(BaseModel): class ResponseResult (line 35) | class ResponseResult: method __init__ (line 36) | def __init__(self, message=None, voice=None, image=None, result_status... method to_dict (line 52) | def to_dict(self): method pop_all (line 60) | def pop_all(self): class MessageHandler (line 66) | class MessageHandler(Protocol): method __call__ (line 67) | async def __call__(self, message: IMMessage) -> None: ... class V2Request (line 70) | class V2Request: method __init__ (line 71) | def __init__(self, session_id: str, username: str, message: str, reque... class HttpLegacyAdapter (line 81) | class HttpLegacyAdapter(IMAdapter): method __init__ (line 87) | def __init__(self, config: HttpLegacyConfig): method convert_to_message (line 93) | async def convert_to_message(self, raw_message: Any) -> IMMessage: method handle_message_elements (line 119) | async def handle_message_elements(self, result: ResponseResult, messag... method verify_api_key (line 128) | def verify_api_key(self, request: Request) -> bool: method create_auth_error_response (line 140) | def create_auth_error_response(self): method setup_routes (line 148) | def setup_routes(self, target_app=None): method send_message (line 228) | async def send_message(self, message: IMMessage, recipient: ChatSender): method is_standalone (line 233) | def is_standalone(self): method _start_standalone_server (line 236) | async def _start_standalone_server(self): method start (line 255) | async def start(self): method cleanup_expired_requests (line 277) | async def cleanup_expired_requests(self): method stop (line 290) | async def stop(self): FILE: kirara_ai/plugins/im_http_legacy_adapter/tests/api_test.py class FakeWorkflowDispatcher (line 24) | class FakeWorkflowDispatcher(WorkflowDispatcher): method dispatch (line 25) | async def dispatch(self, source: IMAdapter, message: IMMessage): function config (line 30) | def config(): function adapter (line 35) | def adapter(config): function test_chat_endpoint (line 49) | async def test_chat_endpoint(adapter): function test_response_result (line 73) | async def test_response_result(): function test_adapter_lifecycle (line 94) | async def test_adapter_lifecycle(adapter): FILE: kirara_ai/plugins/im_qqbot_adapter/__init__.py class QQBotAdapterPlugin (line 13) | class QQBotAdapterPlugin(Plugin): method __init__ (line 16) | def __init__(self): method on_load (line 19) | def on_load(self): method on_start (line 33) | def on_start(self): method on_stop (line 36) | def on_stop(self): FILE: kirara_ai/plugins/im_qqbot_adapter/adapter.py function make_webhook_url (line 27) | def make_webhook_url(): function auto_generate_webhook_url (line 31) | def auto_generate_webhook_url(s: dict): class QQBotConfig (line 37) | class QQBotConfig(BaseModel): function patched_post_file (line 55) | async def patched_post_file( class QQBotAdapter (line 80) | class QQBotAdapter(botpy.WebHookClient, IMAdapter, BotProfileAdapter): method __init__ (line 89) | def __init__(self, config: QQBotConfig): method convert_to_message (line 102) | async def convert_to_message(self, raw_message: ymbotpy.message.BaseMe... method send_message (line 141) | async def send_message(self, message: IMMessage, recipient: ChatSender): method on_c2c_message_create (line 236) | async def on_c2c_message_create(self, message: ymbotpy.message.C2CMess... method on_group_at_message_create (line 245) | async def on_group_at_message_create(self, message: ymbotpy.message.Gr... method get_bot_profile (line 257) | async def get_bot_profile(self) -> Optional[UserProfile]: method start (line 271) | async def start(self): method stop (line 293) | async def stop(self): FILE: kirara_ai/plugins/im_telegram_adapter/__init__.py class TelegramAdapterPlugin (line 13) | class TelegramAdapterPlugin(Plugin): method __init__ (line 16) | def __init__(self): method on_load (line 19) | def on_load(self): method on_start (line 34) | def on_start(self): method on_stop (line 37) | def on_stop(self): FILE: kirara_ai/plugins/im_telegram_adapter/adapter.py function get_display_name (line 21) | def get_display_name(user: User | ChatFullInfo): class TelegramConfig (line 30) | class TelegramConfig(BaseModel): method __repr__ (line 38) | def __repr__(self): class TelegramAdapter (line 42) | class TelegramAdapter(IMAdapter, UserProfileAdapter, EditStateAdapter, B... method __init__ (line 48) | def __init__(self, config: TelegramConfig): method command_start (line 63) | async def command_start(self, update: Update, context: ContextTypes.DE... method handle_message (line 68) | async def handle_message(self, update: Update, context: ContextTypes.D... method convert_to_message (line 81) | async def convert_to_message(self, raw_message: Update) -> IMMessage: method send_message (line 185) | async def send_message(self, message: IMMessage, recipient: ChatSender): method start (line 236) | async def start(self): method stop (line 246) | async def stop(self): method set_chat_editing_state (line 258) | async def set_chat_editing_state( method _cached_get_chat (line 292) | async def _cached_get_chat(self, user_id): method query_user_profile (line 300) | async def query_user_profile(self, chat_sender: ChatSender) -> UserPro... method get_bot_profile (line 330) | async def get_bot_profile(self) -> Optional[UserProfile]: FILE: kirara_ai/plugins/im_wecom_adapter/__init__.py class WecomAdapterPlugin (line 13) | class WecomAdapterPlugin(Plugin): method __init__ (line 16) | def __init__(self): method on_load (line 19) | def on_load(self): method on_start (line 33) | def on_start(self): method on_stop (line 36) | def on_stop(self): FILE: kirara_ai/plugins/im_wecom_adapter/adapter.py function make_webhook_url (line 31) | def make_webhook_url(): function auto_generate_webhook_url (line 35) | def auto_generate_webhook_url(s: dict): class WecomConfig (line 41) | class WecomConfig(BaseModel): method __init__ (line 67) | def __init__(self, **kwargs: Any): class WeComUtils (line 74) | class WeComUtils: method __init__ (line 77) | def __init__(self, client: BaseWeChatClient): method access_token (line 82) | def access_token(self) -> Optional[str]: method download_and_save_media (line 85) | async def download_and_save_media(self, media_id: str, file_name: str)... method download_media (line 99) | async def download_media(self, media_id: str) -> Optional[bytes]: class WecomAdapter (line 114) | class WecomAdapter(IMAdapter): method __init__ (line 120) | def __init__(self, config: WecomConfig): method setup_wechat_api (line 144) | def setup_wechat_api(self): method setup_routes (line 156) | def setup_routes(self): method convert_to_message (line 239) | async def convert_to_message(self, raw_message: Any, media_path: Optio... method _send_text (line 274) | async def _send_text(self, user_id: str, text: str): method _send_media (line 283) | async def _send_media(self, user_id: str, media_data: str, media_type:... method send_message (line 293) | async def send_message(self, message: IMMessage, recipient: ChatSender): method _start_standalone_server (line 323) | async def _start_standalone_server(self): method _stop_standalone_server (line 339) | async def _stop_standalone_server(self): method start (line 350) | async def start(self): method stop (line 359) | async def stop(self): FILE: kirara_ai/plugins/im_wecom_adapter/delegates.py class WechatApiDelegate (line 12) | class WechatApiDelegate(ABC): method setup_api (line 16) | def setup_api(self, config: "WecomConfig"): method check_signature (line 20) | def check_signature(self, signature: str, timestamp: str, nonce: str, ... method decrypt_message (line 24) | def decrypt_message(self, message: bytes, signature: str, timestamp: s... method parse_message (line 28) | def parse_message(self, message: str) -> BaseMessage: method send_text (line 32) | async def send_text(self, app_id: str, user_id: str, text: str) -> Any: method send_media (line 36) | async def send_media(self, app_id: str, user_id: str, media_type: str,... class CorpWechatApiDelegate (line 40) | class CorpWechatApiDelegate(WechatApiDelegate): method setup_api (line 43) | def setup_api(self, config: "WecomConfig"): method check_signature (line 56) | def check_signature(self, signature: str, timestamp: str, nonce: str, ... method decrypt_message (line 60) | def decrypt_message(self, message: bytes, signature: str, timestamp: s... method parse_message (line 64) | def parse_message(self, message: str) -> BaseMessage: method send_text (line 68) | async def send_text(self, app_id: str, user_id: str, text: str) -> Any: method send_media (line 72) | async def send_media(self, app_id: str, user_id: str, media_type: str,... class PublicWechatApiDelegate (line 79) | class PublicWechatApiDelegate(WechatApiDelegate): method setup_api (line 82) | def setup_api(self, config: "WecomConfig"): method check_signature (line 95) | def check_signature(self, signature: str, timestamp: str, nonce: str, ... method decrypt_message (line 101) | def decrypt_message(self, message: bytes, signature: str, timestamp: s... method parse_message (line 105) | def parse_message(self, message: str) -> BaseMessage: method send_text (line 109) | async def send_text(self, app_id: str, user_id: str, text: str) -> Any: method send_media (line 114) | async def send_media(self, app_id: str, user_id: str, media_type: str,... FILE: kirara_ai/plugins/llm_preset_adapters/__init__.py class LLMPresetAdaptersPlugin (line 22) | class LLMPresetAdaptersPlugin(Plugin): method __init__ (line 23) | def __init__(self): method on_load (line 26) | def on_load(self): method on_start (line 68) | def on_start(self): method on_stop (line 71) | def on_stop(self): FILE: kirara_ai/plugins/llm_preset_adapters/alibabacloud_adapter.py class AlibabaCloudConfig (line 7) | class AlibabaCloudConfig(OpenAIConfig): class AlibabaCloudAdapter (line 11) | class AlibabaCloudAdapter(OpenAIAdapter): method __init__ (line 12) | def __init__(self, config: AlibabaCloudConfig): method auto_detect_models (line 15) | async def auto_detect_models(self) -> list[ModelConfig]: FILE: kirara_ai/plugins/llm_preset_adapters/claude_adapter.py class ClaudeConfig (line 22) | class ClaudeConfig(BaseModel): function convert_llm_chat_message_to_claude_message (line 28) | async def convert_llm_chat_message_to_claude_message(messages: list[LLMC... function convert_tools_to_claude_format (line 50) | def convert_tools_to_claude_format(tools: list[Tool]) -> list[dict]: function resolve_tool_result (line 54) | async def resolve_tool_result(element: LLMToolResultContent, media_manag... class ClaudeAdapter (line 72) | class ClaudeAdapter(LLMBackendAdapter, AutoDetectModelsProtocol, LLMChat... method __init__ (line 76) | def __init__(self, config: ClaudeConfig): method chat (line 81) | def chat(self, req: LLMChatRequest) -> LLMChatResponse: method auto_detect_models (line 156) | async def auto_detect_models(self) -> list[str]: FILE: kirara_ai/plugins/llm_preset_adapters/deepseek_adapter.py class DeepSeekConfig (line 4) | class DeepSeekConfig(OpenAIConfig): class DeepSeekAdapter (line 8) | class DeepSeekAdapter(OpenAIAdapterChatBase): method __init__ (line 9) | def __init__(self, config: DeepSeekConfig): FILE: kirara_ai/plugins/llm_preset_adapters/gemini_adapter.py class GeminiConfig (line 49) | class GeminiConfig(BaseModel): function convert_non_tool_message (line 55) | async def convert_non_tool_message(msg: LLMChatMessage, media_manager: M... function convert_llm_chat_message_to_gemini_message (line 83) | async def convert_llm_chat_message_to_gemini_message(msg: LLMChatMessage... function convert_all_messages_to_gemini_format (line 92) | async def convert_all_messages_to_gemini_format(messages: List[LLMChatMe... function convert_tools_to_gemini_format (line 96) | def convert_tools_to_gemini_format(tools: list[Tool]) -> list[dict[Liter... function resolve_tool_results (line 147) | def resolve_tool_results(element: LLMToolResultContent) -> dict: class GeminiAdapter (line 163) | class GeminiAdapter(LLMBackendAdapter, AutoDetectModelsProtocol, LLMChat... method __init__ (line 167) | def __init__(self, config: GeminiConfig): method chat (line 172) | def chat(self, req: LLMChatRequest) -> LLMChatResponse: method embed (line 254) | def embed(self, req: LLMEmbeddingRequest) -> LLMEmbeddingResponse: method auto_detect_models (line 293) | async def auto_detect_models(self) -> list[ModelConfig]: method _post_with_retry (line 309) | def _post_with_retry(self, url: str, json: dict, headers: dict, retry_... FILE: kirara_ai/plugins/llm_preset_adapters/minimax_adapter.py class MinimaxConfig (line 4) | class MinimaxConfig(OpenAIConfig): class MinimaxAdapter (line 7) | class MinimaxAdapter(OpenAIAdapterChatBase): method __init__ (line 8) | def __init__(self, config: MinimaxConfig): FILE: kirara_ai/plugins/llm_preset_adapters/mistral_adapter.py class MistralConfig (line 8) | class MistralConfig(OpenAIConfig): class MistralAdapter (line 12) | class MistralAdapter(OpenAIAdapter, AutoDetectModelsProtocol): method __init__ (line 13) | def __init__(self, config: MistralConfig): method auto_detect_models (line 16) | async def auto_detect_models(self) -> list[str]: FILE: kirara_ai/plugins/llm_preset_adapters/moonshot_adapter.py class MoonshotConfig (line 6) | class MoonshotConfig(OpenAIConfig): class MoonshotAdapter (line 10) | class MoonshotAdapter(OpenAIAdapterChatBase): method __init__ (line 11) | def __init__(self, config: MoonshotConfig): FILE: kirara_ai/plugins/llm_preset_adapters/ollama_adapter.py class OllamaConfig (line 25) | class OllamaConfig(BaseModel): function resolve_media_ids (line 30) | async def resolve_media_ids(media_ids: list[str], media_manager: MediaMa... function convert_llm_response (line 39) | def convert_llm_response(response_data: dict[str, dict[str, Any]]) -> li... function convert_non_tool_message (line 51) | def convert_non_tool_message(msg: LLMChatMessage, media_manager: MediaMa... function convert_tool_result_message (line 80) | def convert_tool_result_message(msg: LLMChatMessage, media_manager: Medi... function convert_tools_to_ollama_format (line 99) | def convert_tools_to_ollama_format(tools: list[Tool]) -> list[dict]: class OllamaAdapter (line 103) | class OllamaAdapter(LLMBackendAdapter, AutoDetectModelsProtocol, LLMChat... method __init__ (line 104) | def __init__(self, config: OllamaConfig): method chat (line 109) | def chat(self, req: LLMChatRequest) -> LLMChatResponse: method embed (line 171) | def embed(self, req: LLMEmbeddingRequest) -> LLMEmbeddingResponse: method auto_detect_models (line 199) | async def auto_detect_models(self) -> list[ModelConfig]: FILE: kirara_ai/plugins/llm_preset_adapters/openai_adapter.py function convert_parts_factory (line 25) | async def convert_parts_factory(messages: LLMChatMessage, media_manager:... function convert_llm_chat_message_to_openai_message (line 84) | async def convert_llm_chat_message_to_openai_message(messages: list[LLMC... function convert_tools_to_openai_format (line 90) | def convert_tools_to_openai_format(tools: list[Tool]) -> list[dict]: class OpenAIConfig (line 101) | class OpenAIConfig(BaseModel): class OpenAIAdapterChatBase (line 107) | class OpenAIAdapterChatBase(LLMBackendAdapter, AutoDetectModelsProtocol,... method __init__ (line 110) | def __init__(self, config: OpenAIConfig): method chat (line 113) | def chat(self, req: LLMChatRequest) -> LLMChatResponse: method get_models (line 184) | async def get_models(self) -> list[str]: method auto_detect_models (line 195) | async def auto_detect_models(self) -> list[ModelConfig]: class EmbeddingData (line 205) | class EmbeddingData(TypedDict): class EmbeddingResponse (line 210) | class EmbeddingResponse(TypedDict): class OpenAIAdapter (line 217) | class OpenAIAdapter(OpenAIAdapterChatBase, LLMEmbeddingProtocol): method embed (line 218) | def embed(self, req: LLMEmbeddingRequest) -> LLMEmbeddingResponse: FILE: kirara_ai/plugins/llm_preset_adapters/openrouter_adapter.py class OpenRouterConfig (line 9) | class OpenRouterConfig(OpenAIConfig): class OpenRouterAdapter (line 12) | class OpenRouterAdapter(OpenAIAdapter): method __init__ (line 13) | def __init__(self, config: OpenRouterConfig): method auto_detect_models (line 16) | async def auto_detect_models(self) -> list[ModelConfig]: FILE: kirara_ai/plugins/llm_preset_adapters/siliconflow_adapter.py class SiliconFlowConfig (line 6) | class SiliconFlowConfig(OpenAIConfig): class SiliconFlowAdapter (line 10) | class SiliconFlowAdapter(OpenAIAdapter): method __init__ (line 11) | def __init__(self, config: SiliconFlowConfig): method auto_detect_models (line 14) | async def auto_detect_models(self) -> list[str]: FILE: kirara_ai/plugins/llm_preset_adapters/tencentcloud_adapter.py class TencentCloudConfig (line 5) | class TencentCloudConfig(OpenAIConfig): class TencentCloudAdapter (line 9) | class TencentCloudAdapter(OpenAIAdapter): method __init__ (line 10) | def __init__(self, config: TencentCloudConfig): FILE: kirara_ai/plugins/llm_preset_adapters/tests/test_utils.py function test_guess_openai_model (line 267) | def test_guess_openai_model(): FILE: kirara_ai/plugins/llm_preset_adapters/utils.py function generate_tool_call_id (line 9) | def generate_tool_call_id(name: str) -> str: function pick_tool_calls (line 12) | def pick_tool_calls(calls: list[LLMChatContentPartType]) -> Optional[lis... function guess_openai_model (line 24) | def guess_openai_model(model_id: str) -> Tuple[ModelType, int] | None: function guess_qwen_model (line 126) | def guess_qwen_model(model_id: str) -> Tuple[ModelType, int] | None: FILE: kirara_ai/plugins/llm_preset_adapters/volcengine_adapter.py class VolcengineConfig (line 15) | class VolcengineConfig(OpenAIConfig): function generate_volcengine_signature (line 20) | def generate_volcengine_signature(access_key_id, access_key_secret, meth... function normalize_query (line 86) | def normalize_query(params): function detect_ability (line 101) | def detect_ability(model: dict) -> int: class VolcengineAdapter (line 112) | class VolcengineAdapter(OpenAIAdapter): method __init__ (line 115) | def __init__(self, config: VolcengineConfig): method auto_detect_models (line 118) | async def auto_detect_models(self) -> list[ModelConfig]: FILE: kirara_ai/plugins/llm_preset_adapters/voyage_adapter.py function resolve_media_base64 (line 17) | async def resolve_media_base64(inputs: list[LLMChatImageContent|LLMChatT... class ReRankData (line 40) | class ReRankData(TypedDict): class ReRankResponse (line 45) | class ReRankResponse(TypedDict): class EmbeddingData (line 52) | class EmbeddingData(TypedDict): class EmbeddingResponse (line 57) | class EmbeddingResponse(TypedDict): class ModalEmbeddingResponse (line 63) | class ModalEmbeddingResponse(TypedDict): class VoyageConfig (line 70) | class VoyageConfig(BaseModel): class VoyageAdapter (line 75) | class VoyageAdapter(LLMBackendAdapter, LLMEmbeddingProtocol, LLMReRankPr... method __init__ (line 78) | def __init__(self, config: VoyageConfig): method embed (line 81) | def embed(self, req: LLMEmbeddingRequest) -> LLMEmbeddingResponse: method _text_embedding (line 89) | def _text_embedding(self, req: LLMEmbeddingRequest) -> LLMEmbeddingRes... method _multi_modal_embedding (line 122) | def _multi_modal_embedding(self, req: LLMEmbeddingRequest) -> LLMEmbed... method rerank (line 168) | def rerank(self, req: LLMReRankRequest) -> LLMReRankResponse: FILE: kirara_ai/tracing/core.py class TraceRecord (line 19) | class TraceRecord(Base): method update_from_event (line 30) | def update_from_event(self, event: TraceEvent) -> None: method to_dict (line 34) | def to_dict(self) -> Dict[str, Any]: method to_detail_dict (line 38) | def to_detail_dict(self) -> Dict[str, Any]: function generate_trace_id (line 42) | def generate_trace_id() -> str: class TracerBase (line 51) | class TracerBase(Generic[R], abc.ABC): method __init__ (line 59) | def __init__(self, container: DependencyContainer, record_class: Type[... method initialize (line 72) | def initialize(self): method shutdown (line 78) | def shutdown(self): method _register_event_handlers (line 92) | def _register_event_handlers(self): method _unregister_event_handlers (line 96) | def _unregister_event_handlers(self): method get_traces (line 99) | def get_traces( method get_recent_traces (line 148) | def get_recent_traces(self, limit: int = 100) -> List[R]: method get_trace_by_id (line 156) | def get_trace_by_id(self, trace_id: str) -> Optional[R]: method save_trace_record (line 161) | def save_trace_record(self, record: R) -> Dict[str, Any]: method update_trace_record (line 168) | def update_trace_record(self, trace_id: str, event: TraceEvent) -> Opt... method register_ws_client (line 182) | def register_ws_client(self) -> Queue: method unregister_ws_client (line 188) | def unregister_ws_client(self, queue: Queue): method broadcast_ws_message (line 193) | def broadcast_ws_message(self, message: Dict): FILE: kirara_ai/tracing/decorator.py function trace_llm_chat (line 9) | def trace_llm_chat(func: Callable): FILE: kirara_ai/tracing/llm_tracer.py class LLMTracer (line 37) | class LLMTracer(TracerBase[LLMRequestTrace]): method __init__ (line 44) | def __init__(self, container: DependencyContainer): method initialize (line 48) | def initialize(self): method _mark_pending_as_failed (line 60) | def _mark_pending_as_failed(self) -> int: method _clean_old_traces (line 72) | def _clean_old_traces(self, days: int = 30) -> int: method _register_event_handlers (line 82) | def _register_event_handlers(self): method _unregister_event_handlers (line 88) | def _unregister_event_handlers(self): method start_request_tracking (line 94) | def start_request_tracking( method complete_request_tracking (line 116) | def complete_request_tracking( method fail_request_tracking (line 142) | def fail_request_tracking( method _on_request_start (line 170) | def _on_request_start(self, event: LLMRequestStartEvent): method _on_request_complete (line 189) | def _on_request_complete(self, event: LLMRequestCompleteEvent): method _on_request_fail (line 202) | def _on_request_fail(self, event: LLMRequestFailEvent): method get_statistics (line 219) | def get_statistics(self) -> Dict: FILE: kirara_ai/tracing/manager.py class TracingManager (line 14) | class TracingManager: method __init__ (line 18) | def __init__(self, container: DependencyContainer, database_manager: D... method initialize (line 25) | def initialize(self): method shutdown (line 36) | def shutdown(self): method register_tracer (line 46) | def register_tracer(self, name: str, tracer: TracerBase): method get_tracer (line 52) | def get_tracer(self, name: str) -> Optional[TracerBase]: method get_all_tracers (line 56) | def get_all_tracers(self) -> Dict[str, TracerBase]: method get_tracer_types (line 60) | def get_tracer_types(self) -> List[str]: method publish_event (line 64) | def publish_event(self, event: TraceEvent): method register_ws_client (line 69) | def register_ws_client(self, tracer_name: str) -> asyncio.Queue: method unregister_ws_client (line 75) | def unregister_ws_client(self, tracer_name: str, queue: asyncio.Queue): method get_recent_traces (line 83) | def get_recent_traces(self, tracer_name: str, limit: int = 100) -> Lis... method get_trace_by_id (line 90) | def get_trace_by_id(self, tracer_name: str, trace_id: str) -> Optional... FILE: kirara_ai/tracing/models.py class LLMRequestTrace (line 11) | class LLMRequestTrace(TraceRecord): method __repr__ (line 47) | def __repr__(self): method update_from_event (line 50) | def update_from_event(self, event: TraceEvent) -> None: method to_dict (line 83) | def to_dict(self) -> Dict[str, Any]: method to_detail_dict (line 101) | def to_detail_dict(self) -> Dict[str, Any]: method request (line 109) | def request(self) -> Optional[Dict[str, Any]]: method request (line 114) | def request(self, value: Any): method response (line 120) | def response(self) -> Optional[Dict[str, Any]]: method response (line 125) | def response(self, value: Any): FILE: kirara_ai/web/api/block/diagnostics/base_diagnostic.py class BaseDiagnostic (line 13) | class BaseDiagnostic(ABC): method __init__ (line 18) | def __init__(self, ls: LanguageServer): method check (line 22) | def check(self, doc: Document) -> List[Diagnostic]: method get_code_actions (line 33) | def get_code_actions(self, params: CodeActionParams, relevant_diagnost... method _create_diagnostic (line 47) | def _create_diagnostic(self, message: str, node: Optional[ast.AST], se... method _ast_node_to_string (line 93) | def _ast_node_to_string(self, node: Optional[ast.AST]) -> str: FILE: kirara_ai/web/api/block/diagnostics/import_check.py class ImportDiagnostic (line 16) | class ImportDiagnostic(BaseDiagnostic): method _get_package_context (line 21) | def _get_package_context(self, path: Optional[str]) -> Tuple[Optional[... method check (line 43) | def check(self, doc: Document) -> List[Diagnostic]: method get_code_actions (line 168) | def get_code_actions(self, params: CodeActionParams, relevant_diagnost... FILE: kirara_ai/web/api/block/diagnostics/jedi_syntax_check.py class JediSyntaxErrorDiagnostic (line 14) | class JediSyntaxErrorDiagnostic(BaseDiagnostic): method __init__ (line 19) | def __init__(self, ls: LanguageServer): method check (line 22) | def check(self, doc: Document) -> List[Diagnostic]: FILE: kirara_ai/web/api/block/diagnostics/mandatory_function.py class MandatoryFunctionDiagnostic (line 15) | class MandatoryFunctionDiagnostic(BaseDiagnostic): method __init__ (line 28) | def __init__(self, ls: LanguageServer, config: Optional[Dict[str, Any]]): method update_config (line 42) | def update_config(self, config: Dict[str, Any]) -> None: method check (line 72) | def check(self, doc: Document) -> List[Diagnostic]: method get_code_actions (line 212) | def get_code_actions(self, params: CodeActionParams, relevant_diagnost... FILE: kirara_ai/web/api/block/diagnostics/pyflakes_check.py class _LspReporter (line 17) | class _LspReporter(pyflakes_reporter.Reporter): method __init__ (line 18) | def __init__(self, source_name: str): method unexpectedError (line 23) | def unexpectedError(self, filename: str, msg: str): method syntaxError (line 35) | def syntaxError(self, filename: str, msg: str, lineno: int, offset: in... method flake (line 61) | def flake(self, message: Any): class PyflakesDiagnostic (line 129) | class PyflakesDiagnostic(BaseDiagnostic): method __init__ (line 134) | def __init__(self, ls: LanguageServer): method check (line 137) | def check(self, doc: Document) -> List[Diagnostic]: method get_code_actions (line 164) | def get_code_actions(self, params: CodeActionParams, relevant_diagnost... FILE: kirara_ai/web/api/block/models.py class BlockType (line 8) | class BlockType(BaseModel): class BlockTypeList (line 20) | class BlockTypeList(BaseModel): class BlockTypeResponse (line 26) | class BlockTypeResponse(BaseModel): FILE: kirara_ai/web/api/block/python_lsp.py class QuartWsTransport (line 29) | class QuartWsTransport(asyncio.Transport): method __init__ (line 30) | def __init__(self, queue: asyncio.Queue): method write (line 33) | def write(self, message: str): method close (line 41) | def close(self): class PythonLanguageServer (line 45) | class PythonLanguageServer(LanguageServer): method __init__ (line 48) | def __init__(self, loop: Optional[asyncio.AbstractEventLoop] = None): method configure_mandatory_function_checker (line 60) | def configure_mandatory_function_checker(self, config: Dict[str, Any])... method _setup_handlers (line 93) | def _setup_handlers(self): method _get_script (line 181) | def _get_script(self, params: Union[TextDocumentPositionParams, Comple... method _get_completions (line 206) | def _get_completions(self, params: CompletionParams) -> CompletionList: method _get_hover (line 240) | def _get_hover(self, params: HoverParams) -> Optional[Hover]: method _get_signature_help (line 279) | def _get_signature_help(self, params: SignatureHelpParams) -> Optional... method _get_definition (line 334) | def _get_definition(self, params: DefinitionParams) -> List[Location]: method _get_document_symbols (line 372) | def _get_document_symbols(self, params: DocumentSymbolParams) -> List[... method _map_completion_type (line 423) | def _map_completion_type(self, type_str: str) -> CompletionItemKind: method _map_symbol_type (line 443) | def _map_symbol_type(self, type_str: str) -> SymbolKind: method _publish_diagnostics (line 464) | def _publish_diagnostics(self, ls: LanguageServer, doc_uri: str): method _get_code_actions (line 492) | def _get_code_actions(self, params: CodeActionParams) -> Optional[List... FILE: kirara_ai/web/api/block/routes.py function list_block_types (line 20) | async def list_block_types() -> Any: function get_block_type (line 52) | async def get_block_type(type_name: str) -> Any: function get_type_compatibility (line 82) | async def get_type_compatibility() -> Any: function code_lsp (line 88) | async def code_lsp(): FILE: kirara_ai/web/api/dispatch/models.py class DispatchRuleList (line 8) | class DispatchRuleList(BaseModel): class DispatchRuleResponse (line 14) | class DispatchRuleResponse(BaseModel): FILE: kirara_ai/web/api/dispatch/routes.py function list_rules (line 14) | async def list_rules(): function get_rule (line 25) | async def get_rule(rule_id: str): function create_rule (line 38) | async def create_rule(): function update_rule (line 68) | async def update_rule(rule_id: str): function delete_rule (line 100) | async def delete_rule(rule_id: str): function enable_rule (line 119) | async def enable_rule(rule_id: str): function disable_rule (line 141) | async def disable_rule(rule_id: str): function get_rule_types (line 163) | async def get_rule_types(): function get_rule_config_schema (line 170) | async def get_rule_config_schema(rule_type: str): FILE: kirara_ai/web/api/im/models.py class IMAdapterStatus (line 12) | class IMAdapterStatus(IMAdapterConfig): class IMAdapterList (line 18) | class IMAdapterList(BaseModel): class IMAdapterResponse (line 24) | class IMAdapterResponse(BaseModel): class IMAdapterTypes (line 30) | class IMAdapterTypes(BaseModel): class IMAdapterConfigSchema (line 36) | class IMAdapterConfigSchema(BaseModel): FILE: kirara_ai/web/api/im/routes.py function _create_adapter (line 20) | def _create_adapter(manager: IMManager, name: str, adapter: str, config:... function get_adapter_types (line 30) | async def get_adapter_types(): function list_adapters (line 40) | async def list_adapters(): function get_adapter (line 59) | async def get_adapter(adapter_id: str): function create_adapter (line 86) | async def create_adapter(): function update_adapter (line 128) | async def update_adapter(adapter_id: str): function delete_adapter (line 203) | async def delete_adapter(adapter_id: str): function start_adapter (line 224) | async def start_adapter(adapter_id: str): function stop_adapter (line 241) | async def stop_adapter(adapter_id: str): function get_adapter_config_schema (line 258) | async def get_adapter_config_schema(adapter_type: str): FILE: kirara_ai/web/api/llm/models.py class LLMBackendInfo (line 8) | class LLMBackendInfo(LLMBackendConfig): class LLMBackendList (line 13) | class LLMBackendList(BaseModel): class LLMBackendResponse (line 19) | class LLMBackendResponse(BaseModel): class LLMBackendListResponse (line 26) | class LLMBackendListResponse(BaseModel): class LLMBackendCreateRequest (line 33) | class LLMBackendCreateRequest(LLMBackendConfig): class LLMBackendUpdateRequest (line 38) | class LLMBackendUpdateRequest(LLMBackendConfig): class LLMAdapterTypes (line 43) | class LLMAdapterTypes(BaseModel): class LLMAdapterConfigSchema (line 49) | class LLMAdapterConfigSchema(BaseModel): class ModelConfigListResponse (line 56) | class ModelConfigListResponse(BaseModel): FILE: kirara_ai/web/api/llm/routes.py function get_adapter_types (line 22) | async def get_adapter_types(): function list_backends (line 30) | async def list_backends(): function get_backend (line 55) | async def get_backend(backend_name: str): function create_backend (line 81) | async def create_backend(): function update_backend (line 122) | async def update_backend(backend_name: str): function delete_backend (line 171) | async def delete_backend(backend_name: str): function get_adapter_config_schema (line 215) | async def get_adapter_config_schema(adapter_type: str): function supports_auto_detect_models (line 232) | async def supports_auto_detect_models(adapter_type: str): function auto_detect_models (line 256) | async def auto_detect_models(backend_name: str): FILE: kirara_ai/web/api/mcp/models.py class MCPServerInfo (line 6) | class MCPServerInfo(BaseModel): class MCPToolInfo (line 16) | class MCPToolInfo(BaseModel): class MCPServerList (line 22) | class MCPServerList(BaseModel): class MCPStatistics (line 31) | class MCPStatistics(BaseModel): class MCPServerCreateRequest (line 42) | class MCPServerCreateRequest(BaseModel): class MCPServerUpdateRequest (line 51) | class MCPServerUpdateRequest(BaseModel): FILE: kirara_ai/web/api/mcp/routes.py function _convert_to_server_info (line 23) | def _convert_to_server_info(server: MCPServer) -> MCPServerInfo: function list_servers (line 39) | async def list_servers(): function get_statistics (line 99) | async def get_statistics(): function get_server (line 129) | async def get_server(server_id: str): function get_server_tools (line 152) | async def get_server_tools(server_id: str): function check_server_id (line 189) | async def check_server_id(server_id: str): function create_server (line 209) | async def create_server(): function update_server (line 255) | async def update_server(server_id: str): function delete_server (line 332) | async def delete_server(server_id: str): function start_server (line 371) | async def start_server(server_id: str): function stop_server (line 392) | async def stop_server(server_id: str): function get_all_tools (line 413) | async def get_all_tools(): function call_tool (line 439) | async def call_tool(server_id: str): function get_server_prompts (line 465) | async def get_server_prompts(server_id: str): function get_server_resources (line 486) | async def get_server_resources(server_id: str): FILE: kirara_ai/web/api/media/models.py class MediaMetadata (line 7) | class MediaMetadata(BaseModel): class MediaItem (line 18) | class MediaItem(BaseModel): class MediaListResponse (line 26) | class MediaListResponse(BaseModel): class MediaSearchParams (line 34) | class MediaSearchParams(BaseModel): class MediaBatchDeleteRequest (line 45) | class MediaBatchDeleteRequest(BaseModel): FILE: kirara_ai/web/api/media/routes.py function generate_thumbnail (line 26) | async def generate_thumbnail(image_data: bytes) -> io.BytesIO: function _get_media_manager (line 50) | def _get_media_manager() -> MediaManager: function _convert_media_to_api_item (line 54) | def _convert_media_to_api_item(media: Media) -> Optional[MediaItem]: function list_media (line 79) | async def list_media(): function get_media_file (line 161) | async def get_media_file(media_id): function get_thumbnail (line 172) | async def get_thumbnail(media_id): function delete_media (line 198) | async def delete_media(media_id): function batch_delete (line 213) | async def batch_delete(): function get_system_info (line 231) | async def get_system_info(): function set_config (line 272) | async def set_config(): function cleanup_unreferenced (line 285) | async def cleanup_unreferenced(): FILE: kirara_ai/web/api/plugin/models.py class PluginList (line 8) | class PluginList(BaseModel): class PluginResponse (line 14) | class PluginResponse(BaseModel): class InstallPluginRequest (line 20) | class InstallPluginRequest(BaseModel): FILE: kirara_ai/web/api/plugin/routes.py function get_meta_params (line 21) | def get_meta_params() -> dict: function is_upgradable (line 28) | def is_upgradable(installed_version: str, market_version: str) -> bool: function fetch_from_market (line 36) | async def fetch_from_market(path: str, params: dict | None = None) -> dict: function enrich_plugin_data (line 50) | async def enrich_plugin_data(plugins: list, loader: PluginLoader) -> list: function search_plugins (line 77) | async def search_plugins(): function get_market_plugin_info (line 99) | async def get_market_plugin_info(plugin_name: str): function list_plugins (line 115) | async def list_plugins(): function get_plugin_details (line 124) | async def get_plugin_details(plugin_name: str): function install_plugin (line 137) | async def install_plugin(): function uninstall_plugin (line 168) | async def uninstall_plugin(plugin_name: str): function enable_plugin (line 198) | async def enable_plugin(plugin_name: str): function disable_plugin (line 228) | async def disable_plugin(plugin_name: str): function update_plugin (line 264) | async def update_plugin(plugin_name: str): FILE: kirara_ai/web/api/system/models.py class SystemStatus (line 6) | class SystemStatus(BaseModel): class SystemStatusResponse (line 24) | class SystemStatusResponse(BaseModel): class UpdateStatus (line 30) | class UpdateStatus(BaseModel): class UpdateCheckResponse (line 35) | class UpdateCheckResponse(BaseModel): FILE: kirara_ai/web/api/system/routes.py function logs_websocket (line 38) | async def logs_websocket(): function get_system_config (line 66) | async def get_system_config(): function update_web_config (line 94) | async def update_web_config(): function update_plugins_config (line 111) | async def update_plugins_config(): function update_registry_config (line 127) | async def update_registry_config(): function update_system_config (line 147) | async def update_system_config(): function update_tracing_config (line 173) | async def update_tracing_config(): function get_system_status (line 190) | async def get_system_status(): function check_update (line 251) | async def check_update(): function perform_update (line 277) | async def perform_update(): function restart_system (line 316) | async def restart_system(): FILE: kirara_ai/web/api/system/utils.py function get_installed_version (line 11) | def get_installed_version() -> str: function get_latest_pypi_version (line 26) | async def get_latest_pypi_version(package_name: str) -> tuple[str, str]: function get_latest_npm_version (line 43) | async def get_latest_npm_version(package_name: str, registry: str = "htt... function download_file (line 58) | async def download_file(url: str, temp_dir: str) -> tuple[str, str]: function get_cpu_info (line 84) | def get_cpu_info() -> str: function get_memory_usage (line 104) | def get_memory_usage() -> dict: function get_cpu_usage (line 117) | def get_cpu_usage() -> float: FILE: kirara_ai/web/api/tracing/routes.py function get_trace_types (line 21) | async def get_trace_types(): function get_llm_traces (line 33) | async def get_llm_traces(): function get_llm_trace_detail (line 77) | async def get_llm_trace_detail(trace_id: str): function get_llm_statistics (line 95) | async def get_llm_statistics(): function tracing_ws (line 109) | async def tracing_ws(): FILE: kirara_ai/web/api/workflow/models.py class Wire (line 8) | class Wire(BaseModel): class BlockInstance (line 17) | class BlockInstance(BaseModel): class WorkflowDefinition (line 26) | class WorkflowDefinition(BaseModel): class WorkflowInfo (line 39) | class WorkflowInfo(BaseModel): class WorkflowList (line 50) | class WorkflowList(BaseModel): class WorkflowResponse (line 56) | class WorkflowResponse(BaseModel): FILE: kirara_ai/web/api/workflow/routes.py function list_workflows (line 18) | async def list_workflows(): function get_workflow (line 43) | async def get_workflow(group_id: str, workflow_id: str): function create_workflow (line 93) | async def create_workflow(group_id: str, workflow_id: str): function update_workflow (line 151) | async def update_workflow(group_id: str, workflow_id: str): function delete_workflow (line 216) | async def delete_workflow(group_id: str, workflow_id: str): FILE: kirara_ai/web/app.py function create_web_api_app (line 69) | def create_web_api_app(container: DependencyContainer) -> Quart: function create_app (line 107) | def create_app(container: DependencyContainer) -> FastAPI: class WebServer (line 209) | class WebServer: method __init__ (line 216) | def __init__(self, container: DependencyContainer): method mount_app (line 257) | def mount_app(self, prefix: str, app): method _check_port_available (line 261) | def _check_port_available(self, host: str, port: int) -> bool: method start (line 271) | async def start(self): method stop (line 297) | async def stop(self): method add_static_assets (line 311) | def add_static_assets(self, url_path: str, local_path: str): method _check_and_install_webui (line 319) | def _check_and_install_webui(self): method _install_webui (line 327) | async def _install_webui(self): FILE: kirara_ai/web/auth/middleware.py function require_auth (line 8) | def require_auth(f): FILE: kirara_ai/web/auth/models.py class LoginRequest (line 4) | class LoginRequest(BaseModel): class ChangePasswordRequest (line 8) | class ChangePasswordRequest(BaseModel): class TokenResponse (line 13) | class TokenResponse(BaseModel): FILE: kirara_ai/web/auth/routes.py function login (line 17) | async def login(): function change_password (line 37) | async def change_password(): function check_first_time (line 57) | async def check_first_time(): FILE: kirara_ai/web/auth/services.py class AuthService (line 7) | class AuthService(ABC): method is_first_time (line 9) | def is_first_time(self) -> bool: method save_password (line 13) | def save_password(self, password: str) -> None: method verify_password (line 17) | def verify_password(self, password: str) -> bool: method create_access_token (line 21) | def create_access_token(self, expires_delta: Optional[timedelta] = Non... method verify_token (line 25) | def verify_token(self, token: str) -> bool: class FileBasedAuthService (line 29) | class FileBasedAuthService(AuthService): method __init__ (line 30) | def __init__(self, password_file: Path, secret_key: str): method is_first_time (line 34) | def is_first_time(self) -> bool: method save_password (line 37) | def save_password(self, password: str) -> None: method verify_password (line 45) | def verify_password(self, password: str) -> bool: method create_access_token (line 55) | def create_access_token(self, expires_delta: Optional[timedelta] = Non... method verify_token (line 60) | def verify_token(self, token: str) -> bool: class MockAuthService (line 66) | class MockAuthService(AuthService): method __init__ (line 67) | def __init__(self): method is_first_time (line 71) | def is_first_time(self) -> bool: method save_password (line 74) | def save_password(self, password: str) -> None: method verify_password (line 78) | def verify_password(self, password: str) -> bool: method create_access_token (line 81) | def create_access_token(self, expires_delta: Optional[timedelta] = Non... method verify_token (line 84) | def verify_token(self, token: str) -> bool: FILE: kirara_ai/web/auth/utils.py function hash_password (line 8) | def hash_password(password: str) -> bytes: function verify_password (line 13) | def verify_password(password: str, hashed: bytes) -> bool: function create_jwt_token (line 17) | def create_jwt_token(secret_key: str, expires_delta: Optional[timedelta]... function verify_jwt_token (line 28) | def verify_jwt_token(token: str, secret_key: str) -> bool: FILE: kirara_ai/web/utils.py function create_no_cache_response (line 17) | async def create_no_cache_response(file_path: Path, request: Request) ->... function test_npm_registry_speed (line 34) | async def test_npm_registry_speed(registries: list[str]) -> str: function install_webui (line 83) | async def install_webui(install_path: Path) -> tuple[bool, str]: FILE: kirara_ai/workflow/core/block/base.py class Block (line 7) | class Block: method __init__ (line 21) | def __init__( method execute (line 35) | def execute(self, **kwargs) -> Dict[str, Any]: class ConditionBlock (line 40) | class ConditionBlock(Block): method __init__ (line 48) | def __init__( method execute (line 57) | def execute(self, **kwargs) -> Dict[str, Any]: class LoopBlock (line 62) | class LoopBlock(Block): method __init__ (line 71) | def __init__( method execute (line 83) | def execute(self, **kwargs) -> Dict[str, Any]: class LoopEndBlock (line 92) | class LoopEndBlock(Block): method __init__ (line 100) | def __init__(self, inputs: Dict[str, "Input"]): method execute (line 105) | def execute(self, **kwargs) -> Dict[str, Any]: FILE: kirara_ai/workflow/core/block/input_output.py class Input (line 4) | class Input: method __init__ (line 5) | def __init__( method validate (line 21) | def validate(self, value: Any) -> bool: class Output (line 27) | class Output: method __init__ (line 28) | def __init__(self, name: str, label: str, data_type: type, description... method validate (line 34) | def validate(self, value: Any) -> bool: FILE: kirara_ai/workflow/core/block/param.py class ParamMeta (line 9) | class ParamMeta: method __init__ (line 10) | def __init__(self, label: Optional[str] = None, description: Optional[... method __repr__ (line 15) | def __repr__(self): method __str__ (line 18) | def __str__(self): FILE: kirara_ai/workflow/core/block/registry.py function extract_block_param (line 12) | def extract_block_param(param: Parameter, type_system: TypeSystem) -> Bl... class BlockRegistry (line 66) | class BlockRegistry: method __init__ (line 69) | def __init__(self): method register (line 74) | def register( method get (line 104) | def get(self, full_name: str) -> Optional[Type[Block]]: method get_localized_name (line 108) | def get_localized_name(self, block_id: str) -> Optional[str]: method clear (line 112) | def clear(self): method get_block_type_name (line 117) | def get_block_type_name(self, block_class: Type[Block]) -> str: method get_all_types (line 130) | def get_all_types(self) -> List[Type[Block]]: method extract_block_info (line 134) | def extract_block_info( method get_builtin_params (line 189) | def get_builtin_params(self) -> List[str]: method get_type_compatibility_map (line 194) | def get_type_compatibility_map(self) -> Dict[str, Dict[str, bool]]: method is_type_compatible (line 198) | def is_type_compatible(self, source_type: str, target_type: str) -> bool: FILE: kirara_ai/workflow/core/block/schema.py class BlockInput (line 8) | class BlockInput(BaseModel): class BlockOutput (line 19) | class BlockOutput(BaseModel): class BlockConfig (line 28) | class BlockConfig(BaseModel): FILE: kirara_ai/workflow/core/block/type_system.py class TypeSystem (line 5) | class TypeSystem: method __init__ (line 8) | def __init__(self) -> None: method register_type (line 12) | def register_type(self, type_name: str, type_class: Type): method get_type (line 16) | def get_type(self, type_name: str) -> Optional[Type]: method get_type_name (line 20) | def get_type_name(self, type_obj: Type) -> str: method extract_type_info (line 27) | def extract_type_info(self, param: Parameter) -> tuple[str, bool, Any]... method extract_type_info (line 30) | def extract_type_info(self, param: Type) -> tuple[str, bool, Any]: ... method extract_type_info (line 32) | def extract_type_info(self, param: Union[Parameter, Type]) -> tuple[st... method is_compatible (line 76) | def is_compatible(self, source_type: str, target_type: str) -> bool: method get_compatibility_map (line 109) | def get_compatibility_map(self) -> Dict[str, Dict[str, bool]]: FILE: kirara_ai/workflow/core/dispatch/dispatcher.py class WorkflowDispatcher (line 16) | class WorkflowDispatcher: method __init__ (line 19) | def __init__(self, container: DependencyContainer): method register_rule (line 27) | def register_rule(self, rule: CombinedDispatchRule): method dispatch (line 32) | async def dispatch(self, source: IMAdapter, message: IMMessage): FILE: kirara_ai/workflow/core/dispatch/exceptions.py class WorkflowNotFoundException (line 1) | class WorkflowNotFoundException(Exception): method __init__ (line 4) | def __init__(self, message: str): FILE: kirara_ai/workflow/core/dispatch/models/dispatch_rules.py class SimpleDispatchRule (line 13) | class SimpleDispatchRule(BaseModel): class RuleGroup (line 18) | class RuleGroup(BaseModel): class CombinedDispatchRule (line 23) | class CombinedDispatchRule(BaseModel): method match (line 34) | def match(self, message: IMMessage, workflow_registry: WorkflowRegistr... method get_workflow (line 83) | def get_workflow(self, container: DependencyContainer) -> Optional[Wor... FILE: kirara_ai/workflow/core/dispatch/registry.py class DispatchRuleRegistry (line 17) | class DispatchRuleRegistry: method __init__ (line 20) | def __init__(self, container: DependencyContainer): method register (line 27) | def register(self, rule: CombinedDispatchRule): method get_rule (line 34) | def get_rule(self, rule_id: str) -> Optional[CombinedDispatchRule]: method get_all_rules (line 38) | def get_all_rules(self) -> List[CombinedDispatchRule]: method get_active_rules (line 42) | def get_active_rules(self) -> List[CombinedDispatchRule]: method create_rule (line 47) | def create_rule(self, rule: CombinedDispatchRule) -> CombinedDispatchR... method update_rule (line 58) | def update_rule( method delete_rule (line 69) | def delete_rule(self, rule_id: str): method enable_rule (line 75) | def enable_rule(self, rule_id: str): method disable_rule (line 82) | def disable_rule(self, rule_id: str): method _convert_old_rule (line 89) | def _convert_old_rule(self, rule_data: Dict[str, Any]) -> CombinedDisp... method load_rules (line 116) | def load_rules(self, rules_dir: Optional[str] = None): method save_rules (line 158) | def save_rules(self, rules_dir: Optional[str] = None): FILE: kirara_ai/workflow/core/dispatch/rules/base.py class RuleConfig (line 12) | class RuleConfig(BaseModel): class DispatchRule (line 15) | class DispatchRule(ABC): method __init__ (line 25) | def __init__(self, workflow_registry: WorkflowRegistry, workflow_id: s... method match (line 37) | def match(self, message: IMMessage, container: DependencyContainer) ->... method get_workflow (line 40) | def get_workflow(self, container: DependencyContainer) -> Workflow: method register_rule_type (line 47) | def register_rule_type(cls, rule_class: Type["DispatchRule"]): method get_rule_type (line 52) | def get_rule_type(cls, type_name: str) -> Type["DispatchRule"]: method get_config (line 59) | def get_config(self) -> RuleConfig: method from_config (line 64) | def from_config( method __str__ (line 69) | def __str__(self) -> str: FILE: kirara_ai/workflow/core/dispatch/rules/message_rules.py class RegexRuleConfig (line 14) | class RegexRuleConfig(RuleConfig): class RegexMatchRule (line 18) | class RegexMatchRule(DispatchRule): method __init__ (line 23) | def __init__(self, pattern: str, workflow_registry: WorkflowRegistry, ... method match (line 27) | def match(self, message: IMMessage, container: DependencyContainer) ->... method get_config (line 30) | def get_config(self) -> RegexRuleConfig: method from_config (line 34) | def from_config(cls, config: RegexRuleConfig, workflow_registry: Workf... class PrefixRuleConfig (line 37) | class PrefixRuleConfig(RuleConfig): class PrefixMatchRule (line 41) | class PrefixMatchRule(DispatchRule): method __init__ (line 46) | def __init__(self, prefix: str, workflow_registry: WorkflowRegistry, w... method match (line 50) | def match(self, message: IMMessage, container: DependencyContainer) ->... method get_config (line 60) | def get_config(self) -> PrefixRuleConfig: method from_config (line 64) | def from_config(cls, config: PrefixRuleConfig, workflow_registry: Work... class KeywordRuleConfig (line 68) | class KeywordRuleConfig(RuleConfig): class KeywordMatchRule (line 72) | class KeywordMatchRule(DispatchRule): method __init__ (line 77) | def __init__(self, keywords: list[str], workflow_registry: WorkflowReg... method match (line 81) | def match(self, message: IMMessage, container: DependencyContainer) ->... method get_config (line 84) | def get_config(self) -> KeywordRuleConfig: method from_config (line 88) | def from_config(cls, config: KeywordRuleConfig, workflow_registry: Wor... class BotMentionMatchRule (line 91) | class BotMentionMatchRule(DispatchRule): method __init__ (line 96) | def __init__(self, workflow_registry: WorkflowRegistry, workflow_id: s... method match (line 99) | def match(self, message: IMMessage, container: DependencyContainer) ->... method get_config (line 103) | def get_config(self) -> RuleConfig: method from_config (line 107) | def from_config(cls, config: RuleConfig, workflow_registry: WorkflowRe... FILE: kirara_ai/workflow/core/dispatch/rules/sender_rules.py class ChatSenderMatchRuleConfig (line 13) | class ChatSenderMatchRuleConfig(RuleConfig): class ChatSenderMatchRule (line 20) | class ChatSenderMatchRule(DispatchRule): method __init__ (line 25) | def __init__( method match (line 35) | def match(self, message: IMMessage, container: DependencyContainer) ->... method get_config (line 47) | def get_config(self) -> ChatSenderMatchRuleConfig: method from_config (line 53) | def from_config( class ChatSenderMismatchRule (line 61) | class ChatSenderMismatchRule(DispatchRule): method __init__ (line 66) | def __init__( method match (line 77) | def match(self, message: IMMessage, container: DependencyContainer) ->... method get_config (line 89) | def get_config(self) -> ChatSenderMatchRuleConfig: method from_config (line 95) | def from_config( class ChatTypeMatchRuleConfig (line 104) | class ChatTypeMatchRuleConfig(RuleConfig): class ChatTypeMatchRule (line 108) | class ChatTypeMatchRule(DispatchRule): method __init__ (line 113) | def __init__(self, chat_type: ChatType, workflow_registry: WorkflowReg... method match (line 117) | def match(self, message: IMMessage, container: DependencyContainer) ->... method get_config (line 120) | def get_config(self) -> ChatTypeMatchRuleConfig: method from_config (line 124) | def from_config(cls, config: ChatTypeMatchRuleConfig, workflow_registr... FILE: kirara_ai/workflow/core/dispatch/rules/system_rules.py class RandomChanceRuleConfig (line 14) | class RandomChanceRuleConfig(RuleConfig): class RandomChanceMatchRule (line 20) | class RandomChanceMatchRule(DispatchRule): method __init__ (line 25) | def __init__(self, chance: int, workflow_registry: WorkflowRegistry, w... method match (line 29) | def match(self, message: IMMessage, container: DependencyContainer) ->... method get_config (line 34) | def get_config(self) -> RandomChanceRuleConfig: method from_config (line 38) | def from_config( class IMInstanceMatchRuleConfig (line 43) | class IMInstanceMatchRuleConfig(RuleConfig): class IMInstanceMatchRule (line 47) | class IMInstanceMatchRule(DispatchRule): method __init__ (line 52) | def __init__(self, im_instance: str, workflow_registry: WorkflowRegist... method match (line 56) | def match(self, message: IMMessage, container: DependencyContainer) ->... method get_config (line 61) | def get_config(self) -> IMInstanceMatchRuleConfig: method from_config (line 65) | def from_config( class FallbackMatchRule (line 71) | class FallbackMatchRule(DispatchRule): method __init__ (line 76) | def __init__(self, workflow_registry: WorkflowRegistry, workflow_id: s... method match (line 80) | def match(self, message: IMMessage, container: DependencyContainer) ->... method get_config (line 83) | def get_config(self) -> RuleConfig: method from_config (line 87) | def from_config( FILE: kirara_ai/workflow/core/execution/exceptions.py class BlockExecutionFailedException (line 1) | class BlockExecutionFailedException(Exception): class WorkflowExecutionTimeoutException (line 4) | class WorkflowExecutionTimeoutException(Exception): FILE: kirara_ai/workflow/core/execution/executor.py class WorkflowExecutor (line 18) | class WorkflowExecutor: method __init__ (line 21) | def __init__(self, container: DependencyContainer, workflow: Workflow,... method _build_execution_graph (line 41) | def _build_execution_graph(self): method run (line 70) | async def run(self) -> Dict[str, Any]: method _execute_nodes (line 99) | async def _execute_nodes(self, blocks: List[Block], executor, loop): method _execute_conditional_branch (line 112) | async def _execute_conditional_branch(self, block: ConditionBlock, exe... method _execute_loop (line 135) | async def _execute_loop(self, block: LoopBlock, executor, loop): method _execute_normal_block (line 162) | async def _execute_normal_block(self, block: Block, executor, loop): method _can_execute (line 201) | def _can_execute(self, block: Block) -> bool: method _gather_inputs (line 243) | def _gather_inputs(self, block: Block) -> Dict[str, Any]: method set_variable (line 274) | def set_variable(self, name: str, value: Any) -> None: method get_variable (line 283) | def get_variable(self, name: str, default: Any = None) -> Any: FILE: kirara_ai/workflow/core/workflow/base.py class WorkflowConfig (line 8) | class WorkflowConfig(BaseModel): class Workflow (line 11) | class Workflow: method __init__ (line 12) | def __init__(self, name: str, blocks: List["Block"], wires: List["Wire... class Wire (line 20) | class Wire: method __init__ (line 21) | def __init__( method __repr__ (line 33) | def __repr__(self): FILE: kirara_ai/workflow/core/workflow/builder.py function get_block_class (line 17) | def get_block_class(type_name: str, registry: BlockRegistry) -> Type[Blo... class BlockSpec (line 33) | class BlockSpec: method __post_init__ (line 41) | def __post_init__(self): class Node (line 47) | class Node: method __init__ (line 59) | def __init__( method ancestors (line 85) | def ancestors(self) -> List["Node"]: class WorkflowBuilder (line 95) | class WorkflowBuilder: method __init__ (line 176) | def __init__(self, name: str): method _generate_unique_name (line 187) | def _generate_unique_name(self, base_name: str) -> str: method _parse_block_spec (line 198) | def _parse_block_spec(self, block_spec: Union[Type[Block], tuple]) -> ... method _get_available_inputs (line 221) | def _get_available_inputs(self, node: Node) -> List[str]: method _find_matching_ports (line 227) | def _find_matching_ports( method _store_wire_spec (line 253) | def _store_wire_spec( method _create_node (line 277) | def _create_node(self, spec: BlockSpec, is_parallel: bool = False) -> ... method use (line 298) | def use( method chain (line 307) | def chain( method parallel (line 322) | def parallel( method condition (line 339) | def condition(self, condition_func: Callable) -> "WorkflowBuilder": method if_then (line 345) | def if_then( method else_then (line 368) | def else_then(self) -> "WorkflowBuilder": method end_if (line 375) | def end_if(self) -> "WorkflowBuilder": method loop (line 382) | def loop( method end_loop (line 412) | def end_loop(self) -> "WorkflowBuilder": method build (line 437) | def build(self, container: DependencyContainer) -> Workflow: method set_config (line 472) | def set_config(self, config: WorkflowConfig): method force_connect (line 476) | def force_connect( method _find_parallel_nodes (line 486) | def _find_parallel_nodes(self, start_node: Node) -> List[Node]: method update_position (line 499) | def update_position(self, name: str, position: Dict[str, int]): method save_to_yaml (line 504) | def save_to_yaml(self, file_path: str, container: DependencyContainer): method load_from_yaml (line 566) | def load_from_yaml( FILE: kirara_ai/workflow/core/workflow/registry.py class WorkflowRegistry (line 11) | class WorkflowRegistry: method __init__ (line 16) | def __init__(self, container: DependencyContainer): method get_workflow_path (line 22) | def get_workflow_path(cls, group_id: str, workflow_id: str) -> str: method unregister (line 47) | def unregister(self, group_id: str, workflow_id: str): method register (line 54) | def register( method register_preset_workflow (line 65) | def register_preset_workflow( method get_workflow (line 78) | def get_workflow(self, name: str, container: DependencyContainer) -> O... method get (line 84) | def get( method load_workflows (line 93) | def load_workflows(self, workflows_dir: Optional[str] = None): FILE: kirara_ai/workflow/implementations/blocks/game/dice.py class DiceRoll (line 11) | class DiceRoll(Block): method execute (line 24) | def execute(self, message: IMMessage) -> Dict[str, Any]: FILE: kirara_ai/workflow/implementations/blocks/game/gacha.py class GachaSimulator (line 10) | class GachaSimulator(Block): method __init__ (line 21) | def __init__(self, rates: Optional[Dict[str, float]] = None): method _single_pull (line 25) | def _single_pull(self) -> str: method execute (line 34) | def execute(self, message: IMMessage) -> Dict[str, IMMessage]: FILE: kirara_ai/workflow/implementations/blocks/im/basic.py class ExtractChatSender (line 10) | class ExtractChatSender(Block): method execute (line 18) | def execute(self, **kwargs) -> Dict[str, Any]: FILE: kirara_ai/workflow/implementations/blocks/im/messages.py function im_adapter_options_provider (line 12) | def im_adapter_options_provider(container: DependencyContainer, block: B... class GetIMMessage (line 15) | class GetIMMessage(Block): method execute (line 25) | def execute(self, **kwargs) -> Dict[str, Any]: class SendIMMessage (line 30) | class SendIMMessage(Block): method __init__ (line 47) | def __init__( method execute (line 52) | def execute( class IMMessageToText (line 70) | class IMMessageToText(Block): method execute (line 78) | def execute(self, msg: IMMessage) -> Dict[str, Any]: class TextToIMMessage (line 83) | class TextToIMMessage(Block): method __init__ (line 91) | def __init__(self, split_by: Annotated[Optional[str], ParamMeta(label=... method execute (line 94) | def execute(self, text: str) -> Dict[str, Any]: class AppendIMMessage (line 101) | class AppendIMMessage(Block): method execute (line 112) | def execute(self, base_msg: IMMessage, append_msg: MessageElement) -> ... FILE: kirara_ai/workflow/implementations/blocks/im/states.py class ToggleEditState (line 11) | class ToggleEditState(Block): method __init__ (line 19) | def __init__( method execute (line 27) | def execute(self, sender: ChatSender) -> Dict[str, Any]: FILE: kirara_ai/workflow/implementations/blocks/im/user_profile.py class QueryUserProfileBlock (line 12) | class QueryUserProfileBlock(Block): method __init__ (line 13) | def __init__(self, container: DependencyContainer): method execute (line 26) | def execute( FILE: kirara_ai/workflow/implementations/blocks/llm/basic.py class LLMResponseToText (line 11) | class LLMResponseToText(Block): method execute (line 19) | def execute(self, response: LLMChatResponse) -> Dict[str, Any]: FILE: kirara_ai/workflow/implementations/blocks/llm/chat.py function model_name_options_provider (line 21) | def model_name_options_provider(container: DependencyContainer, block: B... class ChatMessageConstructor (line 26) | class ChatMessageConstructor(Block): method substitute_variables (line 45) | def substitute_variables(self, text: str, executor: WorkflowExecutor) ... method execute (line 81) | def execute( class ChatCompletion (line 129) | class ChatCompletion(Block): method __init__ (line 137) | def __init__( method execute (line 150) | def execute(self, prompt: List[LLMChatMessage]) -> Dict[str, Any]: class ChatResponseConverter (line 172) | class ChatResponseConverter(Block): method execute (line 178) | def execute(self, resp: LLMChatResponse) -> Dict[str, Any]: class ChatCompletionWithTools (line 194) | class ChatCompletionWithTools(Block): method __init__ (line 210) | def __init__(self, model_name: Annotated[ method execute (line 227) | def execute(self, msg: List[LLMChatMessage], tools: List[Tool]) -> Dic... FILE: kirara_ai/workflow/implementations/blocks/llm/image.py class SimpleStableDiffusionWebUI (line 11) | class SimpleStableDiffusionWebUI(Block): method __init__ (line 19) | def __init__( method execute (line 40) | def execute(self, prompt: str, negative_prompt: str) -> Dict[str, Any]: FILE: kirara_ai/workflow/implementations/blocks/mcp/tool.py function get_enabled_mcp_tools (line 18) | def get_enabled_mcp_tools(container: DependencyContainer, block: Block) ... class MCPToolProvider (line 23) | class MCPToolProvider(Block): method __init__ (line 34) | def __init__(self, enabled_tools: Annotated[List[str], ParamMeta(label... method _call_tool (line 38) | async def _call_tool(self, tool_call: ToolCall) -> LLMToolResultContent: method execute (line 57) | def execute(self) -> Dict[str, Any]: method _create_tool_result (line 81) | async def _create_tool_result(self, tool_id: str, tool_name: str, cont... FILE: kirara_ai/workflow/implementations/blocks/memory/chat_memory.py function scope_type_options_provider (line 14) | def scope_type_options_provider(container: DependencyContainer, block: B... function decomposer_name_options_provider (line 18) | def decomposer_name_options_provider(container: DependencyContainer, blo... class ChatMemoryQuery (line 22) | class ChatMemoryQuery(Block): method __init__ (line 33) | def __init__( method execute (line 63) | def execute(self, chat_sender: ChatSender) -> Dict[str, Any]: class ChatMemoryStore (line 84) | class ChatMemoryStore(Block): method __init__ (line 99) | def __init__( method execute (line 121) | def execute( FILE: kirara_ai/workflow/implementations/blocks/memory/clear_memory.py class ClearMemory (line 11) | class ClearMemory(Block): method __init__ (line 21) | def __init__( method execute (line 29) | def execute(self, chat_sender: ChatSender) -> Dict[str, Any]: FILE: kirara_ai/workflow/implementations/blocks/system/basic.py class TextBlock (line 10) | class TextBlock(Block): method __init__ (line 14) | def __init__( method execute (line 19) | def execute(self) -> Dict[str, Any]: class TextConcatBlock (line 24) | class TextConcatBlock(Block): method execute (line 32) | def execute(self, text1: str, text2: str) -> Dict[str, Any]: class TextReplaceBlock (line 37) | class TextReplaceBlock(Block): method __init__ (line 45) | def __init__( method execute (line 50) | def execute(self, text: str, new_text: Any) -> Dict[str, Any]: class TextExtractByRegexBlock (line 57) | class TextExtractByRegexBlock(Block): method __init__ (line 62) | def __init__( method execute (line 67) | def execute(self, text: str) -> Dict[str, Any]: class CurrentTimeBlock (line 79) | class CurrentTimeBlock(Block): method execute (line 83) | def execute(self) -> Dict[str, Any]: class CodeBlock (line 87) | class CodeBlock(Block): method __init__ (line 92) | def __init__(self, method execute (line 105) | def execute(self, **kwargs: Any) -> Dict[str, Any]: # 使用 Any 兼容各种输入类型 FILE: kirara_ai/workflow/implementations/blocks/system/help.py function _format_rule_condition (line 11) | def _format_rule_condition(rule_type: str, config: Dict[str, Any]) -> str: function _format_rule_group (line 29) | def _format_rule_group(group: RuleGroup) -> str: class GenerateHelp (line 41) | class GenerateHelp(Block): method execute (line 49) | def execute(self) -> Dict[str, Any]: FILE: kirara_ai/workflow/implementations/blocks/system_blocks.py function register_system_blocks (line 20) | def register_system_blocks(registry: BlockRegistry): FILE: kirara_ai/workflow/implementations/blocks/variables/variable_blocks.py class SetVariableBlock (line 11) | class SetVariableBlock(Block): method __init__ (line 12) | def __init__(self, container: DependencyContainer): method execute (line 21) | def execute(self, name: str, value: Any) -> Dict[str, Any]: class GetVariableBlock (line 27) | class GetVariableBlock(Block): method __init__ (line 28) | def __init__(self, container: DependencyContainer, var_type: Type[T]): method execute (line 38) | def execute(self, name: str, default: Optional[T] = None) -> Dict[str,... FILE: kirara_ai/workflow/implementations/factories/default_factory.py class DefaultWorkflowFactory (line 11) | class DefaultWorkflowFactory: method create_default_workflow (line 17) | def create_default_workflow() -> WorkflowBuilder: FILE: kirara_ai/workflow/implementations/factories/game_factory.py class GameWorkflowFactory (line 7) | class GameWorkflowFactory: method create_dice_workflow (line 11) | def create_dice_workflow() -> WorkflowBuilder: method create_gacha_workflow (line 21) | def create_gacha_workflow() -> WorkflowBuilder: FILE: kirara_ai/workflow/implementations/factories/system_factory.py class SystemWorkflowFactory (line 7) | class SystemWorkflowFactory: method create_help_workflow (line 11) | def create_help_workflow() -> WorkflowBuilder: method create_clear_memory_workflow (line 16) | def create_clear_memory_workflow() -> WorkflowBuilder: FILE: kirara_ai/workflow/implementations/workflows/system_workflows.py function register_system_workflows (line 7) | def register_system_workflows(registry: WorkflowRegistry): FILE: tests/llm_adapters/conftest.py function container (line 8) | def container(): function mock_endpoint (line 12) | def mock_endpoint(): function mock_endpoint_test_client (line 40) | def mock_endpoint_test_client(): class MockMedia (line 53) | class MockMedia(MagicMock): method get_base64 (line 54) | async def get_base64(self) -> str: method get_url (line 57) | async def get_url(self) -> str: method description (line 61) | def description(self) -> str: function mock_media_manager (line 65) | def mock_media_manager(): class MockTracer (line 76) | class MockTracer(MagicMock): method start_request_tracking (line 77) | def start_request_tracking(self, *_) -> str: method fail_request_tracking (line 80) | def fail_request_tracking(self, *_) -> None: method complete_request_tracking (line 83) | def complete_request_tracking(self, *_) -> None: function mock_tracer (line 87) | def mock_tracer() -> MockTracer: FILE: tests/llm_adapters/mock_app/app.py function default_authenticate (line 12) | def default_authenticate(authorization: str = Header(...)) -> None: FILE: tests/llm_adapters/mock_app/gemini.py function gemini_authenticate (line 8) | async def gemini_authenticate(key: str = Query(...)) -> None: function chat (line 15) | async def chat(model: str, request:ChatRequest = Body()) -> dict: function batch_embed_contents (line 40) | async def batch_embed_contents(model: str, _: BatchEmbeddingRequest = Bo... FILE: tests/llm_adapters/mock_app/models/gemini.py class BatchEmbeddingPart (line 8) | class BatchEmbeddingPart(BaseModel): class BatchEmbeddingParts (line 10) | class BatchEmbeddingParts(BaseModel): class BatchEmbeddingPayload (line 12) | class BatchEmbeddingPayload(BaseModel): class BatchEmbeddingRequest (line 16) | class BatchEmbeddingRequest(BaseModel): class Blob (line 19) | class Blob(BaseModel): class FunctionCall (line 23) | class FunctionCall(BaseModel): method regex_validator (line 30) | def regex_validator(cls, value: str) -> str: class FunctionResponse (line 35) | class FunctionResponse(BaseModel): method regex_validator (line 42) | def regex_validator(cls, value: str) -> str: class FileData (line 47) | class FileData(BaseModel): class ExecutableCode (line 51) | class ExecutableCode(BaseModel): class CodeExecutionResult (line 55) | class CodeExecutionResult(BaseModel): class Part (line 59) | class Part(BaseModel): method validate_mutually_exclusive_fields (line 73) | def validate_mutually_exclusive_fields(self) -> Self: class Content (line 89) | class Content(BaseModel): class FunctionDeclaration (line 93) | class FunctionDeclaration(BaseModel): method regex_validator (line 101) | def regex_validator(cls, value: str) -> str: class DynamicRetrievalConfig (line 105) | class DynamicRetrievalConfig(BaseModel): class GoogleSearchRetrieval (line 109) | class GoogleSearchRetrieval(BaseModel): class Tool (line 112) | class Tool(BaseModel): class FunctionCallingConfig (line 118) | class FunctionCallingConfig(BaseModel): class ToolConfig (line 122) | class ToolConfig(BaseModel): class SafetySettings (line 125) | class SafetySettings(BaseModel): class PrebuiltVoiceConfig (line 147) | class PrebuiltVoiceConfig(BaseModel): class VoiceConfig (line 150) | class VoiceConfig(BaseModel): class SpeechConfig (line 153) | class SpeechConfig(BaseModel): class GenerationConfig (line 157) | class GenerationConfig(BaseModel): method stop_sequences_validator (line 186) | def stop_sequences_validator(cls, value: list[str]) -> list[str]: class ThinkingConfig (line 191) | class ThinkingConfig(BaseModel): class ChatRequest (line 195) | class ChatRequest(BaseModel): FILE: tests/llm_adapters/mock_app/models/openai.py class ImageUrl (line 5) | class ImageUrl(BaseModel): class InputAudio (line 9) | class InputAudio(BaseModel): class File (line 13) | class File(BaseModel): class TextContent (line 18) | class TextContent(BaseModel): class ImageContent (line 22) | class ImageContent(BaseModel): class AudioContent (line 26) | class AudioContent(BaseModel): class FileContent (line 30) | class FileContent(BaseModel): class RefusalContent (line 34) | class RefusalContent(BaseModel): class Function (line 41) | class Function(BaseModel): class ToolCall (line 45) | class ToolCall(BaseModel): class DeveloperMessage (line 50) | class DeveloperMessage(BaseModel): class SystemMessage (line 55) | class SystemMessage(BaseModel): class UserMessage (line 60) | class UserMessage(BaseModel): class AssistantMessage (line 65) | class AssistantMessage(BaseModel): class ToolMessage (line 73) | class ToolMessage(BaseModel): class TopAudio (line 80) | class TopAudio(BaseModel): class StaticContent (line 85) | class StaticContent(BaseModel): class ChatRequest (line 89) | class ChatRequest(BaseModel): method validate_top_logprobs (line 120) | def validate_top_logprobs(self) -> Self: class EmbeddingRequest (line 127) | class EmbeddingRequest(BaseModel): method custom_validate (line 135) | def custom_validate(self) -> Self: FILE: tests/llm_adapters/mock_app/ollama.py class EmbeddingRequest (line 6) | class EmbeddingRequest(BaseModel): function embedding (line 14) | async def embedding(request: EmbeddingRequest = Body(...)) -> dict: FILE: tests/llm_adapters/mock_app/openai.py function completions (line 10) | async def completions(request: ChatRequest = Body(...)) -> dict: function embeddings (line 49) | async def embeddings(request: EmbeddingRequest = Body(...)) -> dict: FILE: tests/llm_adapters/mock_app/voyage.py class EmbeddingRequest (line 7) | class EmbeddingRequest(BaseModel): class ReRankRequest (line 11) | class ReRankRequest(BaseModel): class TextContent (line 17) | class TextContent(BaseModel): class ImageBase64Content (line 21) | class ImageBase64Content(BaseModel): class ImageUrlContent (line 25) | class ImageUrlContent(BaseModel): class CombinedContent (line 29) | class CombinedContent(BaseModel): class MultiModalRequest (line 32) | class MultiModalRequest(BaseModel): function get_embeddings (line 39) | async def get_embeddings(request: EmbeddingRequest = Body(...)) -> dict: function get_multimodal_embeddings (line 56) | async def get_multimodal_embeddings(request: MultiModalRequest = Body(..... function get_rerank (line 75) | async def get_rerank(request: ReRankRequest = Body(...)) -> dict: FILE: tests/llm_adapters/test_gemini_adapter.py class TestGeminiAdapter (line 12) | class TestGeminiAdapter: method gemini_adapter (line 14) | def gemini_adapter(self, mock_media_manager, mock_tracer) -> GeminiAda... method test_chat (line 25) | def test_chat(self, gemini_adapter): method test_embed (line 46) | def test_embed(self, gemini_adapter: GeminiAdapter): FILE: tests/llm_adapters/test_ollama_adapter.py class TestOllamaAdapter (line 8) | class TestOllamaAdapter: method ollama_adapter (line 10) | def ollama_adapter(self, mock_media_manager) -> OllamaAdapter: method test_embedding (line 18) | def test_embedding(self, ollama_adapter: OllamaAdapter): method test_embedding_with_image (line 28) | def test_embedding_with_image(self, ollama_adapter: OllamaAdapter): FILE: tests/llm_adapters/test_openai_adapter.py class TestOpenAIAdapter (line 10) | class TestOpenAIAdapter: method openai_adapter (line 12) | def openai_adapter(self, mock_media_manager, mock_tracer) -> OpenAIAda... method test_embed (line 25) | def test_embed(self, openai_adapter: OpenAIAdapter): method test_embed_with_image (line 35) | def test_embed_with_image(self, openai_adapter: OpenAIAdapter): method test_embed_with_input_out_of_range (line 44) | def test_embed_with_input_out_of_range(self, openai_adapter: OpenAIAda... method test_old_embedding_model_rasies_error (line 53) | def test_old_embedding_model_rasies_error(self, openai_adapter: OpenAI... method test_normal_chat (line 64) | def test_normal_chat(self, openai_adapter: OpenAIAdapter): FILE: tests/llm_adapters/test_voyage_adapter.py class TestVoyageAdapter (line 11) | class TestVoyageAdapter: method voyage_adapter (line 13) | def voyage_adapter(self, mock_media_manager): method test_embedding (line 22) | def test_embedding(self, voyage_adapter: VoyageAdapter): method test_multi_modal_embedding (line 36) | def test_multi_modal_embedding(self, voyage_adapter: VoyageAdapter): method test_rerank_without_sort (line 51) | def test_rerank_without_sort(self, voyage_adapter: VoyageAdapter): method test_rerank_with_sort (line 72) | def test_rerank_with_sort(self, voyage_adapter: VoyageAdapter): method test_rerank_sort_raise_error (line 88) | def test_rerank_sort_raise_error(self, voyage_adapter: VoyageAdapter): FILE: tests/memory/test_composer_decomposer.py function composer (line 14) | def composer(): function decomposer (line 21) | def decomposer(): function multi_decomposer (line 26) | def multi_decomposer(): function group_sender (line 30) | def group_sender(): function c2c_sender (line 37) | def c2c_sender(): class TestDefaultMemoryComposer (line 41) | class TestDefaultMemoryComposer: method test_compose_group_message (line 42) | def test_compose_group_message(self, composer, group_sender): method test_compose_c2c_message (line 53) | def test_compose_c2c_message(self, composer, c2c_sender): method test_compose_llm_response (line 64) | def test_compose_llm_response(self, composer, c2c_sender): method test_compose_llm_tool_call_message (line 73) | def test_compose_llm_tool_call_message(self, composer, c2c_sender): method test_compose_llm_tool_result_message (line 81) | def test_compose_llm_tool_result_message(self, composer, c2c_sender): class TestDefaultMemoryDecomposer (line 88) | class TestDefaultMemoryDecomposer: method test_decompose_mixed_entries (line 89) | def test_decompose_mixed_entries(self, decomposer, group_sender, c2c_s... method test_decompose_empty (line 110) | def test_decompose_empty(self, decomposer): method test_decompose_max_entries (line 114) | def test_decompose_max_entries(self, decomposer, c2c_sender): class TestMultiElementDecomposer (line 129) | class TestMultiElementDecomposer: method test_decompose_tool_call_and_result_message (line 130) | def test_decompose_tool_call_and_result_message(self, multi_decomposer... FILE: tests/memory/test_composer_strategy.py function mock_container (line 19) | def mock_container(): function sample_context (line 27) | def sample_context(): class TestDropThinkPart (line 35) | class TestDropThinkPart: method test_drop_think_part_with_think_tag (line 36) | def test_drop_think_part_with_think_tag(self): method test_drop_think_part_without_think_tag (line 41) | def test_drop_think_part_without_think_tag(self): class TestTextMessageProcessor (line 46) | class TestTextMessageProcessor: method test_process (line 47) | def test_process(self, mock_container, sample_context): class TestMediaMessageProcessor (line 55) | class TestMediaMessageProcessor: method test_process (line 56) | def test_process(self, mock_container, sample_context): class TestLLMChatTextContentProcessor (line 65) | class TestLLMChatTextContentProcessor: method test_process_normal_text (line 66) | def test_process_normal_text(self, mock_container, sample_context): method test_process_with_think_tag (line 73) | def test_process_with_think_tag(self, mock_container, sample_context): class TestLLMChatImageContentProcessor (line 81) | class TestLLMChatImageContentProcessor: method test_process (line 82) | def test_process(self, mock_container, sample_context): class TestLLMToolCallContentProcessor (line 99) | class TestLLMToolCallContentProcessor: method test_process (line 100) | def test_process(self, mock_container, sample_context): class TestLLMToolResultContentProcessor (line 120) | class TestLLMToolResultContentProcessor: method test_process (line 121) | def test_process(self, mock_container, sample_context): class TestIMMessageProcessor (line 144) | class TestIMMessageProcessor: method test_process_with_text_message (line 145) | def test_process_with_text_message(self, mock_container, sample_context): method test_process_with_media_message (line 159) | def test_process_with_media_message(self, mock_container, sample_conte... class TestLLMChatMessageProcessor (line 176) | class TestLLMChatMessageProcessor: method test_process_with_text_content (line 177) | def test_process_with_text_content(self, mock_container, sample_context): method test_process_with_mixed_content (line 189) | def test_process_with_mixed_content(self, mock_container, sample_conte... method test_process_with_tool_content (line 213) | def test_process_with_tool_content(self, mock_container, sample_context): class TestProcessorFactory (line 232) | class TestProcessorFactory: method test_get_processor_for_im_message (line 233) | def test_get_processor_for_im_message(self, mock_container): method test_get_processor_for_llm_chat_message (line 239) | def test_get_processor_for_llm_chat_message(self, mock_container): method test_get_processor_unknown_type (line 245) | def test_get_processor_unknown_type(self, mock_container): FILE: tests/memory/test_decomposer_strategy.py function mock_container (line 18) | def mock_container(): function sample_entry (line 26) | def sample_entry(): class TestTextContentStrategy (line 49) | class TestTextContentStrategy: method test_extract_content (line 50) | def test_extract_content(self, sample_entry): method test_to_llm_content (line 60) | def test_to_llm_content(self): method test_to_text (line 73) | def test_to_text(self): class TestMediaContentStrategy (line 86) | class TestMediaContentStrategy: method test_extract_content (line 87) | def test_extract_content(self, sample_entry): method test_to_llm_content (line 95) | def test_to_llm_content(self): method test_to_text (line 109) | def test_to_text(self): class TestToolCallContentStrategy (line 123) | class TestToolCallContentStrategy: method test_extract_content (line 124) | def test_extract_content(self, sample_entry): method test_no_metadata_returns_empty (line 133) | def test_no_metadata_returns_empty(self): method test_to_llm_content (line 143) | def test_to_llm_content(self): method test_to_text (line 162) | def test_to_text(self): class TestToolResultContentStrategy (line 179) | class TestToolResultContentStrategy: method test_extract_content (line 180) | def test_extract_content(self, sample_entry): method test_to_llm_content (line 190) | def test_to_llm_content(self): method test_to_text (line 211) | def test_to_text(self): class TestContentParser (line 229) | class TestContentParser: method test_parse_content (line 230) | def test_parse_content(self, sample_entry): method test_to_llm_message (line 240) | def test_to_llm_message(self): method test_to_text (line 254) | def test_to_text(self): class TestDefaultDecomposerStrategy (line 265) | class TestDefaultDecomposerStrategy: method test_decompose_empty_entries (line 266) | def test_decompose_empty_entries(self): method test_decompose_with_entries (line 273) | def test_decompose_with_entries(self, sample_entry): class TestMultiElementDecomposerStrategy (line 283) | class TestMultiElementDecomposerStrategy: method test_decompose_empty_entries (line 284) | def test_decompose_empty_entries(self): method test_process_entry_user_content (line 290) | def test_process_entry_user_content(self): method test_process_entry_with_ai_response (line 305) | def test_process_entry_with_ai_response(self): method test_merge_adjacent_messages (line 322) | def test_merge_adjacent_messages(self): FILE: tests/memory/test_memory_manager.py class DummyMemoryPersistence (line 18) | class DummyMemoryPersistence(MemoryPersistence): method __init__ (line 23) | def __init__(self): method load (line 26) | def load(self, scope_key: str) -> List[MemoryEntry]: method save (line 30) | def save(self, scope_key: str, entries: List[MemoryEntry]) -> None: method stop (line 34) | def stop(self): method flush (line 37) | def flush(self): function container (line 43) | def container(): function memory_manager (line 53) | def memory_manager(container): function test_entry (line 61) | def test_entry(): function mock_scope (line 72) | def mock_scope(): class TestMemoryManager (line 81) | class TestMemoryManager: method test_register_scope (line 82) | def test_register_scope(self, memory_manager): method test_register_composer (line 89) | def test_register_composer(self, memory_manager): method test_register_decomposer (line 96) | def test_register_decomposer(self, memory_manager): method test_store_and_query (line 106) | def test_store_and_query(self, memory_manager, test_entry, mock_scope): method test_max_entries_limit (line 123) | def test_max_entries_limit(self, memory_manager, mock_scope, container): method test_shutdown (line 142) | def test_shutdown(self, memory_manager, test_entry): method test_clear_memory (line 157) | def test_clear_memory(self, memory_manager, mock_scope): FILE: tests/memory/test_persistence.py function test_dir (line 29) | def test_dir(): function file_persistence (line 36) | def file_persistence(test_dir): function chat_senders (line 41) | def chat_senders(): function test_entries (line 48) | def test_entries(chat_senders): function redis_mock (line 67) | def redis_mock(): function redis_persistence (line 72) | def redis_persistence(redis_mock): class TestFileMemoryPersistence (line 78) | class TestFileMemoryPersistence: method test_save_and_load (line 79) | def test_save_and_load(self, file_persistence, test_entries, test_dir): method test_load_nonexistent (line 100) | def test_load_nonexistent(self, file_persistence): class TestRedisMemoryPersistence (line 105) | class TestRedisMemoryPersistence: method test_save (line 106) | def test_save(self, redis_persistence, redis_mock, test_entries): method test_load_with_data (line 111) | def test_load_with_data(self, redis_persistence, redis_mock, chat_send... method test_load_no_data (line 148) | def test_load_no_data(self, redis_persistence, redis_mock): FILE: tests/memory/test_scope.py function group_sender (line 16) | def group_sender(): function c2c_sender (line 23) | def c2c_sender(): function different_group_sender (line 28) | def different_group_sender(): function different_user_sender (line 35) | def different_user_sender(): class TestMemberScope (line 42) | class TestMemberScope: method scope (line 44) | def scope(self): method test_get_scope_key_group (line 47) | def test_get_scope_key_group(self, scope, group_sender): method test_get_scope_key_c2c (line 51) | def test_get_scope_key_c2c(self, scope, c2c_sender): method test_is_in_scope_group_same_user (line 55) | def test_is_in_scope_group_same_user(self, scope, group_sender): method test_is_in_scope_group_different_user (line 61) | def test_is_in_scope_group_different_user( method test_is_in_scope_group_different_group (line 66) | def test_is_in_scope_group_different_group( method test_is_in_scope_c2c_same_user (line 71) | def test_is_in_scope_c2c_same_user(self, scope, c2c_sender): method test_is_in_scope_c2c_different_user (line 75) | def test_is_in_scope_c2c_different_user(self, scope, c2c_sender): method test_is_in_scope_different_chat_type (line 79) | def test_is_in_scope_different_chat_type(self, scope, group_sender, c2... class TestGroupScope (line 83) | class TestGroupScope: method scope (line 85) | def scope(self): method test_get_scope_key_group (line 88) | def test_get_scope_key_group(self, scope, group_sender): method test_get_scope_key_c2c (line 92) | def test_get_scope_key_c2c(self, scope, c2c_sender): method test_is_in_scope_group_same_group (line 96) | def test_is_in_scope_group_same_group( method test_is_in_scope_group_different_group (line 101) | def test_is_in_scope_group_different_group( method test_is_in_scope_c2c_same_user (line 106) | def test_is_in_scope_c2c_same_user(self, scope, c2c_sender): method test_is_in_scope_c2c_different_user (line 110) | def test_is_in_scope_c2c_different_user(self, scope, c2c_sender): method test_is_in_scope_different_chat_type (line 114) | def test_is_in_scope_different_chat_type(self, scope, group_sender, c2... class TestGlobalScope (line 118) | class TestGlobalScope: method scope (line 120) | def scope(self): method test_get_scope_key (line 123) | def test_get_scope_key(self, scope, group_sender, c2c_sender): method test_is_in_scope_always_true (line 127) | def test_is_in_scope_always_true(self, scope, group_sender, c2c_sender): FILE: tests/system_blocks/game/test_dice.py function container (line 10) | def container(): function create_message (line 16) | def create_message(): function test_dice_roll_basic (line 26) | def test_dice_roll_basic(container, create_message): function test_dice_roll_invalid (line 41) | def test_dice_roll_invalid(container, create_message): function test_dice_roll_too_many (line 53) | def test_dice_roll_too_many(container, create_message): function test_dice_roll_with_modifier (line 65) | def test_dice_roll_with_modifier(container, create_message): function test_dice_roll_multiple_dice (line 84) | def test_dice_roll_multiple_dice(container, create_message): FILE: tests/system_blocks/game/test_gacha.py function container (line 10) | def container(): function create_message (line 16) | def create_message(): function test_gacha_single_pull (line 26) | def test_gacha_single_pull(container, create_message): function test_gacha_ten_pull (line 39) | def test_gacha_ten_pull(container, create_message): function test_gacha_custom_rates (line 52) | def test_gacha_custom_rates(container, create_message): FILE: tests/system_blocks/im/test_messages.py class MockIMAdapter (line 15) | class MockIMAdapter(IMAdapter): method send_message (line 16) | async def send_message(self, message, target=None): method convert_to_message (line 19) | def convert_to_message(self, message): method start (line 22) | async def start(self): method stop (line 25) | async def stop(self): class MockIMManager (line 29) | class MockIMManager(IMManager): method __init__ (line 30) | def __init__(self): method get_adapter (line 33) | def get_adapter(self, name): function container (line 38) | def container(): function test_send_im_message_async (line 53) | async def test_send_im_message_async(): function test_get_im_message (line 99) | def test_get_im_message(container): function test_im_message_to_text (line 116) | def test_im_message_to_text(container): function test_text_to_im_message (line 136) | def test_text_to_im_message(): function test_append_im_message (line 165) | def test_append_im_message(): FILE: tests/system_blocks/im/test_states.py class MockAdapter (line 11) | class MockAdapter(IMAdapter, EditStateAdapter): method set_chat_editing_state (line 12) | async def set_chat_editing_state(self, *args, **kwargs): function test_toggle_edit_state_async (line 16) | async def test_toggle_edit_state_async(): FILE: tests/system_blocks/llm/test_basic.py function container (line 10) | def container(): function test_llm_response_to_text (line 15) | def test_llm_response_to_text(): FILE: tests/system_blocks/llm/test_chat.py function get_tools (line 19) | def get_tools() -> list[Tool]: function get_llm_tool_calls (line 46) | def get_llm_tool_calls() -> list[ToolCall]: class MockLLM (line 58) | class MockLLM: method chat (line 59) | def chat(self, request): class MockLLMWithToolCalls (line 73) | class MockLLMWithToolCalls: method __init__ (line 74) | def __init__(self, with_tool_calls=True): method chat (line 78) | def chat(self, request): class MockLLMManager (line 112) | class MockLLMManager(LLMManager): method __init__ (line 113) | def __init__(self): method get_llm_id_by_ability (line 116) | def get_llm_id_by_ability(self, ability): method get_llm (line 119) | def get_llm(self, model_id): class MockLLMManagerWithToolCalls (line 122) | class MockLLMManagerWithToolCalls(LLMManager): method __init__ (line 123) | def __init__(self, with_tool_calls=True): method get_llm_id_by_ability (line 126) | def get_llm_id_by_ability(self, ability): method get_llm (line 129) | def get_llm(self, model_id): function container (line 133) | def container(): function test_chat_message_constructor (line 182) | def test_chat_message_constructor(mock_execute): function test_chat_completion (line 218) | def test_chat_completion(container): function test_chat_response_converter (line 238) | def test_chat_response_converter(): function test_chat_completion_with_tools (line 273) | def test_chat_completion_with_tools(container): function test_chat_completion_with_tools_no_tool_calls (line 307) | def test_chat_completion_with_tools_no_tool_calls(container): FILE: tests/system_blocks/llm/test_image.py function container (line 13) | def container(): function test_simple_stable_diffusion_webui (line 26) | def test_simple_stable_diffusion_webui(container): FILE: tests/system_blocks/memory/test_chat_memory.py class MockMemoryManager (line 16) | class MockMemoryManager(MemoryManager): method __init__ (line 17) | def __init__(self): method query (line 21) | def query(self, *args, **kwargs): method store (line 24) | def store(self, *args, **kwargs): method clear (line 27) | def clear(self, *args, **kwargs): class MockScope (line 32) | class MockScope: method __init__ (line 33) | def __init__(self, name): class MockScopeRegistry (line 38) | class MockScopeRegistry(ScopeRegistry): method get_scope (line 39) | def get_scope(self, name): class MockComposer (line 44) | class MockComposer: method compose (line 45) | def compose(self, sender, messages): class MockComposerRegistry (line 50) | class MockComposerRegistry(ComposerRegistry): method get_composer (line 51) | def get_composer(self, name): class MockDecomposer (line 56) | class MockDecomposer: method decompose (line 57) | def decompose(self, memory_entries): class MockDecomposerRegistry (line 62) | class MockDecomposerRegistry(DecomposerRegistry): method get_decomposer (line 63) | def get_decomposer(self, name): function test_chat_memory_query_async (line 68) | async def test_chat_memory_query_async(): function test_chat_memory_store_async (line 95) | async def test_chat_memory_store_async(): FILE: tests/system_blocks/memory/test_clear_memory.py class MockMemoryManager (line 15) | class MockMemoryManager(MemoryManager): method __init__ (line 16) | def __init__(self, container: DependencyContainer): method clear_memory (line 22) | def clear_memory(self, *args, **kwargs): class MockScope (line 27) | class MockScope: method __init__ (line 28) | def __init__(self, name): method get_scope_key (line 31) | def get_scope_key(self, sender: ChatSender): class MockScopeRegistry (line 36) | class MockScopeRegistry(ScopeRegistry): method get_scope (line 37) | def get_scope(self, name): function test_clear_memory_async (line 42) | async def test_clear_memory_async(): FILE: tests/system_blocks/system/test_basic.py function container (line 13) | def container(): function test_text_block (line 18) | def test_text_block(): function test_text_concat_block (line 31) | def test_text_concat_block(): function test_text_replace_block (line 44) | def test_text_replace_block(): function test_text_extract_by_regex_block (line 61) | def test_text_extract_by_regex_block(): function test_current_time_block (line 78) | def test_current_time_block(): FILE: tests/system_blocks/system/test_help.py function container (line 12) | def container(): function create_mock_rule (line 20) | def create_mock_rule( function test_generate_help_basic (line 36) | def test_generate_help_basic(container): function test_generate_help_empty (line 103) | def test_generate_help_empty(container): function test_generate_help_no_description (line 124) | def test_generate_help_no_description(container): function test_generate_help_complex_rules (line 159) | def test_generate_help_complex_rules(container): FILE: tests/test_config_loader.py class TestConfig (line 9) | class TestConfig(BaseModel): class TestConfigLoader (line 16) | class TestConfigLoader(unittest.TestCase): method setUp (line 17) | def setUp(self): method test_save_config_with_backup (line 21) | def test_save_config_with_backup(self): method test_save_config_without_backup (line 54) | def test_save_config_without_backup(self): FILE: tests/test_game_blocks.py function container (line 13) | def container(): function create_message (line 18) | def create_message(): function test_dice_roll_basic (line 25) | def test_dice_roll_basic(container, create_message): function test_dice_roll_invalid (line 39) | def test_dice_roll_invalid(container, create_message): function test_dice_roll_too_many (line 51) | def test_dice_roll_too_many(container, create_message): function test_gacha_single_pull (line 63) | def test_gacha_single_pull(container, create_message): function test_gacha_ten_pull (line 78) | def test_gacha_ten_pull(container, create_message): function test_gacha_custom_rates (line 92) | def test_gacha_custom_rates(container, create_message): FILE: tests/test_mcp_server.py function stdio_config (line 14) | def stdio_config(): function sse_config (line 23) | def sse_config(): function invalid_config (line 31) | def invalid_config(): class MockClientSession (line 38) | class MockClientSession: method __init__ (line 39) | def __init__(self): method __aenter__ (line 52) | async def __aenter__(self): method __aexit__ (line 55) | async def __aexit__(self, exc_type, exc_val, exc_tb): function test_init (line 59) | def test_init(stdio_config): function test_connect_disconnect_stdio (line 70) | async def test_connect_disconnect_stdio(stdio_config): function test_connect_disconnect_sse (line 93) | async def test_connect_disconnect_sse(sse_config): function test_connect_invalid_config (line 116) | async def test_connect_invalid_config(invalid_config): function test_connect_timeout (line 124) | async def test_connect_timeout(stdio_config): function test_tool_methods (line 142) | async def test_tool_methods(stdio_config): function test_complete (line 166) | async def test_complete(stdio_config): function test_prompt_methods (line 185) | async def test_prompt_methods(stdio_config): function test_resource_methods (line 209) | async def test_resource_methods(stdio_config): FILE: tests/test_media.py class TestMediaManager (line 12) | class TestMediaManager(unittest.TestCase): method setUp (line 15) | def setUp(self): method tearDown (line 75) | def tearDown(self): method test_register_from_path (line 80) | def test_register_from_path(self): method test_register_from_data (line 107) | def test_register_from_data(self): method test_register_from_url (line 133) | def test_register_from_url(self): method test_format_detection (line 167) | def test_format_detection(self): method test_reference_management (line 212) | def test_reference_management(self): method test_search (line 240) | def test_search(self): method test_media_message (line 281) | def test_media_message(self): method test_media_message_with_different_formats (line 331) | def test_media_message_with_different_formats(self): FILE: tests/test_media_element.py function test_media_element_from_path (line 21) | async def test_media_element_from_path(): function test_media_element_from_url (line 41) | async def test_media_element_from_url(): function test_media_element_from_data (line 63) | async def test_media_element_from_data(): function test_media_element_format_detection (line 86) | async def test_media_element_format_detection(): function test_media_element_errors (line 94) | async def test_media_element_errors(): FILE: tests/test_system_blocks.py function container (line 12) | def container(): function create_mock_rule (line 19) | def create_mock_rule( function test_generate_help_basic (line 35) | def test_generate_help_basic(container): function test_generate_help_empty (line 102) | def test_generate_help_empty(container): function test_generate_help_no_description (line 123) | def test_generate_help_no_description(container): function test_generate_help_complex_rules (line 158) | def test_generate_help_complex_rules(container): FILE: tests/test_workflow_builder.py class SimpleInputBlock (line 15) | class SimpleInputBlock(Block): method __init__ (line 22) | def __init__(self, param1: str = "default"): method execute (line 26) | def execute(self) -> Dict[str, Any]: class SimpleProcessBlock (line 30) | class SimpleProcessBlock(Block): method __init__ (line 37) | def __init__(self, multiplier: int = 1): method execute (line 41) | def execute(self, in1: str) -> Dict[str, Any]: function setup_module (line 45) | def setup_module(module): function teardown_module (line 53) | def teardown_module(module): class TestWorkflowBuilder (line 58) | class TestWorkflowBuilder: method container (line 60) | def container(self): method yaml_path (line 70) | def yaml_path(self): method test_basic_dsl_construction (line 77) | def test_basic_dsl_construction(self, container): method test_parallel_construction (line 92) | def test_parallel_construction(self, container): method test_save_and_load (line 112) | def test_save_and_load(self, container, yaml_path): method test_complex_workflow_serialization (line 148) | def test_complex_workflow_serialization(self, container, yaml_path): method test_invalid_yaml_handling (line 185) | def test_invalid_yaml_handling(self, container): method test_unregistered_block_warning (line 190) | def test_unregistered_block_warning(self, container, yaml_path): method test_registered_block_no_warning (line 200) | def test_registered_block_no_warning(self, container, yaml_path): FILE: tests/test_workflow_factories.py function container (line 11) | def container(): function test_game_dice_workflow (line 15) | def test_game_dice_workflow(container): function test_game_gacha_workflow (line 27) | def test_game_gacha_workflow(container): function test_system_help_workflow (line 39) | def test_system_help_workflow(container): FILE: tests/tracing/test_base.py class TestTraceRecord (line 19) | class TestTraceRecord(TraceRecord): method update_from_event (line 27) | def update_from_event(self, event): method to_dict (line 30) | def to_dict(self) -> Dict[str, Any]: method to_detail_dict (line 33) | def to_detail_dict(self) -> Dict[str, Any]: class TracingTestBase (line 37) | class TracingTestBase(unittest.TestCase): method setUp (line 40) | def setUp(self): method tearDown (line 54) | def tearDown(self): method create_test_request (line 58) | def create_test_request(self, model: str = "test-model") -> LLMChatReq... method create_test_response (line 65) | def create_test_response(self, usage: Optional[Usage] = None) -> LLMCh... method create_test_trace (line 79) | def create_test_trace(self) -> LLMRequestTrace: FILE: tests/tracing/test_core.py class TestEvent (line 11) | class TestEvent(TraceEvent): method __init__ (line 14) | def __init__(self, trace_id: str): class TestTracer (line 19) | class TestTracer(TracerBase[TestTraceRecord]): method __init__ (line 25) | def __init__(self, container: DependencyContainer): method _register_event_handlers (line 28) | def _register_event_handlers(self): method _unregister_event_handlers (line 31) | def _unregister_event_handlers(self): method _on_test_event (line 34) | def _on_test_event(self, event: TestEvent): class TestTracerBase (line 42) | class TestTracerBase(TracingTestBase, IsolatedAsyncioTestCase): method setUp (line 45) | def setUp(self): method tearDown (line 50) | def tearDown(self): method test_generate_trace_id (line 54) | def test_generate_trace_id(self): method test_get_traces (line 63) | def test_get_traces(self): method test_get_recent_traces (line 86) | def test_get_recent_traces(self): method test_get_trace_by_id (line 97) | def test_get_trace_by_id(self): method test_websocket_operations (line 111) | async def test_websocket_operations(self): method test_save_and_update_trace_record (line 130) | def test_save_and_update_trace_record(self): FILE: tests/tracing/test_decorator.py class TestLLMAdapter (line 11) | class TestLLMAdapter(LLMBackendAdapter, LLMChatProtocol): method __init__ (line 14) | def __init__(self, tracer: LLMTracer): method chat (line 19) | def chat(self, req: LLMChatRequest) -> LLMChatResponse: class TestTraceDecorator (line 25) | class TestTraceDecorator(TracingTestBase): method setUp (line 28) | def setUp(self): method tearDown (line 34) | def tearDown(self): method test_trace_success (line 38) | def test_trace_success(self): method test_trace_failure (line 56) | def test_trace_failure(self): FILE: tests/tracing/test_llm_tracer.py class TestLLMTracer (line 8) | class TestLLMTracer(TracingTestBase): method setUp (line 11) | def setUp(self): method tearDown (line 16) | def tearDown(self): method test_start_request_tracking (line 20) | def test_start_request_tracking(self): method test_complete_request_tracking (line 34) | def test_complete_request_tracking(self): method test_fail_request_tracking (line 50) | def test_fail_request_tracking(self): method test_event_handlers (line 66) | def test_event_handlers(self): method test_get_statistics (line 113) | def test_get_statistics(self): FILE: tests/tracing/test_manager.py class TestTracingManager (line 9) | class TestTracingManager(TracingTestBase, IsolatedAsyncioTestCase): method setUp (line 12) | def setUp(self): method test_register_tracer (line 16) | def test_register_tracer(self): method test_register_duplicate_tracer (line 25) | def test_register_duplicate_tracer(self): method test_get_tracer (line 34) | def test_get_tracer(self): method test_get_all_tracers (line 43) | def test_get_all_tracers(self): method test_initialize_and_shutdown (line 55) | def test_initialize_and_shutdown(self): method test_websocket_operations (line 66) | async def test_websocket_operations(self): method test_trace_operations (line 84) | def test_trace_operations(self): FILE: tests/tracing/test_models.py class TestLLMRequestTrace (line 7) | class TestLLMRequestTrace(TracingTestBase): method setUp (line 10) | def setUp(self): method test_update_from_start_event (line 14) | def test_update_from_start_event(self): method test_update_from_complete_event (line 32) | def test_update_from_complete_event(self): method test_update_from_fail_event (line 54) | def test_update_from_fail_event(self): method test_to_dict (line 72) | def test_to_dict(self): method test_request_response_properties (line 100) | def test_request_response_properties(self): FILE: tests/utils/auth_test_utils.py function setup_auth_service (line 12) | def setup_auth_service(container: DependencyContainer) -> None: function auth_headers (line 20) | async def auth_headers(test_client): FILE: tests/utils/test_block_registry.py function create_test_block_registry (line 4) | def create_test_block_registry() -> BlockRegistry: FILE: tests/web/api/im/test_im.py class DummyConfig (line 32) | class DummyConfig(BaseModel): class DummyAdapter (line 39) | class DummyAdapter(IMAdapter): method __init__ (line 44) | def __init__(self, config: DummyConfig): method convert_to_message (line 50) | def convert_to_message(self, raw_message: Any) -> IMMessage: method send_message (line 59) | async def send_message(self, message: IMMessage, recipient: ChatSender): method start (line 63) | async def start(self): method stop (line 67) | async def stop(self): function app (line 74) | def app(): function test_client (line 125) | def test_client(app): class TestIMAdapter (line 131) | class TestIMAdapter: method test_get_adapter_types (line 133) | async def test_get_adapter_types(self, test_client, auth_headers): method test_list_adapters (line 144) | async def test_list_adapters(self, test_client, auth_headers): method test_get_adapter (line 159) | async def test_get_adapter(self, test_client, auth_headers): method test_create_adapter (line 173) | async def test_create_adapter(self, test_client, auth_headers): method test_update_adapter (line 198) | async def test_update_adapter(self, test_client, auth_headers): method test_stop_adapter (line 226) | async def test_stop_adapter(self, test_client, auth_headers): method test_start_adapter (line 244) | async def test_start_adapter(self, test_client, auth_headers): method test_delete_adapter (line 263) | async def test_delete_adapter(self, test_client, auth_headers): method test_get_adapter_config_schema (line 285) | async def test_get_adapter_config_schema(self, test_client, auth_heade... method test_get_adapter_config_schema_not_found (line 311) | async def test_get_adapter_config_schema_not_found(self, test_client, ... FILE: tests/web/api/llm/test_llm.py class TestConfig (line 28) | class TestConfig(BaseModel): class TestAdapter (line 36) | class TestAdapter(LLMBackendAdapter, LLMChatProtocol): method __init__ (line 41) | def __init__(self, config: TestConfig): method chat (line 44) | def chat(self, req: LLMChatRequest) -> LLMChatResponse: function app (line 62) | def app(): function test_client (line 103) | def test_client(app): class TestLLMBackend (line 109) | class TestLLMBackend: method test_get_adapter_types (line 111) | async def test_get_adapter_types(self, test_client, auth_headers): method test_list_backends (line 122) | async def test_list_backends(self, test_client, auth_headers): method test_get_backend (line 137) | async def test_get_backend(self, test_client, auth_headers): method test_create_backend (line 150) | async def test_create_backend(self, test_client, auth_headers): method test_update_backend (line 180) | async def test_update_backend(self, test_client, auth_headers): method test_delete_backend (line 209) | async def test_delete_backend(self, test_client, auth_headers): method test_get_adapter_config_schema (line 231) | async def test_get_adapter_config_schema(self, test_client, auth_heade... method test_get_adapter_config_schema_not_found (line 256) | async def test_get_adapter_config_schema_not_found(self, test_client, ... FILE: tests/web/api/media/test_media.py function temp_media_dir (line 27) | def temp_media_dir(): function container (line 40) | def container(temp_media_dir): function app (line 72) | def app(container): function test_client (line 80) | def test_client(app): class TestMediaAPI (line 89) | class TestMediaAPI: method setup_mocks (line 91) | def setup_mocks(self, container, temp_media_dir): method test_get_system_info (line 130) | def test_get_system_info(self, test_client, auth_headers, container): method test_set_config (line 184) | def test_set_config(self, test_client, auth_headers, container): method test_cleanup_unreferenced (line 222) | def test_cleanup_unreferenced(self, test_client, auth_headers, contain... FILE: tests/web/api/plugin/test_plugin.py function make_test_plugin (line 30) | def make_test_plugin(): function MOCK_PLUGIN_SEARCH_RESPONSE (line 53) | async def MOCK_PLUGIN_SEARCH_RESPONSE(): function MOCK_PLUGIN_INFO_RESPONSE (line 81) | async def MOCK_PLUGIN_INFO_RESPONSE(): function app (line 102) | def app(): function test_client (line 139) | def test_client(app): class TestPlugin (line 145) | class TestPlugin: method test_search_plugins (line 147) | async def test_search_plugins(self, test_client, auth_headers): method test_get_plugin_info (line 165) | async def test_get_plugin_info(self, test_client, auth_headers): method test_get_plugin_details (line 184) | async def test_get_plugin_details(self, test_client, auth_headers): method test_get_nonexistent_plugin (line 199) | async def test_get_nonexistent_plugin(self, test_client, auth_headers): method test_update_plugin (line 210) | async def test_update_plugin(self, test_client, auth_headers): method test_enable_plugin (line 222) | async def test_enable_plugin(self, test_client, auth_headers): method test_disable_plugin (line 239) | async def test_disable_plugin(self, test_client, auth_headers): method test_install_plugin (line 256) | async def test_install_plugin(self, test_client, auth_headers): method test_uninstall_plugin (line 289) | async def test_uninstall_plugin(self, test_client, auth_headers): FILE: tests/web/api/system/test_system.py function app (line 22) | def app(): function test_client (line 62) | def test_client(app): class TestSystemStatus (line 68) | class TestSystemStatus: method test_get_system_status (line 70) | async def test_get_system_status(self, test_client, auth_headers): method test_get_system_status_unauthorized (line 120) | async def test_get_system_status_unauthorized(self, test_client): method test_check_update (line 130) | async def test_check_update(self, test_client, auth_headers): FILE: tests/web/api/workflow/test_workflow.py class MessageBlock (line 25) | class MessageBlock(Block): method __init__ (line 31) | def __init__(self, text: str = ""): method execute (line 35) | def execute(self) -> dict: class LLMBlock (line 39) | class LLMBlock(Block): method __init__ (line 45) | def __init__(self, prompt: str = ""): method execute (line 50) | def execute(self, input: str) -> dict: function app (line 56) | def app(): function test_client (line 94) | def test_client(app): class TestWorkflow (line 100) | class TestWorkflow: method test_list_workflows (line 102) | async def test_list_workflows(self, test_client, auth_headers): method test_get_workflow (line 118) | async def test_get_workflow(self, test_client, auth_headers): method test_create_workflow (line 134) | async def test_create_workflow(self, test_client, auth_headers): method test_update_workflow (line 167) | async def test_update_workflow(self, test_client, auth_headers): method test_delete_workflow (line 202) | async def test_delete_workflow(self, test_client, auth_headers): FILE: tests/web/auth/test_auth.py function app (line 18) | def app(): function test_client (line 29) | def test_client(app): function auth_token (line 35) | async def auth_token(test_client): class TestAuth (line 46) | class TestAuth: method test_check_first_time (line 48) | async def test_check_first_time(self, test_client): method test_normal_login (line 70) | async def test_normal_login(self, test_client): method test_login_wrong_password (line 88) | async def test_login_wrong_password(self, test_client): method test_change_password (line 105) | async def test_change_password(self, test_client, auth_token): method test_change_password_wrong_old (line 122) | async def test_change_password_wrong_old(self, test_client, auth_token): FILE: tests/workflow_executor/test_block.py function test_block_creation (line 18) | def test_block_creation(): function test_block_execute (line 25) | def test_block_execute(): FILE: tests/workflow_executor/test_executor.py class InputBlock (line 16) | class InputBlock(Block): method execute (line 24) | def execute(self, **kwargs): class ProcessBlock (line 28) | class ProcessBlock(Block): method execute (line 41) | def execute(self, input1: str, **kwargs): class OutputBlock (line 45) | class OutputBlock(Block): method execute (line 53) | def execute(self, input1: str, **kwargs): class FailingBlock (line 57) | class FailingBlock(Block): method execute (line 65) | def execute(self, input1: str, **kwargs): function test_executor_run (line 116) | async def test_executor_run(): function test_executor_with_failing_block (line 132) | async def test_executor_with_failing_block(): function test_executor_with_no_blocks (line 145) | async def test_executor_with_no_blocks(): function test_executor_with_multiple_outputs (line 159) | async def test_executor_with_multiple_outputs(): FILE: tests/workflow_executor/test_input_output.py function test_input_validation (line 4) | def test_input_validation(): function test_output_validation (line 23) | def test_output_validation(): FILE: tests/workflow_executor/test_workflow_basic.py function test_workflow_creation (line 47) | def test_workflow_creation():