goose-py 0.9.9__tar.gz → 0.9.10__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.
Files changed (35) hide show
  1. {goose_py-0.9.9 → goose_py-0.9.10}/PKG-INFO +1 -1
  2. {goose_py-0.9.9 → goose_py-0.9.10}/goose/_internal/types/agent.py +15 -3
  3. {goose_py-0.9.9 → goose_py-0.9.10}/goose/agent.py +2 -0
  4. {goose_py-0.9.9 → goose_py-0.9.10}/pyproject.toml +1 -1
  5. {goose_py-0.9.9 → goose_py-0.9.10}/uv.lock +1 -1
  6. {goose_py-0.9.9 → goose_py-0.9.10}/.envrc +0 -0
  7. {goose_py-0.9.9 → goose_py-0.9.10}/.github/workflows/publish.yml +0 -0
  8. {goose_py-0.9.9 → goose_py-0.9.10}/.gitignore +0 -0
  9. {goose_py-0.9.9 → goose_py-0.9.10}/.python-version +0 -0
  10. {goose_py-0.9.9 → goose_py-0.9.10}/.stubs/jsonpath_ng/__init__.pyi +0 -0
  11. {goose_py-0.9.9 → goose_py-0.9.10}/.stubs/litellm/__init__.pyi +0 -0
  12. {goose_py-0.9.9 → goose_py-0.9.10}/Makefile +0 -0
  13. {goose_py-0.9.9 → goose_py-0.9.10}/README.md +0 -0
  14. {goose_py-0.9.9 → goose_py-0.9.10}/goose/__init__.py +0 -0
  15. {goose_py-0.9.9 → goose_py-0.9.10}/goose/_internal/agent.py +0 -0
  16. {goose_py-0.9.9 → goose_py-0.9.10}/goose/_internal/conversation.py +0 -0
  17. {goose_py-0.9.9 → goose_py-0.9.10}/goose/_internal/flow.py +0 -0
  18. {goose_py-0.9.9 → goose_py-0.9.10}/goose/_internal/result.py +0 -0
  19. {goose_py-0.9.9 → goose_py-0.9.10}/goose/_internal/state.py +0 -0
  20. {goose_py-0.9.9 → goose_py-0.9.10}/goose/_internal/store.py +0 -0
  21. {goose_py-0.9.9 → goose_py-0.9.10}/goose/_internal/task.py +0 -0
  22. {goose_py-0.9.9 → goose_py-0.9.10}/goose/_internal/types/__init__.py +0 -0
  23. {goose_py-0.9.9 → goose_py-0.9.10}/goose/errors.py +0 -0
  24. {goose_py-0.9.9 → goose_py-0.9.10}/goose/flow.py +0 -0
  25. {goose_py-0.9.9 → goose_py-0.9.10}/goose/py.typed +0 -0
  26. {goose_py-0.9.9 → goose_py-0.9.10}/goose/runs.py +0 -0
  27. {goose_py-0.9.9 → goose_py-0.9.10}/goose/task.py +0 -0
  28. {goose_py-0.9.9 → goose_py-0.9.10}/tests/__init__.py +0 -0
  29. {goose_py-0.9.9 → goose_py-0.9.10}/tests/test_agent.py +0 -0
  30. {goose_py-0.9.9 → goose_py-0.9.10}/tests/test_downstream_task.py +0 -0
  31. {goose_py-0.9.9 → goose_py-0.9.10}/tests/test_hashing.py +0 -0
  32. {goose_py-0.9.9 → goose_py-0.9.10}/tests/test_looping.py +0 -0
  33. {goose_py-0.9.9 → goose_py-0.9.10}/tests/test_refining.py +0 -0
  34. {goose_py-0.9.9 → goose_py-0.9.10}/tests/test_regenerate.py +0 -0
  35. {goose_py-0.9.9 → goose_py-0.9.10}/tests/test_state.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: goose-py
3
- Version: 0.9.9
3
+ Version: 0.9.10
4
4
  Summary: A tool for AI workflows based on human-computer collaboration and structured output.
5
5
  Author-email: Nash Taylor <nash@chelle.ai>, Joshua Cook <joshua@chelle.ai>, Michael Sankur <michael@chelle.ai>
6
6
  Requires-Python: >=3.12
@@ -1,7 +1,19 @@
1
+ import base64
1
2
  from enum import StrEnum
2
- from typing import Literal, NotRequired, TypedDict
3
+ from typing import Any, Literal, NotRequired, TypedDict
3
4
 
4
- from pydantic import BaseModel
5
+ from pydantic import BaseModel, GetCoreSchemaHandler
6
+ from pydantic_core import CoreSchema, core_schema
7
+
8
+
9
+ class Base64MediaContent(str):
10
+ @classmethod
11
+ def __get_pydantic_core_schema__(cls, source_type: Any, handler: GetCoreSchemaHandler) -> CoreSchema:
12
+ return core_schema.no_info_after_validator_function(cls, handler(str))
13
+
14
+ @classmethod
15
+ def from_bytes(cls, content: bytes, /) -> "Base64MediaContent":
16
+ return cls(base64.b64encode(content).decode())
5
17
 
6
18
 
7
19
  class AIModel(StrEnum):
@@ -59,7 +71,7 @@ class TextMessagePart(BaseModel):
59
71
 
60
72
  class MediaMessagePart(BaseModel):
61
73
  content_type: UserMediaContentType
62
- content: str
74
+ content: Base64MediaContent
63
75
 
64
76
  def render(self) -> LLMMediaMessagePart:
65
77
  return {
@@ -2,6 +2,7 @@ from ._internal.agent import AgentResponse, IAgentLogger
2
2
  from ._internal.types.agent import (
3
3
  AIModel,
4
4
  AssistantMessage,
5
+ Base64MediaContent,
5
6
  LLMMediaMessagePart,
6
7
  LLMMessage,
7
8
  LLMTextMessagePart,
@@ -17,6 +18,7 @@ __all__ = [
17
18
  "AIModel",
18
19
  "IAgentLogger",
19
20
  "AssistantMessage",
21
+ "Base64MediaContent",
20
22
  "LLMMediaMessagePart",
21
23
  "LLMMessage",
22
24
  "LLMTextMessagePart",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "goose-py"
3
- version = "0.9.9"
3
+ version = "0.9.10"
4
4
  description = "A tool for AI workflows based on human-computer collaboration and structured output."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -234,7 +234,7 @@ wheels = [
234
234
 
235
235
  [[package]]
236
236
  name = "goose-py"
237
- version = "0.9.9"
237
+ version = "0.9.10"
238
238
  source = { editable = "." }
239
239
  dependencies = [
240
240
  { name = "jsonpath-ng" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes