futurehouse-client 0.3.15.dev15__tar.gz → 0.3.16__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 (25) hide show
  1. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/PKG-INFO +2 -1
  2. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client/clients/rest_client.py +26 -19
  3. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client.egg-info/PKG-INFO +2 -1
  4. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client.egg-info/requires.txt +1 -0
  5. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/pyproject.toml +7 -0
  6. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/LICENSE +0 -0
  7. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/README.md +0 -0
  8. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/docs/__init__.py +0 -0
  9. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/docs/client_notebook.ipynb +0 -0
  10. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client/__init__.py +0 -0
  11. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client/clients/__init__.py +0 -0
  12. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client/clients/job_client.py +0 -0
  13. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client/models/__init__.py +0 -0
  14. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client/models/app.py +0 -0
  15. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client/models/client.py +0 -0
  16. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client/models/rest.py +0 -0
  17. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client/utils/__init__.py +0 -0
  18. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client/utils/module_utils.py +0 -0
  19. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client/utils/monitoring.py +0 -0
  20. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client.egg-info/SOURCES.txt +0 -0
  21. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client.egg-info/dependency_links.txt +0 -0
  22. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/futurehouse_client.egg-info/top_level.txt +0 -0
  23. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/setup.cfg +0 -0
  24. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/tests/test_rest.py +0 -0
  25. {futurehouse_client-0.3.15.dev15 → futurehouse_client-0.3.16}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: futurehouse-client
3
- Version: 0.3.15.dev15
3
+ Version: 0.3.16
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
  Classifier: Operating System :: OS Independent
@@ -15,6 +15,7 @@ Requires-Dist: dm-tree<0.1.9
15
15
  Requires-Dist: fhaviary
16
16
  Requires-Dist: httpx
17
17
  Requires-Dist: ldp>=0.22.0
18
+ Requires-Dist: litellm==1.67.4.post1
18
19
  Requires-Dist: pydantic
19
20
  Requires-Dist: python-dotenv
20
21
  Requires-Dist: tenacity
@@ -101,6 +101,12 @@ class InvalidTaskDescriptionError(Exception):
101
101
  """Raised when the task description is invalid or empty."""
102
102
 
103
103
 
104
+ class SimpleOrganization(BaseModel):
105
+ id: int
106
+ name: str
107
+ display_name: str
108
+
109
+
104
110
  # 5 minute default for JWTs
105
111
  JWT_TOKEN_CACHE_EXPIRY: int = 300 # seconds
106
112
 
@@ -112,11 +118,11 @@ class TaskResponse(BaseModel):
112
118
 
113
119
  status: str
114
120
  query: str
115
- user: str
121
+ user: str | None = None
116
122
  created_at: datetime
117
123
  job_name: str
118
124
  public: bool
119
- shared_with: list[str]
125
+ shared_with: list[SimpleOrganization] | None = None
120
126
  build_owner: str | None = None
121
127
  environment_name: str | None = None
122
128
  agent_name: str | None = None
@@ -191,7 +197,7 @@ class TaskResponseVerbose(TaskResponse):
191
197
  agent_state: list[dict[str, Any]] | None = None
192
198
  environment_frame: dict[str, Any] | None = None
193
199
  metadata: dict[str, Any] | None = None
194
- shared_with: list[str]
200
+ shared_with: list[SimpleOrganization] | None = None
195
201
 
196
202
 
197
203
  class RestClient:
@@ -382,29 +388,30 @@ class RestClient:
382
388
  url = f"/v0.1/trajectories/{task_id}"
383
389
  full_url = f"{self.base_url}{url}"
384
390
 
385
- with external_trace(
386
- url=full_url,
387
- method="GET",
388
- library="httpx",
389
- custom_params={
390
- "operation": "get_job",
391
- "job_id": task_id,
392
- },
391
+ with (
392
+ external_trace(
393
+ url=full_url,
394
+ method="GET",
395
+ library="httpx",
396
+ custom_params={
397
+ "operation": "get_job",
398
+ "job_id": task_id,
399
+ },
400
+ ),
401
+ self.client.stream("GET", url, params={"history": history}) as response,
393
402
  ):
394
- response = self.client.get(
395
- url,
396
- params={"history": history},
397
- )
398
- response.raise_for_status()
399
- verbose_response = TaskResponseVerbose(**response.json())
403
+ json_data = "".join(response.iter_text(chunk_size=1024))
404
+ data = json.loads(json_data)
405
+ verbose_response = TaskResponseVerbose(**data)
406
+
400
407
  if verbose:
401
408
  return verbose_response
402
409
  if any(
403
410
  JobNames.from_string(job_name) in verbose_response.job_name
404
411
  for job_name in ["crow", "falcon", "owl", "dummy"]
405
412
  ):
406
- return PQATaskResponse(**response.json())
407
- return TaskResponse(**response.json())
413
+ return PQATaskResponse(**data)
414
+ return TaskResponse(**data)
408
415
  except ValueError as e:
409
416
  raise ValueError("Invalid task ID format. Must be a valid UUID.") from e
410
417
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: futurehouse-client
3
- Version: 0.3.15.dev15
3
+ Version: 0.3.16
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
  Classifier: Operating System :: OS Independent
@@ -15,6 +15,7 @@ Requires-Dist: dm-tree<0.1.9
15
15
  Requires-Dist: fhaviary
16
16
  Requires-Dist: httpx
17
17
  Requires-Dist: ldp>=0.22.0
18
+ Requires-Dist: litellm==1.67.4.post1
18
19
  Requires-Dist: pydantic
19
20
  Requires-Dist: python-dotenv
20
21
  Requires-Dist: tenacity
@@ -3,6 +3,7 @@ dm-tree<0.1.9
3
3
  fhaviary
4
4
  httpx
5
5
  ldp>=0.22.0
6
+ litellm==1.67.4.post1
6
7
  pydantic
7
8
  python-dotenv
8
9
  tenacity
@@ -19,6 +19,7 @@ dependencies = [
19
19
  "fhaviary",
20
20
  "httpx",
21
21
  "ldp>=0.22.0",
22
+ "litellm==1.67.4.post1", # TODO: remove after: https://github.com/BerriAI/litellm/issues/10349
22
23
  "pydantic",
23
24
  "python-dotenv",
24
25
  "tenacity",
@@ -63,3 +64,9 @@ include = ["futurehouse_client*"]
63
64
  local_scheme = "no-local-version"
64
65
  root = "../.."
65
66
  version_file = "version.py"
67
+
68
+ [[tool.uv.index]]
69
+ explicit = true
70
+ name = "testpypi"
71
+ publish-url = "https://test.pypi.org/legacy/"
72
+ url = "https://test.pypi.org/"