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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: goose-py
3
- Version: 0.3.10
3
+ Version: 0.3.12
4
4
  Summary: A tool for AI workflows based on human-computer collaboration and structured output.
5
5
  Home-page: https://github.com/chelle-ai/goose
6
6
  Keywords: ai,yaml,configuration,llm
@@ -10,10 +10,9 @@ from pydantic import BaseModel, computed_field
10
10
 
11
11
 
12
12
  class GeminiModel(StrEnum):
13
- EXP = "gemini/gemini-exp-1121"
14
- PRO = "gemini/gemini-1.5-pro"
15
- FLASH = "gemini/gemini-1.5-flash"
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/mpeg"
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 or 0,
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)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "goose-py"
3
- version = "0.3.10"
3
+ version = "0.3.12"
4
4
  description = "A tool for AI workflows based on human-computer collaboration and structured output."
5
5
  authors = [
6
6
  "Nash Taylor <nash@chelle.ai>",
File without changes
File without changes
File without changes
File without changes