model
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| InputModel llmling_models.models.input_model.model Model that delegates responses to human input. |
||
| InputStreamedResponse llmling_models.models.input_model.model Stream implementation for input model. |
🛈 DocStrings¶
Model that delegates responses to human input.
InputModel
dataclass
¶
Bases: Model
Model that delegates responses to human input.
Source code in src/llmling_models/models/input_model/model.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
handler
class-attribute
instance-attribute
¶
handler: InputHandler | type[InputHandler] = field(default=DefaultInputHandler)
Input handler class to use.
input_prompt
class-attribute
instance-attribute
¶
Prompt to show when requesting input.
prompt_template
class-attribute
instance-attribute
¶
Template for showing the prompt to the human.
show_system
class-attribute
instance-attribute
¶
Whether to show system messages to the human.
request
async
¶
request(
messages: list[ModelMessage],
model_settings: ModelSettings | None,
model_request_parameters: ModelRequestParameters,
) -> ModelResponse
Get response from human input.
Source code in src/llmling_models/models/input_model/model.py
request_stream
async
¶
request_stream(
messages: list[ModelMessage],
model_settings: ModelSettings | None,
model_request_parameters: ModelRequestParameters,
run_context: RunContext[Any] | None = None,
) -> AsyncGenerator[StreamedResponse]
Stream responses character by character.
Source code in src/llmling_models/models/input_model/model.py
InputStreamedResponse
dataclass
¶
Bases: StreamedResponse
Stream implementation for input model.