base
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| InputProvider llmling_agent.ui.base Base class for handling all UI interactions. |
🛈 DocStrings¶
Base input provider class.
InputProvider
¶
Bases: ABC
Base class for handling all UI interactions.
Source code in src/llmling_agent/ui/base.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
get_elicitation
abstractmethod
¶
get_elicitation(
context: AgentContext[Any],
params: ElicitRequestParams,
message_history: list[ChatMessage] | None = None,
) -> Coroutine[Any, Any, ElicitResult | ErrorData]
Get user response to elicitation request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
AgentContext[Any]
|
Current agent context |
required |
params
|
ElicitRequestParams
|
MCP elicit request parameters |
required |
message_history
|
list[ChatMessage] | None
|
Optional conversation history |
None
|
Source code in src/llmling_agent/ui/base.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
get_input
async
¶
get_input(
context: AgentContext,
prompt: str,
output_type: type | None = None,
message_history: list[ChatMessage] | None = None,
) -> Any
Get normal input (used by HumanProvider).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
AgentContext
|
Current agent context |
required |
prompt
|
str
|
The prompt to show to the user |
required |
output_type
|
type | None
|
Optional type for structured responses |
None
|
message_history
|
list[ChatMessage] | None
|
Optional conversation history |
None
|
Source code in src/llmling_agent/ui/base.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |
get_structured_input
async
¶
get_structured_input(
context: AgentContext[Any],
prompt: str,
output_type: type[BaseModel],
message_history: list[ChatMessage] | None = None,
) -> BaseModel
Get structured input, with promptantic and fallback handling.
Source code in src/llmling_agent/ui/base.py
53 54 55 56 57 58 59 60 61 | |
get_text_input
async
¶
get_text_input(
context: AgentContext[Any],
prompt: str,
message_history: list[ChatMessage] | None = None,
) -> str
Get normal text input.
Source code in src/llmling_agent/ui/base.py
44 45 46 47 48 49 50 51 | |
get_tool_confirmation
abstractmethod
¶
get_tool_confirmation(
context: AgentContext[Any],
tool: Tool,
args: dict[str, Any],
message_history: list[ChatMessage] | None = None,
) -> Coroutine[Any, Any, ConfirmationResult]
Get tool execution confirmation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
AgentContext[Any]
|
Current agent context |
required |
tool
|
Tool
|
Information about the tool to be executed |
required |
args
|
dict[str, Any]
|
Tool arguments |
required |
message_history
|
list[ChatMessage] | None
|
Optional conversation history |
None
|
Source code in src/llmling_agent/ui/base.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |