Python: Add sample to show handoff as agent with HITL (#2534)

* Add sample to show handoff as agent with HITL

* Update uv.lock with latest pkg versions. Fix lint error.

* Upgrade grpcio to 1.76.0

* Handle grpcio versions

* Case insensitive compare for declarative
This commit is contained in:
Evan Mattson
2025-12-02 09:50:13 +09:00
committed by GitHub
Unverified
parent 8ae33d3c2b
commit e3b700ad9f
6 changed files with 697 additions and 307 deletions
@@ -253,7 +253,7 @@ class Connection(SerializationMixin):
# We're being called on a subclass, use the normal from_dict
return SerializationMixin.from_dict.__func__(cls, value, dependencies=dependencies) # type: ignore[misc]
kind = value.get("kind", "")
kind = value.get("kind", "").lower()
if kind == "reference":
return SerializationMixin.from_dict.__func__( # type: ignore[misc]
ReferenceConnection, value, dependencies=dependencies
@@ -262,7 +262,7 @@ class Connection(SerializationMixin):
return SerializationMixin.from_dict.__func__( # type: ignore[misc]
RemoteConnection, value, dependencies=dependencies
)
if kind == "key":
if kind in ("key", "apikey"):
return SerializationMixin.from_dict.__func__( # type: ignore[misc]
ApiKeyConnection, value, dependencies=dependencies
)