futurehouse-client 0.3.20.dev63__py3-none-any.whl → 0.3.20.dev105__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.
@@ -73,7 +73,7 @@ class JobNames(StrEnum):
73
73
 
74
74
  @staticmethod
75
75
  def get_response_object_from_job(job_name: str) -> type[TaskResponse]:
76
- return JobNames._get_response_mapping()[job_name]
76
+ return JobNames._get_response_mapping().get(job_name, TaskResponse)
77
77
 
78
78
  def get_response_object(self) -> type[TaskResponse]:
79
79
  return self._get_response_mapping()[self.name]
@@ -139,6 +139,7 @@ retry_if_connection_error = retry_if_exception_type((
139
139
  DEFAULT_AGENT_TIMEOUT: int = 2400 # seconds
140
140
 
141
141
 
142
+ # pylint: disable=too-many-public-methods
142
143
  class RestClient:
143
144
  REQUEST_TIMEOUT: ClassVar[float] = 30.0 # sec
144
145
  MAX_RETRY_ATTEMPTS: ClassVar[int] = 3
@@ -1419,15 +1420,9 @@ class RestClient:
1419
1420
  if not (world_model_id or name) or (world_model_id and name):
1420
1421
  raise ValueError("Provide either 'world_model_id' or 'name', but not both.")
1421
1422
 
1422
- params = {
1423
- "id": str(world_model_id) if world_model_id else None,
1424
- "name": name,
1425
- }
1426
- # Filter out None values before making the request
1427
- params = {k: v for k, v in params.items() if v is not None}
1428
-
1429
1423
  try:
1430
- response = self.client.get("/v0.1/world-model", params=params)
1424
+ identifier = str(world_model_id) if world_model_id else name
1425
+ response = self.client.get(f"/v0.1/world-models/{identifier}")
1431
1426
  response.raise_for_status()
1432
1427
  return WorldModelResponse.model_validate(response.json())
1433
1428
  except HTTPStatusError as e:
@@ -1465,14 +1460,9 @@ class RestClient:
1465
1460
  if not (world_model_id or name) or (world_model_id and name):
1466
1461
  raise ValueError("Provide either 'world_model_id' or 'name', but not both.")
1467
1462
 
1468
- params = {
1469
- "id": str(world_model_id) if world_model_id else None,
1470
- "name": name,
1471
- }
1472
- params = {k: v for k, v in params.items() if v is not None}
1473
-
1474
1463
  try:
1475
- response = await self.async_client.get("/v0.1/world-model", params=params)
1464
+ identifier = str(world_model_id) if world_model_id else name
1465
+ response = await self.async_client.get(f"/v0.1/world-models/{identifier}")
1476
1466
  response.raise_for_status()
1477
1467
  return WorldModelResponse.model_validate(response.json())
1478
1468
  except HTTPStatusError as e:
@@ -610,7 +610,7 @@ class RuntimeConfig(BaseModel):
610
610
  default=None,
611
611
  description="Optional job identifier for a continued job",
612
612
  )
613
- world_model_id: UUID | None = Field(
613
+ world_model_id: UUID | str | None = Field(
614
614
  default=None,
615
615
  description="Optional world model identifier for the task",
616
616
  )
@@ -46,10 +46,10 @@ class WorldModel(BaseModel):
46
46
  """
47
47
 
48
48
  content: str
49
- prior: UUID | None = None
49
+ prior: UUID | str | None = None
50
50
  name: str | None = None
51
51
  description: str | None = None
52
- trajectory_id: UUID | None = None
52
+ trajectory_id: UUID | str | None = None
53
53
  model_metadata: JsonValue | None = None
54
54
 
55
55
 
@@ -60,12 +60,12 @@ class WorldModelResponse(BaseModel):
60
60
  This model is received from the API.
61
61
  """
62
62
 
63
- id: UUID
64
- prior: UUID | None
63
+ id: UUID | str
64
+ prior: UUID | str | None
65
65
  name: str
66
66
  description: str | None
67
67
  content: str
68
- trajectory_id: UUID | None
68
+ trajectory_id: UUID | str | None
69
69
  email: str | None
70
70
  model_metadata: JsonValue | None
71
71
  enabled: bool
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.3.20.dev63'
21
- __version_tuple__ = version_tuple = (0, 3, 20, 'dev63')
20
+ __version__ = version = '0.3.20.dev105'
21
+ __version_tuple__ = version_tuple = (0, 3, 20, 'dev105')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: futurehouse-client
3
- Version: 0.3.20.dev63
3
+ Version: 0.3.20.dev105
4
4
  Summary: A client for interacting with endpoints of the FutureHouse service.
5
5
  Author-email: FutureHouse technical staff <hello@futurehouse.org>
6
6
  License: Apache License
@@ -0,0 +1,20 @@
1
+ futurehouse_client/__init__.py,sha256=BztM_ntbgmIEjzvnBWcvPhvLjM8xGDFCK0Upf3-nIn8,488
2
+ futurehouse_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ futurehouse_client/version.py,sha256=dggvSZjGalP38yUZTaRgokHrf_7S9wpjF6xrQ5xRQlk,530
4
+ futurehouse_client/clients/__init__.py,sha256=-HXNj-XJ3LRO5XM6MZ709iPs29YpApss0Q2YYg1qMZw,280
5
+ futurehouse_client/clients/job_client.py,sha256=D51_qTxya6g5Wfg_ZfJdP031TV_YDJeXkGMiYAJ1qRc,11962
6
+ futurehouse_client/clients/rest_client.py,sha256=zfGMFzLWsNWggTDrZpQZm9habxSQ0bJ2Zd5w_dZrJhU,61301
7
+ futurehouse_client/models/__init__.py,sha256=5x-f9AoM1hGzJBEHcHAXSt7tPeImST5oZLuMdwp0mXc,554
8
+ futurehouse_client/models/app.py,sha256=TrfSorJlxyuc9ZzJpd2tL1pzKOp3jNBYRqFMfmmUue0,28954
9
+ futurehouse_client/models/client.py,sha256=n4HD0KStKLm6Ek9nL9ylP-bkK10yzAaD1uIDF83Qp_A,1828
10
+ futurehouse_client/models/rest.py,sha256=AwPMcB1ruoqaI8NIhX2ZzN8UuX6XsaQ7uzeSE8EpwKk,1573
11
+ futurehouse_client/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ futurehouse_client/utils/auth.py,sha256=tgWELjKfg8eWme_qdcRmc8TjQN9DVZuHHaVXZNHLchk,2960
13
+ futurehouse_client/utils/general.py,sha256=A_rtTiYW30ELGEZlWCIArO7q1nEmqi8hUlmBRYkMQ_c,767
14
+ futurehouse_client/utils/module_utils.py,sha256=aFyd-X-pDARXz9GWpn8SSViUVYdSbuy9vSkrzcVIaGI,4955
15
+ futurehouse_client/utils/monitoring.py,sha256=UjRlufe67kI3VxRHOd5fLtJmlCbVA2Wqwpd4uZhXkQM,8728
16
+ futurehouse_client-0.3.20.dev105.dist-info/licenses/LICENSE,sha256=oQ9ZHjUi-_6GfP3gs14FlPb0OlGwE1QCCKFGnJ4LD2I,11341
17
+ futurehouse_client-0.3.20.dev105.dist-info/METADATA,sha256=bKotJE6rkwyPwipLmyOVe8hNoEoniaDi87CrnCU1C2w,26118
18
+ futurehouse_client-0.3.20.dev105.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
+ futurehouse_client-0.3.20.dev105.dist-info/top_level.txt,sha256=TRuLUCt_qBnggdFHCX4O_BoCu1j2X43lKfIZC-ElwWY,19
20
+ futurehouse_client-0.3.20.dev105.dist-info/RECORD,,
@@ -1,20 +0,0 @@
1
- futurehouse_client/__init__.py,sha256=BztM_ntbgmIEjzvnBWcvPhvLjM8xGDFCK0Upf3-nIn8,488
2
- futurehouse_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- futurehouse_client/version.py,sha256=isTppsUF5LzE3BUYjhyccnSnZwGsbVa_dNrIiEiEViQ,528
4
- futurehouse_client/clients/__init__.py,sha256=-HXNj-XJ3LRO5XM6MZ709iPs29YpApss0Q2YYg1qMZw,280
5
- futurehouse_client/clients/job_client.py,sha256=JgB5IUAyCmnhGRsYc3bgKldA-lkM1JLwHRwwUeOCdus,11944
6
- futurehouse_client/clients/rest_client.py,sha256=fltCx1kCSZKLD-2QNPmK2PbXPa0q0zW9Q3837xS_6TQ,61554
7
- futurehouse_client/models/__init__.py,sha256=5x-f9AoM1hGzJBEHcHAXSt7tPeImST5oZLuMdwp0mXc,554
8
- futurehouse_client/models/app.py,sha256=fIWATuetex9GuNzGAWQz-9Dc63ifEFl-Mv-UN7nGSfA,28948
9
- futurehouse_client/models/client.py,sha256=n4HD0KStKLm6Ek9nL9ylP-bkK10yzAaD1uIDF83Qp_A,1828
10
- futurehouse_client/models/rest.py,sha256=QqOhRT-qTMfLtNge458qyBv6JFZvoQULnGIjjcDvMy8,1543
11
- futurehouse_client/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- futurehouse_client/utils/auth.py,sha256=tgWELjKfg8eWme_qdcRmc8TjQN9DVZuHHaVXZNHLchk,2960
13
- futurehouse_client/utils/general.py,sha256=A_rtTiYW30ELGEZlWCIArO7q1nEmqi8hUlmBRYkMQ_c,767
14
- futurehouse_client/utils/module_utils.py,sha256=aFyd-X-pDARXz9GWpn8SSViUVYdSbuy9vSkrzcVIaGI,4955
15
- futurehouse_client/utils/monitoring.py,sha256=UjRlufe67kI3VxRHOd5fLtJmlCbVA2Wqwpd4uZhXkQM,8728
16
- futurehouse_client-0.3.20.dev63.dist-info/licenses/LICENSE,sha256=oQ9ZHjUi-_6GfP3gs14FlPb0OlGwE1QCCKFGnJ4LD2I,11341
17
- futurehouse_client-0.3.20.dev63.dist-info/METADATA,sha256=4hmqtHLV-eHTN3l8vXmtIW4L6TFAkBDymbjyg7_rBJQ,26117
18
- futurehouse_client-0.3.20.dev63.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- futurehouse_client-0.3.20.dev63.dist-info/top_level.txt,sha256=TRuLUCt_qBnggdFHCX4O_BoCu1j2X43lKfIZC-ElwWY,19
20
- futurehouse_client-0.3.20.dev63.dist-info/RECORD,,