AWPAdapter
fastagency.adapters.awp.AWPAdapter #
AWPAdapter(
provider: ProviderProtocol,
*,
discovery_path: str = "/fastagency/discovery",
awp_path: str = "/fastagency/awp",
get_user_id: Optional[
Callable[..., Optional[str]]
] = None
)
Bases: MessageProcessorMixin
, CreateWorkflowUIMixin
Provider for AWP.
PARAMETER | DESCRIPTION |
---|---|
provider | The provider. TYPE: |
discovery_path | The discovery path. Defaults to "/fastagency/discovery". TYPE: |
awp_path | The agent wire protocol path. Defaults to "/fastagency/awp". TYPE: |
get_user_id | The get user id. Defaults to None. |
Source code in fastagency/adapters/awp/base.py
create #
create_provider classmethod
#
create_provider(fastapi_url: str) -> ProviderProtocol
create_workflow_ui #
error #
error(
workflow_uuid: str,
sender: Optional[str] = None,
recipient: Optional[str] = None,
auto_reply: bool = False,
uuid: Optional[str] = None,
short: Optional[str] = None,
long: Optional[str] = None,
) -> Optional[str]
Source code in fastagency/messages.py
function_call_execution #
function_call_execution(
workflow_uuid: str,
sender: Optional[str] = None,
recipient: Optional[str] = None,
auto_reply: bool = False,
uuid: Optional[str] = None,
function_name: Optional[str] = None,
call_id: Optional[str] = None,
retval: Any = None,
) -> Optional[str]
Source code in fastagency/messages.py
get_thread_info_of_awp #
get_thread_info_of_awp(
awp_id: str,
) -> Optional[AWPThreadInfo]
get_thread_info_of_workflow #
get_thread_info_of_workflow(
workflow_uuid: str,
) -> Optional[AWPThreadInfo]
Source code in fastagency/adapters/awp/base.py
keep_alive #
keep_alive(
workflow_uuid: str,
sender: Optional[str] = None,
recipient: Optional[str] = None,
auto_reply: bool = False,
uuid: Optional[str] = None,
) -> Optional[str]
Source code in fastagency/messages.py
multiple_choice #
multiple_choice(
workflow_uuid: str,
sender: Optional[str] = None,
recipient: Optional[str] = None,
auto_reply: bool = False,
uuid: Optional[str] = None,
prompt: Optional[str] = None,
choices: Optional[list[str]] = None,
default: Optional[str] = None,
single: bool = True,
) -> Optional[str]
Source code in fastagency/messages.py
process_message #
Source code in fastagency/messages.py
run_thread async
#
run_thread(
input: RunAgentInput, request: Request
) -> AsyncIterator[str]
Source code in fastagency/adapters/awp/base.py
send_to_thread #
Source code in fastagency/adapters/awp/base.py
setup_routes #
Source code in fastagency/adapters/awp/base.py
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
|
start #
suggested_function_call #
suggested_function_call(
workflow_uuid: str,
sender: Optional[str] = None,
recipient: Optional[str] = None,
auto_reply: bool = False,
uuid: Optional[str] = None,
function_name: Optional[str] = None,
call_id: Optional[str] = None,
arguments: Optional[dict[str, Any]] = None,
) -> Optional[str]
Source code in fastagency/messages.py
system_message #
system_message(
workflow_uuid: str,
sender: Optional[str] = None,
recipient: Optional[str] = None,
auto_reply: bool = False,
uuid: Optional[str] = None,
message: Optional[dict[str, Any]] = None,
) -> Optional[str]
Source code in fastagency/messages.py
text_input #
text_input(
workflow_uuid: str,
sender: Optional[str] = None,
recipient: Optional[str] = None,
auto_reply: bool = False,
uuid: Optional[str] = None,
prompt: Optional[str] = None,
suggestions: Optional[list[str]] = None,
password: bool = False,
) -> Optional[str]
Source code in fastagency/messages.py
text_message #
text_message(
workflow_uuid: str,
sender: Optional[str] = None,
recipient: Optional[str] = None,
auto_reply: bool = False,
uuid: Optional[str] = None,
body: Optional[str] = None,
) -> Optional[str]
Source code in fastagency/messages.py
visit #
visit_default #
Source code in fastagency/adapters/awp/base.py
visit_error #
visit_function_call_execution #
visit_function_call_execution(
message: FunctionCallExecution,
) -> Optional[str]
visit_input_request #
Source code in fastagency/adapters/awp/base.py
visit_keep_alive #
visit_multiple_choice #
visit_multiple_choice(
message: MultipleChoice,
) -> Optional[str]
visit_run_completion #
Source code in fastagency/adapters/awp/base.py
visit_suggested_function_call #
visit_suggested_function_call(
message: SuggestedFunctionCall,
) -> Optional[str]
visit_system_message #
visit_system_message(
message: SystemMessage,
) -> Optional[str]
visit_text #
Source code in fastagency/adapters/awp/base.py
visit_text_input #
Source code in fastagency/adapters/awp/base.py
visit_text_message #
visit_text_message(message: TextMessage) -> None
Source code in fastagency/adapters/awp/base.py
visit_workflow_completed #
visit_workflow_completed(
message: WorkflowCompleted,
) -> Optional[str]
visit_workflow_started #
visit_workflow_started(
message: WorkflowStarted,
) -> Optional[str]
workflow_completed #
workflow_completed(
workflow_uuid: str,
sender: Optional[str] = None,
recipient: Optional[str] = None,
auto_reply: bool = False,
uuid: Optional[str] = None,
result: Optional[str] = None,
) -> Optional[str]
Source code in fastagency/messages.py
workflow_started #
workflow_started(
workflow_uuid: str,
sender: Optional[str] = None,
recipient: Optional[str] = None,
auto_reply: bool = False,
uuid: Optional[str] = None,
name: Optional[str] = None,
description: Optional[str] = None,
params: Optional[dict[str, Any]] = None,
) -> Optional[str]