feat(sdk): add host integration extension points
This commit is contained in:
1 parent
12f828ea3d
commit
c050955ae3
13 files changed
+359
-7
No files matched your search
+10
-1
@@ -3,7 +3,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from collections.abc import AsyncIterator
|
||||
from collections.abc import AsyncIterator, Mapping
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
@@ -134,6 +134,7 @@ class Nanobot:
|
||||
sender_id: str = "user",
|
||||
media: list[str] | None = None,
|
||||
ephemeral: bool = False,
|
||||
attributes: Mapping[str, Any] | None = None,
|
||||
hooks: list[AgentHook] | None = None,
|
||||
model: str | None = None,
|
||||
model_preset: str | None = None,
|
||||
@@ -149,6 +150,9 @@ class Nanobot:
|
||||
sender_id: Logical sender identifier for runtime context.
|
||||
media: Optional local media paths attached to the message.
|
||||
ephemeral: If true, do not persist the turn or compact session history.
|
||||
attributes: Optional caller-owned request data exposed to context
|
||||
providers and turn-hook factories. Attributes are kept separate
|
||||
from nanobot's trusted internal message metadata.
|
||||
hooks: Optional lifecycle hooks for this run.
|
||||
model: Override the model for this run only.
|
||||
model_preset: Override the model preset for this run only.
|
||||
@@ -167,6 +171,7 @@ class Nanobot:
|
||||
sender_id=sender_id,
|
||||
media=media,
|
||||
ephemeral=ephemeral,
|
||||
attributes=attributes,
|
||||
)
|
||||
if runtime is not None:
|
||||
kwargs["runtime"] = runtime
|
||||
@@ -188,6 +193,7 @@ class Nanobot:
|
||||
sender_id: str = "user",
|
||||
media: list[str] | None = None,
|
||||
ephemeral: bool = False,
|
||||
attributes: Mapping[str, Any] | None = None,
|
||||
hooks: list[AgentHook] | None = None,
|
||||
model: str | None = None,
|
||||
model_preset: str | None = None,
|
||||
@@ -242,6 +248,7 @@ class Nanobot:
|
||||
sender_id=sender_id,
|
||||
media=media,
|
||||
ephemeral=ephemeral,
|
||||
attributes=attributes,
|
||||
on_stream=_on_stream,
|
||||
on_stream_end=_on_stream_end,
|
||||
)
|
||||
@@ -289,6 +296,7 @@ class Nanobot:
|
||||
sender_id: str = "user",
|
||||
media: list[str] | None = None,
|
||||
ephemeral: bool = False,
|
||||
attributes: Mapping[str, Any] | None = None,
|
||||
hooks: list[AgentHook] | None = None,
|
||||
model: str | None = None,
|
||||
model_preset: str | None = None,
|
||||
@@ -302,6 +310,7 @@ class Nanobot:
|
||||
sender_id=sender_id,
|
||||
media=media,
|
||||
ephemeral=ephemeral,
|
||||
attributes=attributes,
|
||||
hooks=hooks,
|
||||
model=model,
|
||||
model_preset=model_preset,
|
||||
|
||||
Reference in new issue
Block a user