goose-py 0.4.1__py3-none-any.whl → 0.4.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
goose/flow.py
CHANGED
@@ -24,8 +24,8 @@ from goose.agent import (
|
|
24
24
|
UserMessage,
|
25
25
|
)
|
26
26
|
from goose.errors import Honk
|
27
|
-
from goose.store import IFlowRunStore, InMemoryFlowRunStore
|
28
27
|
from goose.result import Result
|
28
|
+
from goose.store import IFlowRunStore, InMemoryFlowRunStore
|
29
29
|
|
30
30
|
SerializedFlowRun = NewType("SerializedFlowRun", str)
|
31
31
|
|
@@ -65,7 +65,9 @@ class Conversation[R: Result](BaseModel):
|
|
65
65
|
class IAdapter[ResultT: Result](Protocol):
|
66
66
|
__code__: CodeType
|
67
67
|
|
68
|
-
async def __call__(
|
68
|
+
async def __call__(
|
69
|
+
self, *, conversation: Conversation[ResultT], agent: Agent
|
70
|
+
) -> ResultT: ...
|
69
71
|
|
70
72
|
|
71
73
|
class NodeState[ResultT: Result](BaseModel):
|
@@ -354,7 +356,9 @@ class Task[**P, R: Result]:
|
|
354
356
|
node_state.set_context(context=context)
|
355
357
|
node_state.add_user_message(message=user_message)
|
356
358
|
|
357
|
-
result = await self._adapter(
|
359
|
+
result = await self._adapter(
|
360
|
+
conversation=node_state.conversation, agent=flow_run.agent
|
361
|
+
)
|
358
362
|
node_state.add_result(result=result)
|
359
363
|
flow_run.add_node_state(node_state)
|
360
364
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
goose/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
goose/agent.py,sha256=S9nDhK7v4Rsk-ANuq5tIZfZ7TOmCdMEVid2VuK1EWCw,8106
|
3
3
|
goose/errors.py,sha256=-0OyZQJWYTRw5YgnCB2_uorVaUsL6Z0QYQO2FqzCiyg,32
|
4
|
-
goose/flow.py,sha256=
|
4
|
+
goose/flow.py,sha256=9KF0OKa7k6YIJ7LqI5zpCfaIYoRRPgCQoFeiZ2QU_9M,13500
|
5
5
|
goose/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
goose/result.py,sha256=-eZJn-2sPo7rHZ38Sz6IAHXqiJ-Ss39esEoFGimJEBI,155
|
7
7
|
goose/store.py,sha256=4p2BBVAEUS1_Z0iBk5Qk_fPxRQeph64DRzXOFmjIT38,844
|
8
|
-
goose_py-0.4.
|
9
|
-
goose_py-0.4.
|
10
|
-
goose_py-0.4.
|
8
|
+
goose_py-0.4.2.dist-info/METADATA,sha256=tSSTAh-EKeEGEyR48MSVVUL--dK1iZ3EAW7G8WD6PlM,1106
|
9
|
+
goose_py-0.4.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
10
|
+
goose_py-0.4.2.dist-info/RECORD,,
|
File without changes
|