athena-intelligence 0.1.82__py3-none-any.whl → 0.1.84__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.
- athena/base_client.py +40 -18
- athena/chain/client.py +85 -36
- athena/client.py +91 -4
- athena/core/__init__.py +4 -1
- athena/core/client_wrapper.py +1 -1
- athena/core/pydantic_utilities.py +16 -0
- athena/core/query_encoder.py +33 -0
- athena/dataset/client.py +59 -32
- athena/message/client.py +77 -32
- athena/query/client.py +37 -14
- athena/report/client.py +37 -14
- athena/search/client.py +45 -22
- athena/snippet/client.py +93 -44
- athena/tools/client.py +357 -174
- athena/types/convert_pdf_to_sheet_out.py +7 -3
- athena/types/data_frame_parsing_error.py +7 -3
- athena/types/data_frame_request_out.py +7 -3
- athena/types/data_frame_unknown_format_error.py +7 -3
- athena/types/dataset.py +7 -3
- athena/types/document.py +7 -3
- athena/types/excecute_tool_first_workflow_out.py +7 -3
- athena/types/file_data_response.py +7 -3
- athena/types/file_fetch_error.py +7 -3
- athena/types/filter_model.py +7 -3
- athena/types/firecrawl_scrape_url_data_reponse_dto.py +7 -3
- athena/types/firecrawl_scrape_url_metadata.py +7 -3
- athena/types/get_datasets_response.py +7 -3
- athena/types/get_snippet_out.py +7 -3
- athena/types/get_snippets_response.py +7 -3
- athena/types/http_validation_error.py +7 -3
- athena/types/langchain_documents_request_out.py +7 -3
- athena/types/map_reduce_chain_out.py +7 -3
- athena/types/message_out.py +7 -3
- athena/types/message_out_dto.py +7 -3
- athena/types/publish_formats.py +7 -3
- athena/types/query_model.py +7 -3
- athena/types/report.py +7 -3
- athena/types/researcher_out.py +7 -3
- athena/types/semantic_query_out.py +7 -3
- athena/types/snippet.py +7 -3
- athena/types/sql_results.py +7 -3
- athena/types/structured_parse_result.py +7 -3
- athena/types/time_dimension_model.py +7 -3
- athena/types/upload_documents_out.py +7 -3
- athena/types/url_result.py +7 -3
- athena/types/validation_error.py +7 -3
- athena/types/workflow_status_out.py +7 -3
- athena/upload/client.py +37 -12
- athena/workflow/client.py +35 -12
- {athena_intelligence-0.1.82.dist-info → athena_intelligence-0.1.84.dist-info}/METADATA +12 -2
- athena_intelligence-0.1.84.dist-info/RECORD +91 -0
- athena_intelligence-0.1.82.dist-info/RECORD +0 -90
- {athena_intelligence-0.1.82.dist-info → athena_intelligence-0.1.84.dist-info}/WHEEL +0 -0
athena/tools/client.py
CHANGED
@@ -8,6 +8,7 @@ from ..core.api_error import ApiError
|
|
8
8
|
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
9
9
|
from ..core.jsonable_encoder import jsonable_encoder
|
10
10
|
from ..core.pydantic_utilities import pydantic_v1
|
11
|
+
from ..core.query_encoder import encode_query
|
11
12
|
from ..core.remove_none_from_dict import remove_none_from_dict
|
12
13
|
from ..core.request_options import RequestOptions
|
13
14
|
from ..errors.internal_server_error import InternalServerError
|
@@ -46,13 +47,22 @@ class ToolsClient:
|
|
46
47
|
request_options: typing.Optional[RequestOptions] = None,
|
47
48
|
) -> FirecrawlScrapeUrlDataReponseDto:
|
48
49
|
"""
|
49
|
-
Parameters
|
50
|
-
|
50
|
+
Parameters
|
51
|
+
----------
|
52
|
+
url : str
|
51
53
|
|
52
|
-
|
54
|
+
params : typing.Optional[typing.Dict[str, typing.Any]]
|
53
55
|
|
54
|
-
|
55
|
-
|
56
|
+
request_options : typing.Optional[RequestOptions]
|
57
|
+
Request-specific configuration.
|
58
|
+
|
59
|
+
Returns
|
60
|
+
-------
|
61
|
+
FirecrawlScrapeUrlDataReponseDto
|
62
|
+
Successful Response
|
63
|
+
|
64
|
+
Examples
|
65
|
+
--------
|
56
66
|
from athena.client import Athena
|
57
67
|
|
58
68
|
client = Athena(
|
@@ -69,8 +79,10 @@ class ToolsClient:
|
|
69
79
|
_response = self._client_wrapper.httpx_client.request(
|
70
80
|
method="POST",
|
71
81
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/firecrawl/scrape-url"),
|
72
|
-
params=
|
73
|
-
|
82
|
+
params=encode_query(
|
83
|
+
jsonable_encoder(
|
84
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
85
|
+
)
|
74
86
|
),
|
75
87
|
json=jsonable_encoder(_request)
|
76
88
|
if request_options is None or request_options.get("additional_body_parameters") is None
|
@@ -113,15 +125,24 @@ class ToolsClient:
|
|
113
125
|
request_options: typing.Optional[RequestOptions] = None,
|
114
126
|
) -> LangchainDocumentsRequestOut:
|
115
127
|
"""
|
116
|
-
Parameters
|
117
|
-
|
128
|
+
Parameters
|
129
|
+
----------
|
130
|
+
document_id : str
|
131
|
+
|
132
|
+
pagination_limit : typing.Optional[int]
|
118
133
|
|
119
|
-
|
134
|
+
pagination_offset : typing.Optional[int]
|
120
135
|
|
121
|
-
|
136
|
+
request_options : typing.Optional[RequestOptions]
|
137
|
+
Request-specific configuration.
|
122
138
|
|
123
|
-
|
124
|
-
|
139
|
+
Returns
|
140
|
+
-------
|
141
|
+
LangchainDocumentsRequestOut
|
142
|
+
Successful Response
|
143
|
+
|
144
|
+
Examples
|
145
|
+
--------
|
125
146
|
from athena.client import Athena
|
126
147
|
|
127
148
|
client = Athena(
|
@@ -143,8 +164,10 @@ class ToolsClient:
|
|
143
164
|
url=urllib.parse.urljoin(
|
144
165
|
f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/file/langchain-documents"
|
145
166
|
),
|
146
|
-
params=
|
147
|
-
|
167
|
+
params=encode_query(
|
168
|
+
jsonable_encoder(
|
169
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
170
|
+
)
|
148
171
|
),
|
149
172
|
json=jsonable_encoder(_request)
|
150
173
|
if request_options is None or request_options.get("additional_body_parameters") is None
|
@@ -192,21 +215,33 @@ class ToolsClient:
|
|
192
215
|
request_options: typing.Optional[RequestOptions] = None,
|
193
216
|
) -> DataFrameRequestOut:
|
194
217
|
"""
|
195
|
-
Parameters
|
196
|
-
|
218
|
+
Parameters
|
219
|
+
----------
|
220
|
+
document_id : str
|
221
|
+
|
222
|
+
row_limit : typing.Optional[int]
|
223
|
+
|
224
|
+
index_column : typing.Optional[int]
|
197
225
|
|
198
|
-
|
226
|
+
columns : typing.Optional[typing.Union[ToolsDataFrameRequestColumnsItem, typing.Sequence[ToolsDataFrameRequestColumnsItem]]]
|
227
|
+
should be a list of strings or a list of integers
|
199
228
|
|
200
|
-
|
229
|
+
sheet_name : typing.Optional[str]
|
230
|
+
only for excel files
|
201
231
|
|
202
|
-
|
232
|
+
separator : typing.Optional[str]
|
233
|
+
only for csv files
|
203
234
|
|
204
|
-
|
235
|
+
request_options : typing.Optional[RequestOptions]
|
236
|
+
Request-specific configuration.
|
205
237
|
|
206
|
-
|
238
|
+
Returns
|
239
|
+
-------
|
240
|
+
DataFrameRequestOut
|
241
|
+
Successful Response
|
207
242
|
|
208
|
-
|
209
|
-
|
243
|
+
Examples
|
244
|
+
--------
|
210
245
|
from athena.client import Athena
|
211
246
|
|
212
247
|
client = Athena(
|
@@ -219,21 +254,23 @@ class ToolsClient:
|
|
219
254
|
_response = self._client_wrapper.httpx_client.request(
|
220
255
|
method="GET",
|
221
256
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/file/data-frame"),
|
222
|
-
params=
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
257
|
+
params=encode_query(
|
258
|
+
jsonable_encoder(
|
259
|
+
remove_none_from_dict(
|
260
|
+
{
|
261
|
+
"document_id": document_id,
|
262
|
+
"row_limit": row_limit,
|
263
|
+
"index_column": index_column,
|
264
|
+
"columns": columns,
|
265
|
+
"sheet_name": sheet_name,
|
266
|
+
"separator": separator,
|
267
|
+
**(
|
268
|
+
request_options.get("additional_query_parameters", {})
|
269
|
+
if request_options is not None
|
270
|
+
else {}
|
271
|
+
),
|
272
|
+
}
|
273
|
+
)
|
237
274
|
)
|
238
275
|
),
|
239
276
|
headers=jsonable_encoder(
|
@@ -274,11 +311,20 @@ class ToolsClient:
|
|
274
311
|
self, *, document_id: str, request_options: typing.Optional[RequestOptions] = None
|
275
312
|
) -> typing.Iterator[bytes]:
|
276
313
|
"""
|
277
|
-
Parameters
|
278
|
-
|
314
|
+
Parameters
|
315
|
+
----------
|
316
|
+
document_id : str
|
279
317
|
|
280
|
-
|
281
|
-
|
318
|
+
request_options : typing.Optional[RequestOptions]
|
319
|
+
Request-specific configuration.
|
320
|
+
|
321
|
+
Yields
|
322
|
+
------
|
323
|
+
typing.Iterator[bytes]
|
324
|
+
Stream the file in original format.
|
325
|
+
|
326
|
+
Examples
|
327
|
+
--------
|
282
328
|
from athena.client import Athena
|
283
329
|
|
284
330
|
client = Athena(
|
@@ -291,16 +337,18 @@ class ToolsClient:
|
|
291
337
|
with self._client_wrapper.httpx_client.stream(
|
292
338
|
method="GET",
|
293
339
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/file/raw-data"),
|
294
|
-
params=
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
340
|
+
params=encode_query(
|
341
|
+
jsonable_encoder(
|
342
|
+
remove_none_from_dict(
|
343
|
+
{
|
344
|
+
"document_id": document_id,
|
345
|
+
**(
|
346
|
+
request_options.get("additional_query_parameters", {})
|
347
|
+
if request_options is not None
|
348
|
+
else {}
|
349
|
+
),
|
350
|
+
}
|
351
|
+
)
|
304
352
|
)
|
305
353
|
),
|
306
354
|
headers=jsonable_encoder(
|
@@ -337,24 +385,33 @@ class ToolsClient:
|
|
337
385
|
def tool_first_workflow(
|
338
386
|
self,
|
339
387
|
*,
|
340
|
-
model: typing.Optional[LlmModel] = OMIT,
|
341
388
|
tool_name: str,
|
342
389
|
content: str,
|
390
|
+
model: typing.Optional[LlmModel] = OMIT,
|
343
391
|
tool_kwargs: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
344
392
|
request_options: typing.Optional[RequestOptions] = None,
|
345
393
|
) -> ExcecuteToolFirstWorkflowOut:
|
346
394
|
"""
|
347
|
-
Parameters
|
348
|
-
|
395
|
+
Parameters
|
396
|
+
----------
|
397
|
+
tool_name : str
|
349
398
|
|
350
|
-
|
399
|
+
content : str
|
351
400
|
|
352
|
-
|
401
|
+
model : typing.Optional[LlmModel]
|
353
402
|
|
354
|
-
|
403
|
+
tool_kwargs : typing.Optional[typing.Dict[str, typing.Any]]
|
355
404
|
|
356
|
-
|
357
|
-
|
405
|
+
request_options : typing.Optional[RequestOptions]
|
406
|
+
Request-specific configuration.
|
407
|
+
|
408
|
+
Returns
|
409
|
+
-------
|
410
|
+
ExcecuteToolFirstWorkflowOut
|
411
|
+
Successful Response
|
412
|
+
|
413
|
+
Examples
|
414
|
+
--------
|
358
415
|
from athena import LlmModel
|
359
416
|
from athena.client import Athena
|
360
417
|
|
@@ -376,8 +433,10 @@ class ToolsClient:
|
|
376
433
|
_response = self._client_wrapper.httpx_client.request(
|
377
434
|
method="POST",
|
378
435
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/first-agent"),
|
379
|
-
params=
|
380
|
-
|
436
|
+
params=encode_query(
|
437
|
+
jsonable_encoder(
|
438
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
439
|
+
)
|
381
440
|
),
|
382
441
|
json=jsonable_encoder(_request)
|
383
442
|
if request_options is None or request_options.get("additional_body_parameters") is None
|
@@ -423,21 +482,30 @@ class ToolsClient:
|
|
423
482
|
request_options: typing.Optional[RequestOptions] = None,
|
424
483
|
) -> ResearcherOut:
|
425
484
|
"""
|
426
|
-
Parameters
|
427
|
-
|
485
|
+
Parameters
|
486
|
+
----------
|
487
|
+
query : str
|
488
|
+
|
489
|
+
max_sections : int
|
428
490
|
|
429
|
-
|
491
|
+
guidelines : typing.Sequence[str]
|
430
492
|
|
431
|
-
|
493
|
+
publish_formats : typing.Optional[PublishFormats]
|
432
494
|
|
433
|
-
|
495
|
+
source : typing.Optional[str]
|
434
496
|
|
435
|
-
|
497
|
+
athena_document_ids : typing.Optional[typing.Sequence[str]]
|
436
498
|
|
437
|
-
|
499
|
+
request_options : typing.Optional[RequestOptions]
|
500
|
+
Request-specific configuration.
|
438
501
|
|
439
|
-
|
440
|
-
|
502
|
+
Returns
|
503
|
+
-------
|
504
|
+
ResearcherOut
|
505
|
+
Successful Response
|
506
|
+
|
507
|
+
Examples
|
508
|
+
--------
|
441
509
|
from athena import PublishFormats
|
442
510
|
from athena.client import Athena
|
443
511
|
|
@@ -475,8 +543,10 @@ class ToolsClient:
|
|
475
543
|
_response = self._client_wrapper.httpx_client.request(
|
476
544
|
method="POST",
|
477
545
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/researcher"),
|
478
|
-
params=
|
479
|
-
|
546
|
+
params=encode_query(
|
547
|
+
jsonable_encoder(
|
548
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
549
|
+
)
|
480
550
|
),
|
481
551
|
json=jsonable_encoder(_request)
|
482
552
|
if request_options is None or request_options.get("additional_body_parameters") is None
|
@@ -514,11 +584,20 @@ class ToolsClient:
|
|
514
584
|
self, *, document_id: str, request_options: typing.Optional[RequestOptions] = None
|
515
585
|
) -> ConvertPdfToSheetOut:
|
516
586
|
"""
|
517
|
-
Parameters
|
518
|
-
|
587
|
+
Parameters
|
588
|
+
----------
|
589
|
+
document_id : str
|
590
|
+
|
591
|
+
request_options : typing.Optional[RequestOptions]
|
592
|
+
Request-specific configuration.
|
593
|
+
|
594
|
+
Returns
|
595
|
+
-------
|
596
|
+
ConvertPdfToSheetOut
|
597
|
+
Successful Response
|
519
598
|
|
520
|
-
|
521
|
-
|
599
|
+
Examples
|
600
|
+
--------
|
522
601
|
from athena.client import Athena
|
523
602
|
|
524
603
|
client = Athena(
|
@@ -531,8 +610,10 @@ class ToolsClient:
|
|
531
610
|
_response = self._client_wrapper.httpx_client.request(
|
532
611
|
method="POST",
|
533
612
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/convert-pdf-to-sheet"),
|
534
|
-
params=
|
535
|
-
|
613
|
+
params=encode_query(
|
614
|
+
jsonable_encoder(
|
615
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
616
|
+
)
|
536
617
|
),
|
537
618
|
json=jsonable_encoder({"document_id": document_id})
|
538
619
|
if request_options is None or request_options.get("additional_body_parameters") is None
|
@@ -574,13 +655,22 @@ class ToolsClient:
|
|
574
655
|
request_options: typing.Optional[RequestOptions] = None,
|
575
656
|
) -> SemanticQueryOut:
|
576
657
|
"""
|
577
|
-
Parameters
|
578
|
-
|
658
|
+
Parameters
|
659
|
+
----------
|
660
|
+
query : QueryModel
|
661
|
+
|
662
|
+
table_name : typing.Optional[str]
|
579
663
|
|
580
|
-
|
664
|
+
request_options : typing.Optional[RequestOptions]
|
665
|
+
Request-specific configuration.
|
581
666
|
|
582
|
-
|
583
|
-
|
667
|
+
Returns
|
668
|
+
-------
|
669
|
+
SemanticQueryOut
|
670
|
+
Successful Response
|
671
|
+
|
672
|
+
Examples
|
673
|
+
--------
|
584
674
|
from athena import FilterModel, FilterOperator, QueryModel, TimeDimensionModel
|
585
675
|
from athena.client import Athena
|
586
676
|
|
@@ -614,8 +704,10 @@ class ToolsClient:
|
|
614
704
|
_response = self._client_wrapper.httpx_client.request(
|
615
705
|
method="POST",
|
616
706
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/strict-semantic-query"),
|
617
|
-
params=
|
618
|
-
|
707
|
+
params=encode_query(
|
708
|
+
jsonable_encoder(
|
709
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
710
|
+
)
|
619
711
|
),
|
620
712
|
json=jsonable_encoder(_request)
|
621
713
|
if request_options is None or request_options.get("additional_body_parameters") is None
|
@@ -662,13 +754,22 @@ class AsyncToolsClient:
|
|
662
754
|
request_options: typing.Optional[RequestOptions] = None,
|
663
755
|
) -> FirecrawlScrapeUrlDataReponseDto:
|
664
756
|
"""
|
665
|
-
Parameters
|
666
|
-
|
757
|
+
Parameters
|
758
|
+
----------
|
759
|
+
url : str
|
667
760
|
|
668
|
-
|
761
|
+
params : typing.Optional[typing.Dict[str, typing.Any]]
|
669
762
|
|
670
|
-
|
671
|
-
|
763
|
+
request_options : typing.Optional[RequestOptions]
|
764
|
+
Request-specific configuration.
|
765
|
+
|
766
|
+
Returns
|
767
|
+
-------
|
768
|
+
FirecrawlScrapeUrlDataReponseDto
|
769
|
+
Successful Response
|
770
|
+
|
771
|
+
Examples
|
772
|
+
--------
|
672
773
|
from athena.client import AsyncAthena
|
673
774
|
|
674
775
|
client = AsyncAthena(
|
@@ -685,8 +786,10 @@ class AsyncToolsClient:
|
|
685
786
|
_response = await self._client_wrapper.httpx_client.request(
|
686
787
|
method="POST",
|
687
788
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/firecrawl/scrape-url"),
|
688
|
-
params=
|
689
|
-
|
789
|
+
params=encode_query(
|
790
|
+
jsonable_encoder(
|
791
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
792
|
+
)
|
690
793
|
),
|
691
794
|
json=jsonable_encoder(_request)
|
692
795
|
if request_options is None or request_options.get("additional_body_parameters") is None
|
@@ -729,15 +832,24 @@ class AsyncToolsClient:
|
|
729
832
|
request_options: typing.Optional[RequestOptions] = None,
|
730
833
|
) -> LangchainDocumentsRequestOut:
|
731
834
|
"""
|
732
|
-
Parameters
|
733
|
-
|
835
|
+
Parameters
|
836
|
+
----------
|
837
|
+
document_id : str
|
838
|
+
|
839
|
+
pagination_limit : typing.Optional[int]
|
734
840
|
|
735
|
-
|
841
|
+
pagination_offset : typing.Optional[int]
|
736
842
|
|
737
|
-
|
843
|
+
request_options : typing.Optional[RequestOptions]
|
844
|
+
Request-specific configuration.
|
738
845
|
|
739
|
-
|
740
|
-
|
846
|
+
Returns
|
847
|
+
-------
|
848
|
+
LangchainDocumentsRequestOut
|
849
|
+
Successful Response
|
850
|
+
|
851
|
+
Examples
|
852
|
+
--------
|
741
853
|
from athena.client import AsyncAthena
|
742
854
|
|
743
855
|
client = AsyncAthena(
|
@@ -759,8 +871,10 @@ class AsyncToolsClient:
|
|
759
871
|
url=urllib.parse.urljoin(
|
760
872
|
f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/file/langchain-documents"
|
761
873
|
),
|
762
|
-
params=
|
763
|
-
|
874
|
+
params=encode_query(
|
875
|
+
jsonable_encoder(
|
876
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
877
|
+
)
|
764
878
|
),
|
765
879
|
json=jsonable_encoder(_request)
|
766
880
|
if request_options is None or request_options.get("additional_body_parameters") is None
|
@@ -808,21 +922,33 @@ class AsyncToolsClient:
|
|
808
922
|
request_options: typing.Optional[RequestOptions] = None,
|
809
923
|
) -> DataFrameRequestOut:
|
810
924
|
"""
|
811
|
-
Parameters
|
812
|
-
|
925
|
+
Parameters
|
926
|
+
----------
|
927
|
+
document_id : str
|
928
|
+
|
929
|
+
row_limit : typing.Optional[int]
|
930
|
+
|
931
|
+
index_column : typing.Optional[int]
|
813
932
|
|
814
|
-
|
933
|
+
columns : typing.Optional[typing.Union[ToolsDataFrameRequestColumnsItem, typing.Sequence[ToolsDataFrameRequestColumnsItem]]]
|
934
|
+
should be a list of strings or a list of integers
|
815
935
|
|
816
|
-
|
936
|
+
sheet_name : typing.Optional[str]
|
937
|
+
only for excel files
|
817
938
|
|
818
|
-
|
939
|
+
separator : typing.Optional[str]
|
940
|
+
only for csv files
|
819
941
|
|
820
|
-
|
942
|
+
request_options : typing.Optional[RequestOptions]
|
943
|
+
Request-specific configuration.
|
821
944
|
|
822
|
-
|
945
|
+
Returns
|
946
|
+
-------
|
947
|
+
DataFrameRequestOut
|
948
|
+
Successful Response
|
823
949
|
|
824
|
-
|
825
|
-
|
950
|
+
Examples
|
951
|
+
--------
|
826
952
|
from athena.client import AsyncAthena
|
827
953
|
|
828
954
|
client = AsyncAthena(
|
@@ -835,21 +961,23 @@ class AsyncToolsClient:
|
|
835
961
|
_response = await self._client_wrapper.httpx_client.request(
|
836
962
|
method="GET",
|
837
963
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/file/data-frame"),
|
838
|
-
params=
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
964
|
+
params=encode_query(
|
965
|
+
jsonable_encoder(
|
966
|
+
remove_none_from_dict(
|
967
|
+
{
|
968
|
+
"document_id": document_id,
|
969
|
+
"row_limit": row_limit,
|
970
|
+
"index_column": index_column,
|
971
|
+
"columns": columns,
|
972
|
+
"sheet_name": sheet_name,
|
973
|
+
"separator": separator,
|
974
|
+
**(
|
975
|
+
request_options.get("additional_query_parameters", {})
|
976
|
+
if request_options is not None
|
977
|
+
else {}
|
978
|
+
),
|
979
|
+
}
|
980
|
+
)
|
853
981
|
)
|
854
982
|
),
|
855
983
|
headers=jsonable_encoder(
|
@@ -890,11 +1018,20 @@ class AsyncToolsClient:
|
|
890
1018
|
self, *, document_id: str, request_options: typing.Optional[RequestOptions] = None
|
891
1019
|
) -> typing.AsyncIterator[bytes]:
|
892
1020
|
"""
|
893
|
-
Parameters
|
894
|
-
|
1021
|
+
Parameters
|
1022
|
+
----------
|
1023
|
+
document_id : str
|
895
1024
|
|
896
|
-
|
897
|
-
|
1025
|
+
request_options : typing.Optional[RequestOptions]
|
1026
|
+
Request-specific configuration.
|
1027
|
+
|
1028
|
+
Yields
|
1029
|
+
------
|
1030
|
+
typing.AsyncIterator[bytes]
|
1031
|
+
Stream the file in original format.
|
1032
|
+
|
1033
|
+
Examples
|
1034
|
+
--------
|
898
1035
|
from athena.client import AsyncAthena
|
899
1036
|
|
900
1037
|
client = AsyncAthena(
|
@@ -907,16 +1044,18 @@ class AsyncToolsClient:
|
|
907
1044
|
async with self._client_wrapper.httpx_client.stream(
|
908
1045
|
method="GET",
|
909
1046
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/file/raw-data"),
|
910
|
-
params=
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
1047
|
+
params=encode_query(
|
1048
|
+
jsonable_encoder(
|
1049
|
+
remove_none_from_dict(
|
1050
|
+
{
|
1051
|
+
"document_id": document_id,
|
1052
|
+
**(
|
1053
|
+
request_options.get("additional_query_parameters", {})
|
1054
|
+
if request_options is not None
|
1055
|
+
else {}
|
1056
|
+
),
|
1057
|
+
}
|
1058
|
+
)
|
920
1059
|
)
|
921
1060
|
),
|
922
1061
|
headers=jsonable_encoder(
|
@@ -953,24 +1092,33 @@ class AsyncToolsClient:
|
|
953
1092
|
async def tool_first_workflow(
|
954
1093
|
self,
|
955
1094
|
*,
|
956
|
-
model: typing.Optional[LlmModel] = OMIT,
|
957
1095
|
tool_name: str,
|
958
1096
|
content: str,
|
1097
|
+
model: typing.Optional[LlmModel] = OMIT,
|
959
1098
|
tool_kwargs: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
960
1099
|
request_options: typing.Optional[RequestOptions] = None,
|
961
1100
|
) -> ExcecuteToolFirstWorkflowOut:
|
962
1101
|
"""
|
963
|
-
Parameters
|
964
|
-
|
1102
|
+
Parameters
|
1103
|
+
----------
|
1104
|
+
tool_name : str
|
965
1105
|
|
966
|
-
|
1106
|
+
content : str
|
967
1107
|
|
968
|
-
|
1108
|
+
model : typing.Optional[LlmModel]
|
969
1109
|
|
970
|
-
|
1110
|
+
tool_kwargs : typing.Optional[typing.Dict[str, typing.Any]]
|
971
1111
|
|
972
|
-
|
973
|
-
|
1112
|
+
request_options : typing.Optional[RequestOptions]
|
1113
|
+
Request-specific configuration.
|
1114
|
+
|
1115
|
+
Returns
|
1116
|
+
-------
|
1117
|
+
ExcecuteToolFirstWorkflowOut
|
1118
|
+
Successful Response
|
1119
|
+
|
1120
|
+
Examples
|
1121
|
+
--------
|
974
1122
|
from athena import LlmModel
|
975
1123
|
from athena.client import AsyncAthena
|
976
1124
|
|
@@ -992,8 +1140,10 @@ class AsyncToolsClient:
|
|
992
1140
|
_response = await self._client_wrapper.httpx_client.request(
|
993
1141
|
method="POST",
|
994
1142
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/first-agent"),
|
995
|
-
params=
|
996
|
-
|
1143
|
+
params=encode_query(
|
1144
|
+
jsonable_encoder(
|
1145
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
1146
|
+
)
|
997
1147
|
),
|
998
1148
|
json=jsonable_encoder(_request)
|
999
1149
|
if request_options is None or request_options.get("additional_body_parameters") is None
|
@@ -1039,21 +1189,30 @@ class AsyncToolsClient:
|
|
1039
1189
|
request_options: typing.Optional[RequestOptions] = None,
|
1040
1190
|
) -> ResearcherOut:
|
1041
1191
|
"""
|
1042
|
-
Parameters
|
1043
|
-
|
1192
|
+
Parameters
|
1193
|
+
----------
|
1194
|
+
query : str
|
1195
|
+
|
1196
|
+
max_sections : int
|
1044
1197
|
|
1045
|
-
|
1198
|
+
guidelines : typing.Sequence[str]
|
1046
1199
|
|
1047
|
-
|
1200
|
+
publish_formats : typing.Optional[PublishFormats]
|
1048
1201
|
|
1049
|
-
|
1202
|
+
source : typing.Optional[str]
|
1050
1203
|
|
1051
|
-
|
1204
|
+
athena_document_ids : typing.Optional[typing.Sequence[str]]
|
1052
1205
|
|
1053
|
-
|
1206
|
+
request_options : typing.Optional[RequestOptions]
|
1207
|
+
Request-specific configuration.
|
1054
1208
|
|
1055
|
-
|
1056
|
-
|
1209
|
+
Returns
|
1210
|
+
-------
|
1211
|
+
ResearcherOut
|
1212
|
+
Successful Response
|
1213
|
+
|
1214
|
+
Examples
|
1215
|
+
--------
|
1057
1216
|
from athena import PublishFormats
|
1058
1217
|
from athena.client import AsyncAthena
|
1059
1218
|
|
@@ -1091,8 +1250,10 @@ class AsyncToolsClient:
|
|
1091
1250
|
_response = await self._client_wrapper.httpx_client.request(
|
1092
1251
|
method="POST",
|
1093
1252
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/researcher"),
|
1094
|
-
params=
|
1095
|
-
|
1253
|
+
params=encode_query(
|
1254
|
+
jsonable_encoder(
|
1255
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
1256
|
+
)
|
1096
1257
|
),
|
1097
1258
|
json=jsonable_encoder(_request)
|
1098
1259
|
if request_options is None or request_options.get("additional_body_parameters") is None
|
@@ -1130,11 +1291,20 @@ class AsyncToolsClient:
|
|
1130
1291
|
self, *, document_id: str, request_options: typing.Optional[RequestOptions] = None
|
1131
1292
|
) -> ConvertPdfToSheetOut:
|
1132
1293
|
"""
|
1133
|
-
Parameters
|
1134
|
-
|
1294
|
+
Parameters
|
1295
|
+
----------
|
1296
|
+
document_id : str
|
1297
|
+
|
1298
|
+
request_options : typing.Optional[RequestOptions]
|
1299
|
+
Request-specific configuration.
|
1300
|
+
|
1301
|
+
Returns
|
1302
|
+
-------
|
1303
|
+
ConvertPdfToSheetOut
|
1304
|
+
Successful Response
|
1135
1305
|
|
1136
|
-
|
1137
|
-
|
1306
|
+
Examples
|
1307
|
+
--------
|
1138
1308
|
from athena.client import AsyncAthena
|
1139
1309
|
|
1140
1310
|
client = AsyncAthena(
|
@@ -1147,8 +1317,10 @@ class AsyncToolsClient:
|
|
1147
1317
|
_response = await self._client_wrapper.httpx_client.request(
|
1148
1318
|
method="POST",
|
1149
1319
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/convert-pdf-to-sheet"),
|
1150
|
-
params=
|
1151
|
-
|
1320
|
+
params=encode_query(
|
1321
|
+
jsonable_encoder(
|
1322
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
1323
|
+
)
|
1152
1324
|
),
|
1153
1325
|
json=jsonable_encoder({"document_id": document_id})
|
1154
1326
|
if request_options is None or request_options.get("additional_body_parameters") is None
|
@@ -1190,13 +1362,22 @@ class AsyncToolsClient:
|
|
1190
1362
|
request_options: typing.Optional[RequestOptions] = None,
|
1191
1363
|
) -> SemanticQueryOut:
|
1192
1364
|
"""
|
1193
|
-
Parameters
|
1194
|
-
|
1365
|
+
Parameters
|
1366
|
+
----------
|
1367
|
+
query : QueryModel
|
1368
|
+
|
1369
|
+
table_name : typing.Optional[str]
|
1195
1370
|
|
1196
|
-
|
1371
|
+
request_options : typing.Optional[RequestOptions]
|
1372
|
+
Request-specific configuration.
|
1197
1373
|
|
1198
|
-
|
1199
|
-
|
1374
|
+
Returns
|
1375
|
+
-------
|
1376
|
+
SemanticQueryOut
|
1377
|
+
Successful Response
|
1378
|
+
|
1379
|
+
Examples
|
1380
|
+
--------
|
1200
1381
|
from athena import FilterModel, FilterOperator, QueryModel, TimeDimensionModel
|
1201
1382
|
from athena.client import AsyncAthena
|
1202
1383
|
|
@@ -1230,8 +1411,10 @@ class AsyncToolsClient:
|
|
1230
1411
|
_response = await self._client_wrapper.httpx_client.request(
|
1231
1412
|
method="POST",
|
1232
1413
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/strict-semantic-query"),
|
1233
|
-
params=
|
1234
|
-
|
1414
|
+
params=encode_query(
|
1415
|
+
jsonable_encoder(
|
1416
|
+
request_options.get("additional_query_parameters") if request_options is not None else None
|
1417
|
+
)
|
1235
1418
|
),
|
1236
1419
|
json=jsonable_encoder(_request)
|
1237
1420
|
if request_options is None or request_options.get("additional_body_parameters") is None
|