fix: use direct agent api per request
This commit is contained in:
parent
7d270d3d31
commit
7d58dd1caf
14 changed files with 285 additions and 400 deletions
|
|
@ -34,7 +34,6 @@ def register_matrix_handlers(
|
|||
dispatcher: EventDispatcher,
|
||||
client=None,
|
||||
store=None,
|
||||
agent_api=None,
|
||||
prototype_state=None,
|
||||
agent_base_url: str = "http://127.0.0.1:8000",
|
||||
) -> None:
|
||||
|
|
@ -64,11 +63,11 @@ def register_matrix_handlers(
|
|||
dispatcher.register(IncomingCallback, "toggle_skill", handle_toggle_skill)
|
||||
dispatcher.register(IncomingCommand, "*", handle_unknown_command)
|
||||
|
||||
if agent_api is not None and prototype_state is not None:
|
||||
if prototype_state is not None:
|
||||
dispatcher.register(
|
||||
IncomingCommand,
|
||||
"save",
|
||||
make_handle_save(agent_api, store, prototype_state),
|
||||
make_handle_save(None, store, prototype_state),
|
||||
)
|
||||
dispatcher.register(IncomingCommand, "load", make_handle_load(store, prototype_state))
|
||||
dispatcher.register(IncomingCommand, "context", make_handle_context(store, prototype_state))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue