futurehouse-client 0.3.20.dev55__tar.gz → 0.3.20.dev63__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 (29) hide show
  1. {futurehouse_client-0.3.20.dev55/futurehouse_client.egg-info → futurehouse_client-0.3.20.dev63}/PKG-INFO +39 -44
  2. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/README.md +38 -43
  3. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/clients/rest_client.py +1 -1
  4. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/version.py +2 -2
  5. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63/futurehouse_client.egg-info}/PKG-INFO +39 -44
  6. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/LICENSE +0 -0
  7. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/docs/__init__.py +0 -0
  8. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/docs/client_notebook.ipynb +0 -0
  9. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/__init__.py +0 -0
  10. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/clients/__init__.py +0 -0
  11. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/clients/job_client.py +0 -0
  12. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/models/__init__.py +0 -0
  13. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/models/app.py +0 -0
  14. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/models/client.py +0 -0
  15. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/models/rest.py +0 -0
  16. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/py.typed +0 -0
  17. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/utils/__init__.py +0 -0
  18. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/utils/auth.py +0 -0
  19. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/utils/general.py +0 -0
  20. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/utils/module_utils.py +0 -0
  21. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client/utils/monitoring.py +0 -0
  22. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client.egg-info/SOURCES.txt +0 -0
  23. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client.egg-info/dependency_links.txt +0 -0
  24. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client.egg-info/requires.txt +0 -0
  25. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/futurehouse_client.egg-info/top_level.txt +0 -0
  26. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/pyproject.toml +0 -0
  27. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/setup.cfg +0 -0
  28. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/tests/test_client.py +0 -0
  29. {futurehouse_client-0.3.20.dev55 → futurehouse_client-0.3.20.dev63}/tests/test_rest.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: futurehouse-client
3
- Version: 0.3.20.dev55
3
+ Version: 0.3.20.dev63
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
@@ -274,20 +274,19 @@ uv pip install futurehouse-client
274
274
 
275
275
  ```python
276
276
  from futurehouse_client import FutureHouseClient, JobNames
277
- from pathlib import Path
278
- from aviary.core import DummyEnv
279
- import ldp
280
277
 
281
- client = FutureHouseClient(
282
- api_key="your_api_key",
283
- )
278
+ # Set your API key to FUTUREHOUSE_API_KEY environment variable,
279
+ # or pass it as a string literal to the api_key parameter
280
+ client = FutureHouseClient()
284
281
 
285
282
  task_data = {
286
283
  "name": JobNames.CROW,
287
- "query": "Which neglected diseases had a treatment developed by artificial intelligence?",
284
+ "query": (
285
+ "Which neglected diseases had a treatment developed"
286
+ " by artificial intelligence?"
287
+ ),
288
288
  }
289
-
290
- task_response = client.run_tasks_until_done(task_data)
289
+ (task_response,) = client.run_tasks_until_done(task_data)
291
290
  ```
292
291
 
293
292
  A quickstart example can be found in the [client_notebook.ipynb](https://futurehouse.gitbook.io/futurehouse-cookbook/futurehouse-client/docs/client_notebook) file, where we show how to submit and retrieve a job task, pass runtime configuration to the agent, and ask follow-up questions to the previous job.
@@ -304,9 +303,10 @@ To create a `FutureHouseClient`, you need to pass an FutureHouse platform api ke
304
303
  ```python
305
304
  from futurehouse_client import FutureHouseClient
306
305
 
307
- client = FutureHouseClient(
308
- api_key="your_api_key",
309
- )
306
+ # Set your API key to FUTUREHOUSE_API_KEY environment variable
307
+ client = FutureHouseClient()
308
+ # Or pass it as a string literal to the api_key parameter
309
+ client = FutureHouseClient(api_key="your_api_key")
310
310
  ```
311
311
 
312
312
  ## Authentication
@@ -333,17 +333,13 @@ Using `JobNames`, the task submission looks like this:
333
333
  ```python
334
334
  from futurehouse_client import FutureHouseClient, JobNames
335
335
 
336
- client = FutureHouseClient(
337
- api_key="your_api_key",
338
- )
336
+ client = FutureHouseClient()
339
337
 
340
338
  task_data = {
341
339
  "name": JobNames.OWL,
342
340
  "query": "Has anyone tested therapeutic exerkines in humans or NHPs?",
343
341
  }
344
-
345
- task_response = client.run_tasks_until_done(task_data)
346
-
342
+ (task_response,) = client.run_tasks_until_done(task_data)
347
343
  print(task_response.answer)
348
344
  ```
349
345
 
@@ -363,8 +359,7 @@ async def main():
363
359
  "name": JobNames.OWL,
364
360
  "query": "Has anyone tested therapeutic exerkines in humans or NHPs?",
365
361
  }
