pyqt_reactive.protocols.llm_service

LLM service protocol for pluggable code generation backends.

Functions

get_llm_service()

Get the registered LLM service implementation.

register_llm_service(service)

Register a global LLM service implementation.

Classes

LLMServiceProtocol(*args, **kwargs)

Protocol for LLM services used by LLMChatPanel.

class pyqt_reactive.protocols.llm_service.LLMServiceProtocol(*args, **kwargs)[source]

Protocol for LLM services used by LLMChatPanel.

api_endpoint: str
model: str | None
test_connection() Tuple[bool, str][source]

Return (is_connected, status_message).

generate_code(request: str, code_type: str | None = None) str[source]

Generate code for a request and optional code type.

__init__(*args, **kwargs)
pyqt_reactive.protocols.llm_service.register_llm_service(service: LLMServiceProtocol) None[source]

Register a global LLM service implementation.

pyqt_reactive.protocols.llm_service.get_llm_service() LLMServiceProtocol | None[source]

Get the registered LLM service implementation.