futurehouse-client 0.3.15.dev71__py3-none-any.whl → 0.3.16__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.
@@ -118,7 +118,7 @@ class TaskResponse(BaseModel):
118
118
 
119
119
  status: str
120
120
  query: str
121
- user: str
121
+ user: str | None = None
122
122
  created_at: datetime
123
123
  job_name: str
124
124
  public: bool
@@ -388,29 +388,30 @@ class RestClient:
388
388
  url = f"/v0.1/trajectories/{task_id}"
389
389
  full_url = f"{self.base_url}{url}"
390
390
 
391
- with external_trace(
392
- url=full_url,
393
- method="GET",
394
- library="httpx",
395
- custom_params={
396
- "operation": "get_job",
397
- "job_id": task_id,
398
- },
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,
399
402
  ):
400
- response = self.client.get(
401
- url,
402
- params={"history": history},
403
- )
404
- response.raise_for_status()
405
- 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
+
406
407
  if verbose:
407
408
  return verbose_response
408
409
  if any(
409
410
  JobNames.from_string(job_name) in verbose_response.job_name
410
411
  for job_name in ["crow", "falcon", "owl", "dummy"]
411
412
  ):
412
- return PQATaskResponse(**response.json())
413
- return TaskResponse(**response.json())
413
+ return PQATaskResponse(**data)
414
+ return TaskResponse(**data)
414
415
  except ValueError as e:
415
416
  raise ValueError("Invalid task ID format. Must be a valid UUID.") from e
416
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.dev71
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
@@ -1,7 +1,7 @@
1
1
  futurehouse_client/__init__.py,sha256=ddxO7JE97c6bt7LjNglZZ2Ql8bYCGI9laSFeh9MP6VU,344
2
2
  futurehouse_client/clients/__init__.py,sha256=tFWqwIAY5PvwfOVsCje4imjTpf6xXNRMh_UHIKVI1_0,320
3
3
  futurehouse_client/clients/job_client.py,sha256=yBFKDNcFnuZDNgoK2d5037rbuzQ7TlSK6MmklEKV8EA,11056
4
- futurehouse_client/clients/rest_client.py,sha256=iIgy33np4hoJY8ae_qfo1yuXJz3ZrmkqsUVv6LuKO84,26297
4
+ futurehouse_client/clients/rest_client.py,sha256=Dc29QRNZMO4uxaXNGKyx18Tn-vLaJ6P5fCbM_0u-Z3I,26379
5
5
  futurehouse_client/models/__init__.py,sha256=ta3jFLM_LsDz1rKDmx8rja8sT7WtSKoFvMgLF0yFpvA,342
6
6
  futurehouse_client/models/app.py,sha256=yfZ9tyw4VATVAfYrU7aTdCNPSljLEho09_nIbh8oZDY,23174
7
7
  futurehouse_client/models/client.py,sha256=n4HD0KStKLm6Ek9nL9ylP-bkK10yzAaD1uIDF83Qp_A,1828
@@ -9,7 +9,7 @@ futurehouse_client/models/rest.py,sha256=W-wNFTN7HALYFFphw-RQYRMm6_TSa1cl4T-mZ1m
9
9
  futurehouse_client/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  futurehouse_client/utils/module_utils.py,sha256=aFyd-X-pDARXz9GWpn8SSViUVYdSbuy9vSkrzcVIaGI,4955
11
11
  futurehouse_client/utils/monitoring.py,sha256=UjRlufe67kI3VxRHOd5fLtJmlCbVA2Wqwpd4uZhXkQM,8728
12
- futurehouse_client-0.3.15.dev71.dist-info/METADATA,sha256=CtNMDYbgrFHUphOWVggQ9hFtgX9R1i_z9XZevDKbyxs,8181
13
- futurehouse_client-0.3.15.dev71.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
14
- futurehouse_client-0.3.15.dev71.dist-info/top_level.txt,sha256=TRuLUCt_qBnggdFHCX4O_BoCu1j2X43lKfIZC-ElwWY,19
15
- futurehouse_client-0.3.15.dev71.dist-info/RECORD,,
12
+ futurehouse_client-0.3.16.dist-info/METADATA,sha256=uCvzXKeI6i8PRvike8YKVa7-IJQAwL8G2ILjjOf6xIo,8175
13
+ futurehouse_client-0.3.16.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
14
+ futurehouse_client-0.3.16.dist-info/top_level.txt,sha256=TRuLUCt_qBnggdFHCX4O_BoCu1j2X43lKfIZC-ElwWY,19
15
+ futurehouse_client-0.3.16.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.0.0)
2
+ Generator: setuptools (80.3.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5