366
-
367
- task_response = await client.arun_tasks_until_done(task_data)
362
+ (task_response,) = await client.arun_tasks_until_done(task_data)
368
363
  print(task_response.answer)
369
364
  return task_id
370
365
 
@@ -382,9 +377,7 @@ from futurehouse_client import FutureHouseClient, JobNames
382
377
 
383
378
 
384
379
  async def main():
385
- client = FutureHouseClient(
386
- api_key="your_api_key",
387
- )
380
+ client = FutureHouseClient()
388
381
 
389
382
  task_data = [
390
383
  {
@@ -393,10 +386,12 @@ async def main():
393
386
  },
394
387
  {
395
388
  "name": JobNames.CROW,
396
- "query": "Are there any clinically validated therapeutic exerkines for humans?",
389
+ "query": (
390
+ "Are there any clinically validated"
391
+ " therapeutic exerkines for humans?"
392
+ ),
397
393
  },
398
394
  ]
399
-
400
395
  task_responses = await client.arun_tasks_until_done(task_data)
401
396
  print(task_responses[0].answer)
402
397
  print(task_responses[1].answer)
@@ -423,17 +418,14 @@ if __name__ == "__main__":
423
418
  from futurehouse_client import FutureHouseClient, JobNames
424
419
  from futurehouse_client.models.app import TaskRequest
425
420
 
426
- client = FutureHouseClient(
427
- api_key="your_api_key",
428
- )
421
+ client = FutureHouseClient()
429
422
 
