goose-py 0.3.10__tar.gz → 0.3.12__tar.gz
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_py-0.3.10 → goose_py-0.3.12}/PKG-INFO +1 -1
- {goose_py-0.3.10 → goose_py-0.3.12}/goose/agent.py +4 -7
- {goose_py-0.3.10 → goose_py-0.3.12}/goose/flow.py +6 -1
- {goose_py-0.3.10 → goose_py-0.3.12}/goose/store.py +4 -0
- {goose_py-0.3.10 → goose_py-0.3.12}/pyproject.toml +1 -1
- {goose_py-0.3.10 → goose_py-0.3.12}/README.md +0 -0
- {goose_py-0.3.10 → goose_py-0.3.12}/goose/__init__.py +0 -0
- {goose_py-0.3.10 → goose_py-0.3.12}/goose/errors.py +0 -0
- {goose_py-0.3.10 → goose_py-0.3.12}/goose/py.typed +0 -0
@@ -10,10 +10,9 @@ from pydantic import BaseModel, computed_field
|
|
10
10
|
|
11
11
|
|
12
12
|
class GeminiModel(StrEnum):
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
FLASH_8B = "gemini/gemini-1.5-flash-8b"
|
13
|
+
PRO = "vertex_ai/gemini-1.5-pro"
|
14
|
+
FLASH = "vertex_ai/gemini-1.5-flash"
|
15
|
+
FLASH_8B = "vertex_ai/gemini-1.5-flash-8b"
|
17
16
|
|
18
17
|
|
19
18
|
class UserMediaContentType(StrEnum):
|
@@ -23,7 +22,7 @@ class UserMediaContentType(StrEnum):
|
|
23
22
|
WEBP = "image/webp"
|
24
23
|
|
25
24
|
# audio
|
26
|
-
MP3 = "audio/
|
25
|
+
MP3 = "audio/mp3"
|
27
26
|
WAV = "audio/wav"
|
28
27
|
|
29
28
|
# files
|
@@ -121,13 +120,11 @@ class AgentResponse[R: BaseModel](BaseModel):
|
|
121
120
|
GeminiModel.FLASH_8B: 30,
|
122
121
|
GeminiModel.FLASH: 15,
|
123
122
|
GeminiModel.PRO: 500,
|
124
|
-
GeminiModel.EXP: 0,
|
125
123
|
}
|
126
124
|
OUTPUT_CENTS_PER_MILLION_TOKENS: ClassVar[dict[GeminiModel, float]] = {
|
127
125
|
GeminiModel.FLASH_8B: 30,
|
128
126
|
GeminiModel.FLASH: 15,
|
129
127
|
GeminiModel.PRO: 500,
|
130
|
-
GeminiModel.EXP: 0,
|
131
128
|
}
|
132
129
|
|
133
130
|
response: R
|
@@ -159,7 +159,7 @@ class FlowRun:
|
|
159
159
|
else:
|
160
160
|
return NodeState[task.result_type](
|
161
161
|
task_name=task.name,
|
162
|
-
index=index
|
162
|
+
index=index,
|
163
163
|
conversation=Conversation[task.result_type](
|
164
164
|
user_messages=[], result_messages=[]
|
165
165
|
),
|
@@ -186,6 +186,11 @@ class FlowRun:
|
|
186
186
|
self._id = ""
|
187
187
|
self._agent = None
|
188
188
|
|
189
|
+
def clear_node(self, *, task: "Task[Any, Result]", index: int) -> None:
|
190
|
+
key = (task.name, index)
|
191
|
+
if key in self._node_states:
|
192
|
+
del self._node_states[key]
|
193
|
+
|
189
194
|
def dump(self) -> SerializedFlowRun:
|
190
195
|
return SerializedFlowRun(
|
191
196
|
json.dumps(
|
@@ -10,6 +10,7 @@ class IFlowRunStore(Protocol):
|
|
10
10
|
def __init__(self, *, flow_name: str) -> None: ...
|
11
11
|
async def get(self, *, run_id: str) -> FlowRun | None: ...
|
12
12
|
async def save(self, *, run: FlowRun) -> None: ...
|
13
|
+
async def delete(self, *, run_id: str) -> None: ...
|
13
14
|
|
14
15
|
|
15
16
|
class InMemoryFlowRunStore(IFlowRunStore):
|
@@ -22,3 +23,6 @@ class InMemoryFlowRunStore(IFlowRunStore):
|
|
22
23
|
|
23
24
|
async def save(self, *, run: FlowRun) -> None:
|
24
25
|
self._runs[run.id] = run
|
26
|
+
|
27
|
+
async def delete(self, *, run_id: str) -> None:
|
28
|
+
self._runs.pop(run_id, None)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|