goose-py 0.9.8__py3-none-any.whl → 0.9.10__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.
@@ -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 {
goose/agent.py CHANGED
@@ -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",
goose/task.py ADDED
@@ -0,0 +1,3 @@
1
+ from ._internal.task import Task
2
+
3
+ __all__ = ["Task"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: goose-py
3
- Version: 0.9.8
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,9 +1,10 @@
1
1
  goose/__init__.py,sha256=wjGDgWzKcD6S8loVr0n-rLCpRwg-ZKAixcUaw1wobMc,243
2
- goose/agent.py,sha256=2iFjsZtXXNLXu1grCp3S_eJotGJnfP2190GYKEFQdTg,582
2
+ goose/agent.py,sha256=3T5hobYzro2tmYaUd_kNfIxpmnioLOYy9HaYT0XttIA,632
3
3
  goose/errors.py,sha256=-0OyZQJWYTRw5YgnCB2_uorVaUsL6Z0QYQO2FqzCiyg,32
4
4
  goose/flow.py,sha256=YsZLBa5I1W27_P6LYGWbtFX8ZYx9vJG3KtENYChHm5E,111
5
5
  goose/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  goose/runs.py,sha256=ub-r_gzbUbaIzWXX-jc-dncNxEh6zTfzIkmnDfCSbRI,160
7
+ goose/task.py,sha256=95rspdxETJoY12IHBl3KjnVIdqQnf1jDKlnGWNWOTvQ,53
7
8
  goose/_internal/agent.py,sha256=VRDEhBDTpKZS09B6xnWsOqLsxP7D5NHKVGlxwayPdoo,6030
8
9
  goose/_internal/conversation.py,sha256=zbMvP4oxhKAzATVEXZfGVKXWfEjh472MYKhmyJzSLgI,1172
9
10
  goose/_internal/flow.py,sha256=RShMsxgt49g1fZJ3rlwDHtI1j39lZzewx8hZ7DGN5kg,4124
@@ -12,7 +13,7 @@ goose/_internal/state.py,sha256=pI-C37Ybazo7EJPbZklxbiCYFy3u4I031NKBr8Jm_CI,6534
12
13
  goose/_internal/store.py,sha256=tWmKfa1-yq1jU6lT3l6kSOmVt2m3H7I1xLMTrxnUDI8,889
13
14
  goose/_internal/task.py,sha256=Ka3tm5Ymu8sE6_GCbkj3JDHK683ZET5HlkcgrQgnzEo,6028
14
15
  goose/_internal/types/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- goose/_internal/types/agent.py,sha256=QRYux_vbOe_wRtYBMqFpt4y6v9fKN70mwcsqaT0e1wE,2430
16
- goose_py-0.9.8.dist-info/METADATA,sha256=UpVDqVUdVPwynJJtQwQUbyva7qThIBdAPwaTOXpjUPs,441
17
- goose_py-0.9.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
18
- goose_py-0.9.8.dist-info/RECORD,,
16
+ goose/_internal/types/agent.py,sha256=zgS_OYi22rrPEBS95n-PGxPO86b6ci7aPsgHFJ2m0pc,2912
17
+ goose_py-0.9.10.dist-info/METADATA,sha256=Vg_6i2_JVMvjwbK6QY3gCiLEk2lMiFL2BaOVkk1soPk,442
18
+ goose_py-0.9.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
19
+ goose_py-0.9.10.dist-info/RECORD,,