430
- task_response = client.run_tasks_until_done(
423
+ (task_response,) = client.run_tasks_until_done(
431
424
  TaskRequest(
432
425
  name=JobNames.OWL,
433
426
  query="Has anyone tested therapeutic exerkines in humans or NHPs?",
434
427
  )
435
428
  )
436
-
437
429
  print(task_response.answer)
438
430
  ```
439
431
 
@@ -455,14 +447,13 @@ client = FutureHouseClient(
455
447
  api_key="your_api_key",
456
448
  )
457
449
 
458
- task_response = client.run_tasks_until_done(
450
+ (task_response,) = client.run_tasks_until_done(
459
451
  TaskRequest(
460
452
  name=JobNames.OWL,
461
453
  query="Has anyone tested therapeutic exerkines in humans or NHPs?",
462
454
  ),
463
455
  verbose=True,
464
456
  )
465
-
466
457
  print(task_response.environment_frame)
467
458
  ```
468
459
 
@@ -487,17 +478,21 @@ client = FutureHouseClient(
487
478
  api_key="your_api_key",
488
479
  )
489
480
 
490
- task_data = {"name": JobNames.CROW, "query": "How many species of birds are there?"}
491
-
481
+ task_data = {
482
+ "name": JobNames.CROW,
483
+ "query": "How many species of birds are there?",
484
+ }
492
485
  task_id = client.create_task(task_data)
493
486
 
494
487
  continued_task_data = {
495
488
  "name": JobNames.CROW,
496
- "query": "From the previous answer, specifically,how many species of crows are there?",
489
+ "query": (
490
+ "From the previous answer,"
491
+ " specifically, how many species of crows are there?"
492
+ ),
497
493
  "runtime_config": {"continued_task_id": task_id},
498
494
  }
499
-
500
- task_result = client.run_tasks_until_done(continued_task_data)
495
+ (task_response,) = client.run_tasks_until_done(continued_task_data)
501
496
  ```
502
497
 
503
498
  ## Asynchronous tasks
@@ -505,14 +500,14 @@ task_result = client.run_tasks_until_done(continued_task_data)
505
500
  Sometimes you may want to submit many jobs, while querying results at a later time. In this way you can do other things while waiting for a response. The platform API supports this as well rather than waiting for a result.
506
501
 
507
502
  ```python
508
- from futurehouse_client import FutureHouseClient
509
-
510
- client = FutureHouseClient(
511
- api_key="your_api_key",
512
- )
503
+ from futurehouse_client import FutureHouseClient, JobNames
513
504
 
514
- task_data = {"name": JobNames.CROW, "query": "How many species of birds are there?"}
505
+ client = FutureHouseClient()
515
506
 
507
+ task_data = {
508
+ "name": JobNames.CROW,
509
+ "query": "How many species of birds are there?",
510
+ }
516
511
  task_id = client.create_task(task_data)
517
512
 
518
513
  # move on to do other things
@@ -24,20 +24,19 @@ uv pip install futurehouse-client
24
24
 
25
25
  ```python
26
26
  from futurehouse_client import FutureHouseClient, JobNames
27
- from pathlib import Path
28
- from aviary.core import DummyEnv
29
- import ldp
30
27
 
31
- client = FutureHouseClient(
32
- api_key="your_api_key",
33
- )
28
+ # Set your API key to FUTUREHOUSE_API_KEY environment variable,
29
+ # or pass it as a string literal to the api_key parameter
30
+ client = FutureHouseClient()
34
31
 
35
32
  task_data = {
36
33
  "name": JobNames.CROW,
37
- "query": "Which neglected diseases had a treatment developed by artificial intelligence?",
34
+ "query": (
35
+ "Which neglected diseases had a treatment developed"
36
+ " by artificial intelligence?"
37
+ ),
38
38
  }
39
-
40
- task_response = client.run_tasks_until_done(task_data)
39
+ (task_response,) = client.run_tasks_until_done(task_data)
41
40
  ```
42
41
 
43
42
  A quickstart example can be found in the [client_notebook.ipynb](https://futurehouse.gitbook.io/futurehouse-cookbook/futurehouse-client/docs/client_notebook) file, where we show how to submit and retrieve a job task, pass runtime configuration to the agent, and ask follow-up questions to the previous job.
@@ -54,9 +53,10 @@ To create a `FutureHouseClient`, you need to pass an FutureHouse platform api ke
54
53
  ```python
55
54
  from futurehouse_client import FutureHouseClient
56
55
 
57
- client = FutureHouseClient(
58
- api_key="your_api_key",
59
- )
56
+ # Set your API key to FUTUREHOUSE_API_KEY environment variable
57
+ client = FutureHouseClient()
58
+ # Or pass it as a string literal to the api_key parameter
59
+ client = FutureHouseClient(api_key="your_api_key")
60
60
  ```
61
61
 
62
62
  ## Authentication
@@ -83,17 +83,13 @@ Using `JobNames`, the task submission looks like this:
83
83
  ```python
84
84
  from futurehouse_client import FutureHouseClient, JobNames
85
85
 
86
- client = FutureHouseClient(
87
- api_key="your_api_key",
88
- )
86
+ client = FutureHouseClient()
89
87
 
90
88
  task_data = {
91
89
  "name": JobNames.OWL,
92
90
  "query": "Has anyone tested therapeutic exerkines in humans or NHPs?",
93
91
  }
94
-
95
- task_response = client.run_tasks_until_done(task_data)
96
-
92
+ (task_response,) = client.run_tasks_until_done(task_data)
97
93
  print(task_response.answer)
98
94
  ```
99
95
 
@@ -113,8 +109,7 @@ async def main():
113
109
  "name": JobNames.OWL,
114
110
  "query": "Has anyone tested therapeutic exerkines in humans or NHPs?",
115
111
  }
116
-
117
- task_response = await client.arun_tasks_until_done(task_data)
112
+ (task_response,) = await client.arun_tasks_until_done(task_data)
118
113
  print(task_response.answer)
119
114
  return task_id
120
115
 
@@ -132,9 +127,7 @@ from futurehouse_client import FutureHouseClient, JobNames
132
127
 
133
128
 
134
129
  async def main():
135
- client = FutureHouseClient(
136
- api_key="your_api_key",
137
- )
130
+ client = FutureHouseClient()
138
131
 
139
132
  task_data = [
140
133
  {
@@ -143,10 +136,12 @@ async def main():
143
136
  },
144
137
  {
145
138
  "name": JobNames.CROW,
146
- "query": "Are there any clinically validated therapeutic exerkines for humans?",
139
+ "query": (
140
+ "Are there any clinically validated"
141
+ " therapeutic exerkines for humans?"
142
+ ),
147
143
  },
148
144
  ]
149
-
150
145
  task_responses = await client.arun_tasks_until_done(task_data)
151
146
  print(task_responses[0].answer)
152
147
  print(task_responses[1].answer)
@@ -173,17 +168,14 @@ if __name__ == "__main__":
173
168
  from futurehouse_client import FutureHouseClient, JobNames
174
169
  from futurehouse_client.models.app import TaskRequest
175
170
 
176
- client = FutureHouseClient(
177
- api_key="your_api_key",
178
- )
171
+ client = FutureHouseClient()
179
172
 
180
- task_response = client.run_tasks_until_done(
173
+ (task_response,) = client.run_tasks_until_done(
181
174
  TaskRequest(
182
175
  name=JobNames.OWL,
183
176
  query="Has anyone tested therapeutic exerkines in humans or NHPs?",
184
177
  )
185
178
  )
186
-
187
179
  print(task_response.answer)
188
180
  ```
189
181
 
@@ -205,14 +197,13 @@ client = FutureHouseClient(
205
197
  api_key="your_api_key",
206
198
  )
207
199
 
208
- task_response = client.run_tasks_until_done(
200
+ (task_response,) = client.run_tasks_until_done(
209
201
  TaskRequest(
210
202
  name=JobNames.OWL,
211
203
  query="Has anyone tested therapeutic exerkines in humans or NHPs?",
212
204
  ),
213
205
  verbose=True,
214
206
  )
215
-
216
207
  print(task_response.environment_frame)
217
208
  ```
218
209
 
@@ -237,17 +228,21 @@ client = FutureHouseClient(
237
228
  api_key="your_api_key",
238
229
  )
239
230
 
240
- task_data = {"name": JobNames.CROW, "query": "How many species of birds are there?"}
241
-
231
+ task_data = {
232
+ "name": JobNames.CROW,
233
+ "query": "How many species of birds are there?",
234
+ }
242
235
  task_id = client.create_task(task_data)
243
236
 
244
237
  continued_task_data = {
245
238
  "name": JobNames.CROW,
246
- "query": "From the previous answer, specifically,how many species of crows are there?",
239
+ "query": (
240
+ "From the previous answer,"
241
+ " specifically, how many species of crows are there?"
242
+ ),
247
243
  "runtime_config": {"continued_task_id": task_id},
248
244
  }
249
-
250
- task_result = client.run_tasks_until_done(continued_task_data)
245
+ (task_response,) = client.run_tasks_until_done(continued_task_data)
251
246
  ```
252
247
 
253
248
  ## Asynchronous tasks
@@ -255,14 +250,14 @@ task_result = client.run_tasks_until_done(continued_task_data)
255
250
  Sometimes you may want to submit many jobs, while querying results at a later time. In this way you can do other things while waiting for a response. The platform API supports this as well rather than waiting for a result.
256
251
 
257
252
  ```python
258
- from futurehouse_client import FutureHouseClient
259
-
260
- client = FutureHouseClient(
261
- api_key="your_api_key",
262
- )
253
+ from futurehouse_client import FutureHouseClient, JobNames
263
254
 
264
- task_data = {"name": JobNames.CROW, "query": "How many species of birds are there?"}
255
+ client = FutureHouseClient()
265
256
 
257
+ task_data = {
258
+ "name": JobNames.CROW,
259
+ "query": "How many species of birds are there?",
260
+ }
266
261
  task_id = client.create_task(task_data)
267
262
 
268
263
  # move on to do other things
@@ -169,7 +169,7 @@ class RestClient:
169
169
  self.base_url = service_uri or stage.value
170
170
  self.stage = stage
171
171
  self.auth_type = auth_type
172
- self.api_key = api_key
172
+ self.api_key = api_key or os.environ.get("FUTUREHOUSE_API_KEY")
173
173
  self._clients: dict[str, Client | AsyncClient] = {}
174
174
  self.headers = headers or {}
175
175
  self.jwt = jwt
@@ -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.dev55'
21
- __version_tuple__ = version_tuple = (0, 3, 20, 'dev55')
20
+ __version__ = version = '0.3.20.dev63'
21
+ __version_tuple__ = version_tuple = (0, 3, 20, 'dev63')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: futurehouse-client
3
- Version: 0.3.20.dev55
3
+ Version: 0.3.20.dev63
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
@@ -274,20 +274,19 @@ uv pip install futurehouse-client
274
274
 
275
275
  ```python
276
276
  from futurehouse_client import FutureHouseClient, JobNames
277
- from pathlib import Path
278
- from aviary.core import DummyEnv
279
- import ldp
280
277
 
281
- client = FutureHouseClient(
282
- api_key="your_api_key",
283
- )
278
+ # Set your API key to FUTUREHOUSE_API_KEY environment variable,
279
+ # or pass it as a string literal to the api_key parameter
280
+ client = FutureHouseClient()
284
281
 
285
282
  task_data = {
286
283
  "name": JobNames.CROW,
287
- "query": "Which neglected diseases had a treatment developed by artificial intelligence?",
284
+ "query": (
285
+ "Which neglected diseases had a treatment developed"
286
+ " by artificial intelligence?"
287
+ ),
288
288
  }
289
-
290
- task_response = client.run_tasks_until_done(task_data)
289
+ (task_response,) = client.run_tasks_until_done(task_data)
291
290
  ```
292
291
 
293
292
  A quickstart example can be found in the [client_notebook.ipynb](https://futurehouse.gitbook.io/futurehouse-cookbook/futurehouse-client/docs/client_notebook) file, where we show how to submit and retrieve a job task, pass runtime configuration to the agent, and ask follow-up questions to the previous job.
@@ -304,9 +303,10 @@ To create a `FutureHouseClient`, you need to pass an FutureHouse platform api ke
304
303
  ```python
305
304
  from futurehouse_client import FutureHouseClient
306
305
 
307
- client = FutureHouseClient(
308
- api_key="your_api_key",
309
- )
306
+ # Set your API key to FUTUREHOUSE_API_KEY environment variable
307
+ client = FutureHouseClient()
308
+ # Or pass it as a string literal to the api_key parameter
309
+ client = FutureHouseClient(api_key="your_api_key")
310
310
  ```
311
311
 
312
312
  ## Authentication
@@ -333,17 +333,13 @@ Using `JobNames`, the task submission looks like this:
333
333
  ```python
334
334
  from futurehouse_client import FutureHouseClient, JobNames
335
335
 
336
- client = FutureHouseClient(
337
- api_key="your_api_key",
338
- )
336
+ client = FutureHouseClient()
339
337
 
340
338
  task_data = {
341
339
  "name": JobNames.OWL,
342
340
  "query": "Has anyone tested therapeutic exerkines in humans or NHPs?",
343
341
  }
344
-
345
- task_response = client.run_tasks_until_done(task_data)
346
-
342
+ (task_response,) = client.run_tasks_until_done(task_data)
347
343
  print(task_response.answer)
348
344
  ```
349
345
 
@@ -363,8 +359,7 @@ async def main():
363
359
  "name": JobNames.OWL,
364
360
  "query": "Has anyone tested therapeutic exerkines in humans or NHPs?",
365
361
  }
366
-
367
- task_response = await client.arun_tasks_until_done(task_data)
362
+ (task_response,) = await client.arun_tasks_until_done(task_data)
368
363
  print(task_response.answer)
369
364
  return task_id
370
365
 
@@ -382,9 +377,7 @@ from futurehouse_client import FutureHouseClient, JobNames
382
377
 
383
378
 
384
379
  async def main():
385
- client = FutureHouseClient(
386
- api_key="your_api_key",
387
- )
380
+ client = FutureHouseClient()
388
381
 
389
382
  task_data = [
390
383
  {
@@ -393,10 +386,12 @@ async def main():
393
386
  },
394
387
  {
395
388
  "name": JobNames.CROW,
396
- "query": "Are there any clinically validated therapeutic exerkines for humans?",
389
+ "query": (
390
+ "Are there any clinically validated"
391
+ " therapeutic exerkines for humans?"
392
+ ),
397
393
  },
398
394
  ]
399
-
400
395
  task_responses = await client.arun_tasks_until_done(task_data)
401
396
  print(task_responses[0].answer)
402
397
  print(task_responses[1].answer)
@@ -423,17 +418,14 @@ if __name__ == "__main__":
423
418
  from futurehouse_client import FutureHouseClient, JobNames
424
419
  from futurehouse_client.models.app import TaskRequest
425
420
 
426
- client = FutureHouseClient(
427
- api_key="your_api_key",
428
- )
421
+ client = FutureHouseClient()
429
422
 
430
- task_response = client.run_tasks_until_done(
423
+ (task_response,) = client.run_tasks_until_done(
431
424
  TaskRequest(
432
425
  name=JobNames.OWL,
433
426
  query="Has anyone tested therapeutic exerkines in humans or NHPs?",
434
427
  )
435
428
  )
436
-
437
429
  print(task_response.answer)
438
430
  ```
439
431
 
@@ -455,14 +447,13 @@ client = FutureHouseClient(
455
447
  api_key="your_api_key",
456
448
  )
457
449
 
458
- task_response = client.run_tasks_until_done(
450
+ (task_response,) = client.run_tasks_until_done(
459
451
  TaskRequest(
460
452
  name=JobNames.OWL,
461
453
  query="Has anyone tested therapeutic exerkines in humans or NHPs?",
462
454
  ),
463
455
  verbose=True,
464
456
  )
465
-
466
457
  print(task_response.environment_frame)
467
458
  ```
468
459
 
@@ -487,17 +478,21 @@ client = FutureHouseClient(
487
478
  api_key="your_api_key",
488
479
  )
489
480
 
490
- task_data = {"name": JobNames.CROW, "query": "How many species of birds are there?"}
491
-
481
+ task_data = {
482
+ "name": JobNames.CROW,
483
+ "query": "How many species of birds are there?",
484
+ }
492
485
  task_id = client.create_task(task_data)
493
486
 
494
487
  continued_task_data = {
495
488
  "name": JobNames.CROW,
496
- "query": "From the previous answer, specifically,how many species of crows are there?",
489
+ "query": (
490
+ "From the previous answer,"
491
+ " specifically, how many species of crows are there?"
492
+ ),
497
493
  "runtime_config": {"continued_task_id": task_id},
498
494
  }
499
-
500
- task_result = client.run_tasks_until_done(continued_task_data)
495
+ (task_response,) = client.run_tasks_until_done(continued_task_data)
501
496
  ```
502
497
 
503
498
  ## Asynchronous tasks
@@ -505,14 +500,14 @@ task_result = client.run_tasks_until_done(continued_task_data)
505
500
  Sometimes you may want to submit many jobs, while querying results at a later time. In this way you can do other things while waiting for a response. The platform API supports this as well rather than waiting for a result.
506
501
 
507
502
  ```python
508
- from futurehouse_client import FutureHouseClient
509
-
510
- client = FutureHouseClient(
511
- api_key="your_api_key",
512
- )
503
+ from futurehouse_client import FutureHouseClient, JobNames
513
504
 
514
- task_data = {"name": JobNames.CROW, "query": "How many species of birds are there?"}
505
+ client = FutureHouseClient()
515
506
 
507
+ task_data = {
508
+ "name": JobNames.CROW,
509
+ "query": "How many species of birds are there?",
510
+ }
516
511
  task_id = client.create_task(task_data)
517
512
 
518
513
  # move on to do other things