llama-cloud 0.1.38__py3-none-any.whl → 0.1.40__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.
Potentially problematic release.
This version of llama-cloud might be problematic. Click here for more details.
- llama_cloud/__init__.py +12 -0
- llama_cloud/resources/admin/client.py +5 -5
- llama_cloud/resources/alpha/client.py +2 -8
- llama_cloud/resources/beta/client.py +30 -126
- llama_cloud/resources/chat_apps/client.py +8 -32
- llama_cloud/resources/classifier/client.py +8 -32
- llama_cloud/resources/data_sinks/client.py +8 -32
- llama_cloud/resources/data_sources/client.py +8 -32
- llama_cloud/resources/embedding_model_configs/client.py +12 -48
- llama_cloud/resources/files/client.py +42 -176
- llama_cloud/resources/jobs/client.py +2 -8
- llama_cloud/resources/llama_extract/client.py +40 -138
- llama_cloud/resources/organizations/client.py +4 -18
- llama_cloud/resources/parsing/client.py +12 -16
- llama_cloud/resources/pipelines/client.py +45 -32
- llama_cloud/resources/projects/client.py +18 -78
- llama_cloud/resources/reports/client.py +30 -126
- llama_cloud/resources/retrievers/client.py +12 -48
- llama_cloud/types/__init__.py +12 -0
- llama_cloud/types/extract_job_create.py +2 -0
- llama_cloud/types/extract_job_create_priority.py +29 -0
- llama_cloud/types/file.py +1 -1
- llama_cloud/types/job_names.py +0 -4
- llama_cloud/types/llama_extract_feature_availability.py +34 -0
- llama_cloud/types/llama_parse_parameters.py +1 -0
- llama_cloud/types/parse_job_config.py +1 -0
- llama_cloud/types/pipeline.py +4 -0
- llama_cloud/types/pipeline_create.py +2 -0
- llama_cloud/types/pipeline_file.py +4 -4
- llama_cloud/types/schema_generation_availability.py +33 -0
- llama_cloud/types/schema_generation_availability_status.py +17 -0
- llama_cloud/types/sparse_model_config.py +42 -0
- llama_cloud/types/sparse_model_type.py +33 -0
- llama_cloud/types/webhook_configuration.py +1 -0
- llama_cloud-0.1.40.dist-info/METADATA +106 -0
- {llama_cloud-0.1.38.dist-info → llama_cloud-0.1.40.dist-info}/RECORD +38 -32
- {llama_cloud-0.1.38.dist-info → llama_cloud-0.1.40.dist-info}/WHEEL +1 -1
- llama_cloud-0.1.38.dist-info/METADATA +0 -32
- {llama_cloud-0.1.38.dist-info → llama_cloud-0.1.40.dist-info}/LICENSE +0 -0
|
@@ -53,7 +53,6 @@ class ReportsClient:
|
|
|
53
53
|
existing_retriever_id: typing.Optional[str] = OMIT,
|
|
54
54
|
files: typing.List[str],
|
|
55
55
|
template_file: typing.Optional[str] = OMIT,
|
|
56
|
-
project_id: typing.Optional[str] = None,
|
|
57
56
|
) -> ReportCreateResponse:
|
|
58
57
|
"""
|
|
59
58
|
Create a new report.
|
|
@@ -74,8 +73,6 @@ class ReportsClient:
|
|
|
74
73
|
- files: typing.List[str].
|
|
75
74
|
|
|
76
75
|
- template_file: typing.Optional[str].
|
|
77
|
-
|
|
78
|
-
- project_id: typing.Optional[str].
|
|
79
76
|
"""
|
|
80
77
|
_request: typing.Dict[str, typing.Any] = {"name": name, "template_text": template_text, "files": files}
|
|
81
78
|
if template_instructions is not OMIT:
|
|
@@ -89,7 +86,7 @@ class ReportsClient:
|
|
|
89
86
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/reports"),
|
|
90
87
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
91
88
|
json=jsonable_encoder(_request),
|
|
92
|
-
headers=
|
|
89
|
+
headers=self._client_wrapper.get_headers(),
|
|
93
90
|
timeout=60,
|
|
94
91
|
)
|
|
95
92
|
if 200 <= _response.status_code < 300:
|
|
@@ -110,7 +107,6 @@ class ReportsClient:
|
|
|
110
107
|
offset: typing.Optional[int] = None,
|
|
111
108
|
project_id: typing.Optional[str] = None,
|
|
112
109
|
organization_id: typing.Optional[str] = None,
|
|
113
|
-
project_id: typing.Optional[str] = None,
|
|
114
110
|
) -> PaginatedReportResponse:
|
|
115
111
|
"""
|
|
116
112
|
List all reports for a project.
|
|
@@ -125,8 +121,6 @@ class ReportsClient:
|
|
|
125
121
|
- project_id: typing.Optional[str].
|
|
126
122
|
|
|
127
123
|
- organization_id: typing.Optional[str].
|
|
128
|
-
|
|
129
|
-
- project_id: typing.Optional[str].
|
|
130
124
|
---
|
|
131
125
|
from llama_cloud import ReportState
|
|
132
126
|
from llama_cloud.client import LlamaCloud
|
|
@@ -150,7 +144,7 @@ class ReportsClient:
|
|
|
150
144
|
"organization_id": organization_id,
|
|
151
145
|
}
|
|
152
146
|
),
|
|
153
|
-
headers=
|
|
147
|
+
headers=self._client_wrapper.get_headers(),
|
|
154
148
|
timeout=60,
|
|
155
149
|
)
|
|
156
150
|
if 200 <= _response.status_code < 300:
|
|
@@ -170,7 +164,6 @@ class ReportsClient:
|
|
|
170
164
|
version: typing.Optional[int] = None,
|
|
171
165
|
project_id: typing.Optional[str] = None,
|
|
172
166
|
organization_id: typing.Optional[str] = None,
|
|
173
|
-
project_id: typing.Optional[str] = None,
|
|
174
167
|
) -> ReportResponse:
|
|
175
168
|
"""
|
|
176
169
|
Get a specific report.
|
|
@@ -183,8 +176,6 @@ class ReportsClient:
|
|
|
183
176
|
- project_id: typing.Optional[str].
|
|
184
177
|
|
|
185
178
|
- organization_id: typing.Optional[str].
|
|
186
|
-
|
|
187
|
-
- project_id: typing.Optional[str].
|
|
188
179
|
---
|
|
189
180
|
from llama_cloud.client import LlamaCloud
|
|
190
181
|
|
|
@@ -201,7 +192,7 @@ class ReportsClient:
|
|
|
201
192
|
params=remove_none_from_dict(
|
|
202
193
|
{"version": version, "project_id": project_id, "organization_id": organization_id}
|
|
203
194
|
),
|
|
204
|
-
headers=
|
|
195
|
+
headers=self._client_wrapper.get_headers(),
|
|
205
196
|
timeout=60,
|
|
206
197
|
)
|
|
207
198
|
if 200 <= _response.status_code < 300:
|
|
@@ -221,7 +212,6 @@ class ReportsClient:
|
|
|
221
212
|
project_id: typing.Optional[str] = None,
|
|
222
213
|
organization_id: typing.Optional[str] = None,
|
|
223
214
|
name: str,
|
|
224
|
-
project_id: typing.Optional[str] = None,
|
|
225
215
|
) -> ReportMetadata:
|
|
226
216
|
"""
|
|
227
217
|
Update metadata for a report.
|
|
@@ -234,8 +224,6 @@ class ReportsClient:
|
|
|
234
224
|
- organization_id: typing.Optional[str].
|
|
235
225
|
|
|
236
226
|
- name: str. The name of the report
|
|
237
|
-
|
|
238
|
-
- project_id: typing.Optional[str].
|
|
239
227
|
---
|
|
240
228
|
from llama_cloud.client import LlamaCloud
|
|
241
229
|
|
|
@@ -252,7 +240,7 @@ class ReportsClient:
|
|
|
252
240
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/reports/{report_id}"),
|
|
253
241
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
254
242
|
json=jsonable_encoder({"name": name}),
|
|
255
|
-
headers=
|
|
243
|
+
headers=self._client_wrapper.get_headers(),
|
|
256
244
|
timeout=60,
|
|
257
245
|
)
|
|
258
246
|
if 200 <= _response.status_code < 300:
|
|
@@ -272,7 +260,6 @@ class ReportsClient:
|
|
|
272
260
|
cascade_delete: typing.Optional[bool] = None,
|
|
273
261
|
project_id: typing.Optional[str] = None,
|
|
274
262
|
organization_id: typing.Optional[str] = None,
|
|
275
|
-
project_id: typing.Optional[str] = None,
|
|
276
263
|
) -> typing.Any:
|
|
277
264
|
"""
|
|
278
265
|
Delete a report.
|
|
@@ -285,8 +272,6 @@ class ReportsClient:
|
|
|
285
272
|
- project_id: typing.Optional[str].
|
|
286
273
|
|
|
287
274
|
- organization_id: typing.Optional[str].
|
|
288
|
-
|
|
289
|
-
- project_id: typing.Optional[str].
|
|
290
275
|
---
|
|
291
276
|
from llama_cloud.client import LlamaCloud
|
|
292
277
|
|
|
@@ -303,7 +288,7 @@ class ReportsClient:
|
|
|
303
288
|
params=remove_none_from_dict(
|
|
304
289
|
{"cascade_delete": cascade_delete, "project_id": project_id, "organization_id": organization_id}
|
|
305
290
|
),
|
|
306
|
-
headers=
|
|
291
|
+
headers=self._client_wrapper.get_headers(),
|
|
307
292
|
timeout=60,
|
|
308
293
|
)
|
|
309
294
|
if 200 <= _response.status_code < 300:
|
|
@@ -323,7 +308,6 @@ class ReportsClient:
|
|
|
323
308
|
project_id: typing.Optional[str] = None,
|
|
324
309
|
organization_id: typing.Optional[str] = None,
|
|
325
310
|
content: Report,
|
|
326
|
-
project_id: typing.Optional[str] = None,
|
|
327
311
|
) -> ReportResponse:
|
|
328
312
|
"""
|
|
329
313
|
Update a report's content.
|
|
@@ -336,8 +320,6 @@ class ReportsClient:
|
|
|
336
320
|
- organization_id: typing.Optional[str].
|
|
337
321
|
|
|
338
322
|
- content: Report. The content of the report version
|
|
339
|
-
|
|
340
|
-
- project_id: typing.Optional[str].
|
|
341
323
|
---
|
|
342
324
|
from llama_cloud import Report
|
|
343
325
|
from llama_cloud.client import LlamaCloud
|
|
@@ -357,7 +339,7 @@ class ReportsClient:
|
|
|
357
339
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/reports/{report_id}"),
|
|
358
340
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
359
341
|
json=jsonable_encoder({"content": content}),
|
|
360
|
-
headers=
|
|
342
|
+
headers=self._client_wrapper.get_headers(),
|
|
361
343
|
timeout=60,
|
|
362
344
|
)
|
|
363
345
|
if 200 <= _response.status_code < 300:
|
|
@@ -371,12 +353,7 @@ class ReportsClient:
|
|
|
371
353
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
372
354
|
|
|
373
355
|
def get_report_plan(
|
|
374
|
-
self,
|
|
375
|
-
report_id: str,
|
|
376
|
-
*,
|
|
377
|
-
project_id: typing.Optional[str] = None,
|
|
378
|
-
organization_id: typing.Optional[str] = None,
|
|
379
|
-
project_id: typing.Optional[str] = None,
|
|
356
|
+
self, report_id: str, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
|
|
380
357
|
) -> ReportPlan:
|
|
381
358
|
"""
|
|
382
359
|
Get the plan for a report.
|
|
@@ -387,8 +364,6 @@ class ReportsClient:
|
|
|
387
364
|
- project_id: typing.Optional[str].
|
|
388
365
|
|
|
389
366
|
- organization_id: typing.Optional[str].
|
|
390
|
-
|
|
391
|
-
- project_id: typing.Optional[str].
|
|
392
367
|
---
|
|
393
368
|
from llama_cloud.client import LlamaCloud
|
|
394
369
|
|
|
@@ -403,7 +378,7 @@ class ReportsClient:
|
|
|
403
378
|
"GET",
|
|
404
379
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/reports/{report_id}/plan"),
|
|
405
380
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
406
|
-
headers=
|
|
381
|
+
headers=self._client_wrapper.get_headers(),
|
|
407
382
|
timeout=60,
|
|
408
383
|
)
|
|
409
384
|
if 200 <= _response.status_code < 300:
|
|
@@ -424,7 +399,6 @@ class ReportsClient:
|
|
|
424
399
|
project_id: typing.Optional[str] = None,
|
|
425
400
|
organization_id: typing.Optional[str] = None,
|
|
426
401
|
request: typing.Optional[ReportPlan] = None,
|
|
427
|
-
project_id: typing.Optional[str] = None,
|
|
428
402
|
) -> ReportResponse:
|
|
429
403
|
"""
|
|
430
404
|
Update the plan of a report, including approval, rejection, and editing.
|
|
@@ -439,8 +413,6 @@ class ReportsClient:
|
|
|
439
413
|
- organization_id: typing.Optional[str].
|
|
440
414
|
|
|
441
415
|
- request: typing.Optional[ReportPlan].
|
|
442
|
-
|
|
443
|
-
- project_id: typing.Optional[str].
|
|
444
416
|
---
|
|
445
417
|
from llama_cloud import (
|
|
446
418
|
ReportPlan,
|
|
@@ -464,7 +436,7 @@ class ReportsClient:
|
|
|
464
436
|
{"action": action, "project_id": project_id, "organization_id": organization_id}
|
|
465
437
|
),
|
|
466
438
|
json=jsonable_encoder(request),
|
|
467
|
-
headers=
|
|
439
|
+
headers=self._client_wrapper.get_headers(),
|
|
468
440
|
timeout=60,
|
|
469
441
|
)
|
|
470
442
|
if 200 <= _response.status_code < 300:
|
|
@@ -484,7 +456,6 @@ class ReportsClient:
|
|
|
484
456
|
after: typing.Optional[dt.datetime] = None,
|
|
485
457
|
project_id: typing.Optional[str] = None,
|
|
486
458
|
organization_id: typing.Optional[str] = None,
|
|
487
|
-
project_id: typing.Optional[str] = None,
|
|
488
459
|
) -> typing.List[ReportEventItem]:
|
|
489
460
|
"""
|
|
490
461
|
Get all historical events for a report.
|
|
@@ -497,8 +468,6 @@ class ReportsClient:
|
|
|
497
468
|
- project_id: typing.Optional[str].
|
|
498
469
|
|
|
499
470
|
- organization_id: typing.Optional[str].
|
|
500
|
-
|
|
501
|
-
- project_id: typing.Optional[str].
|
|
502
471
|
---
|
|
503
472
|
from llama_cloud.client import LlamaCloud
|
|
504
473
|
|
|
@@ -519,7 +488,7 @@ class ReportsClient:
|
|
|
519
488
|
"organization_id": organization_id,
|
|
520
489
|
}
|
|
521
490
|
),
|
|
522
|
-
headers=
|
|
491
|
+
headers=self._client_wrapper.get_headers(),
|
|
523
492
|
timeout=60,
|
|
524
493
|
)
|
|
525
494
|
if 200 <= _response.status_code < 300:
|
|
@@ -533,12 +502,7 @@ class ReportsClient:
|
|
|
533
502
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
534
503
|
|
|
535
504
|
def get_report_metadata(
|
|
536
|
-
self,
|
|
537
|
-
report_id: str,
|
|
538
|
-
*,
|
|
539
|
-
project_id: typing.Optional[str] = None,
|
|
540
|
-
organization_id: typing.Optional[str] = None,
|
|
541
|
-
project_id: typing.Optional[str] = None,
|
|
505
|
+
self, report_id: str, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
|
|
542
506
|
) -> ReportMetadata:
|
|
543
507
|
"""
|
|
544
508
|
Get metadata for a report.
|
|
@@ -549,8 +513,6 @@ class ReportsClient:
|
|
|
549
513
|
- project_id: typing.Optional[str].
|
|
550
514
|
|
|
551
515
|
- organization_id: typing.Optional[str].
|
|
552
|
-
|
|
553
|
-
- project_id: typing.Optional[str].
|
|
554
516
|
---
|
|
555
517
|
from llama_cloud.client import LlamaCloud
|
|
556
518
|
|
|
@@ -565,7 +527,7 @@ class ReportsClient:
|
|
|
565
527
|
"GET",
|
|
566
528
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/reports/{report_id}/metadata"),
|
|
567
529
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
568
|
-
headers=
|
|
530
|
+
headers=self._client_wrapper.get_headers(),
|
|
569
531
|
timeout=60,
|
|
570
532
|
)
|
|
571
533
|
if 200 <= _response.status_code < 300:
|
|
@@ -586,7 +548,6 @@ class ReportsClient:
|
|
|
586
548
|
organization_id: typing.Optional[str] = None,
|
|
587
549
|
user_query: str,
|
|
588
550
|
chat_history: typing.List[LlamaIndexCoreBaseLlmsTypesChatMessage],
|
|
589
|
-
project_id: typing.Optional[str] = None,
|
|
590
551
|
) -> typing.List[EditSuggestion]:
|
|
591
552
|
"""
|
|
592
553
|
Suggest edits to a report based on user query and chat history.
|
|
@@ -601,8 +562,6 @@ class ReportsClient:
|
|
|
601
562
|
- user_query: str.
|
|
602
563
|
|
|
603
564
|
- chat_history: typing.List[LlamaIndexCoreBaseLlmsTypesChatMessage].
|
|
604
|
-
|
|
605
|
-
- project_id: typing.Optional[str].
|
|
606
565
|
---
|
|
607
566
|
from llama_cloud.client import LlamaCloud
|
|
608
567
|
|
|
@@ -622,7 +581,7 @@ class ReportsClient:
|
|
|
622
581
|
),
|
|
623
582
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
624
583
|
json=jsonable_encoder({"user_query": user_query, "chat_history": chat_history}),
|
|
625
|
-
headers=
|
|
584
|
+
headers=self._client_wrapper.get_headers(),
|
|
626
585
|
timeout=60,
|
|
627
586
|
)
|
|
628
587
|
if 200 <= _response.status_code < 300:
|
|
@@ -636,12 +595,7 @@ class ReportsClient:
|
|
|
636
595
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
637
596
|
|
|
638
597
|
def restart_report(
|
|
639
|
-
self,
|
|
640
|
-
report_id: str,
|
|
641
|
-
*,
|
|
642
|
-
project_id: typing.Optional[str] = None,
|
|
643
|
-
organization_id: typing.Optional[str] = None,
|
|
644
|
-
project_id: typing.Optional[str] = None,
|
|
598
|
+
self, report_id: str, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
|
|
645
599
|
) -> typing.Any:
|
|
646
600
|
"""
|
|
647
601
|
Restart a report from scratch.
|
|
@@ -652,8 +606,6 @@ class ReportsClient:
|
|
|
652
606
|
- project_id: typing.Optional[str].
|
|
653
607
|
|
|
654
608
|
- organization_id: typing.Optional[str].
|
|
655
|
-
|
|
656
|
-
- project_id: typing.Optional[str].
|
|
657
609
|
---
|
|
658
610
|
from llama_cloud.client import LlamaCloud
|
|
659
611
|
|
|
@@ -668,7 +620,7 @@ class ReportsClient:
|
|
|
668
620
|
"POST",
|
|
669
621
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/reports/{report_id}/restart"),
|
|
670
622
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
671
|
-
headers=
|
|
623
|
+
headers=self._client_wrapper.get_headers(),
|
|
672
624
|
timeout=60,
|
|
673
625
|
)
|
|
674
626
|
if 200 <= _response.status_code < 300:
|
|
@@ -697,7 +649,6 @@ class AsyncReportsClient:
|
|
|
697
649
|
existing_retriever_id: typing.Optional[str] = OMIT,
|
|
698
650
|
files: typing.List[str],
|
|
699
651
|
template_file: typing.Optional[str] = OMIT,
|
|
700
|
-
project_id: typing.Optional[str] = None,
|
|
701
652
|
) -> ReportCreateResponse:
|
|
702
653
|
"""
|
|
703
654
|
Create a new report.
|
|
@@ -718,8 +669,6 @@ class AsyncReportsClient:
|
|
|
718
669
|
- files: typing.List[str].
|
|
719
670
|
|
|
720
671
|
- template_file: typing.Optional[str].
|
|
721
|
-
|
|
722
|
-
- project_id: typing.Optional[str].
|
|
723
672
|
"""
|
|
724
673
|
_request: typing.Dict[str, typing.Any] = {"name": name, "template_text": template_text, "files": files}
|
|
725
674
|
if template_instructions is not OMIT:
|
|
@@ -733,7 +682,7 @@ class AsyncReportsClient:
|
|
|
733
682
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/reports"),
|
|
734
683
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
735
684
|
json=jsonable_encoder(_request),
|
|
736
|
-
headers=
|
|
685
|
+
headers=self._client_wrapper.get_headers(),
|
|
737
686
|
timeout=60,
|
|
738
687
|
)
|
|
739
688
|
if 200 <= _response.status_code < 300:
|
|
@@ -754,7 +703,6 @@ class AsyncReportsClient:
|
|
|
754
703
|
offset: typing.Optional[int] = None,
|
|
755
704
|
project_id: typing.Optional[str] = None,
|
|
756
705
|
organization_id: typing.Optional[str] = None,
|
|
757
|
-
project_id: typing.Optional[str] = None,
|
|
758
706
|
) -> PaginatedReportResponse:
|
|
759
707
|
"""
|
|
760
708
|
List all reports for a project.
|
|
@@ -769,8 +717,6 @@ class AsyncReportsClient:
|
|
|
769
717
|
- project_id: typing.Optional[str].
|
|
770
718
|
|
|
771
719
|
- organization_id: typing.Optional[str].
|
|
772
|
-
|
|
773
|
-
- project_id: typing.Optional[str].
|
|
774
720
|
---
|
|
775
721
|
from llama_cloud import ReportState
|
|
776
722
|
from llama_cloud.client import AsyncLlamaCloud
|
|
@@ -794,7 +740,7 @@ class AsyncReportsClient:
|
|
|
794
740
|
"organization_id": organization_id,
|
|
795
741
|
}
|
|
796
742
|
),
|
|
797
|
-
headers=
|
|
743
|
+
headers=self._client_wrapper.get_headers(),
|
|
798
744
|
timeout=60,
|
|
799
745
|
)
|
|
800
746
|
if 200 <= _response.status_code < 300:
|
|
@@ -814,7 +760,6 @@ class AsyncReportsClient:
|
|
|
814
760
|
version: typing.Optional[int] = None,
|
|
815
761
|
project_id: typing.Optional[str] = None,
|
|
816
762
|
organization_id: typing.Optional[str] = None,
|
|
817
|
-
project_id: typing.Optional[str] = None,
|
|
818
763
|
) -> ReportResponse:
|
|
819
764
|
"""
|
|
820
765
|
Get a specific report.
|
|
@@ -827,8 +772,6 @@ class AsyncReportsClient:
|
|
|
827
772
|
- project_id: typing.Optional[str].
|
|
828
773
|
|
|
829
774
|
- organization_id: typing.Optional[str].
|
|
830
|
-
|
|
831
|
-
- project_id: typing.Optional[str].
|
|
832
775
|
---
|
|
833
776
|
from llama_cloud.client import AsyncLlamaCloud
|
|
834
777
|
|
|
@@ -845,7 +788,7 @@ class AsyncReportsClient:
|
|
|
845
788
|
params=remove_none_from_dict(
|
|
846
789
|
{"version": version, "project_id": project_id, "organization_id": organization_id}
|
|
847
790
|
),
|
|
848
|
-
headers=
|
|
791
|
+
headers=self._client_wrapper.get_headers(),
|
|
849
792
|
timeout=60,
|
|
850
793
|
)
|
|
851
794
|
if 200 <= _response.status_code < 300:
|
|
@@ -865,7 +808,6 @@ class AsyncReportsClient:
|
|
|
865
808
|
project_id: typing.Optional[str] = None,
|
|
866
809
|
organization_id: typing.Optional[str] = None,
|
|
867
810
|
name: str,
|
|
868
|
-
project_id: typing.Optional[str] = None,
|
|
869
811
|
) -> ReportMetadata:
|
|
870
812
|
"""
|
|
871
813
|
Update metadata for a report.
|
|
@@ -878,8 +820,6 @@ class AsyncReportsClient:
|
|
|
878
820
|
- organization_id: typing.Optional[str].
|
|
879
821
|
|
|
880
822
|
- name: str. The name of the report
|
|
881
|
-
|
|
882
|
-
- project_id: typing.Optional[str].
|
|
883
823
|
---
|
|
884
824
|
from llama_cloud.client import AsyncLlamaCloud
|
|
885
825
|
|
|
@@ -896,7 +836,7 @@ class AsyncReportsClient:
|
|
|
896
836
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/reports/{report_id}"),
|
|
897
837
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
898
838
|
json=jsonable_encoder({"name": name}),
|
|
899
|
-
headers=
|
|
839
|
+
headers=self._client_wrapper.get_headers(),
|
|
900
840
|
timeout=60,
|
|
901
841
|
)
|
|
902
842
|
if 200 <= _response.status_code < 300:
|
|
@@ -916,7 +856,6 @@ class AsyncReportsClient:
|
|
|
916
856
|
cascade_delete: typing.Optional[bool] = None,
|
|
917
857
|
project_id: typing.Optional[str] = None,
|
|
918
858
|
organization_id: typing.Optional[str] = None,
|
|
919
|
-
project_id: typing.Optional[str] = None,
|
|
920
859
|
) -> typing.Any:
|
|
921
860
|
"""
|
|
922
861
|
Delete a report.
|
|
@@ -929,8 +868,6 @@ class AsyncReportsClient:
|
|
|
929
868
|
- project_id: typing.Optional[str].
|
|
930
869
|
|
|
931
870
|
- organization_id: typing.Optional[str].
|
|
932
|
-
|
|
933
|
-
- project_id: typing.Optional[str].
|
|
934
871
|
---
|
|
935
872
|
from llama_cloud.client import AsyncLlamaCloud
|
|
936
873
|
|
|
@@ -947,7 +884,7 @@ class AsyncReportsClient:
|
|
|
947
884
|
params=remove_none_from_dict(
|
|
948
885
|
{"cascade_delete": cascade_delete, "project_id": project_id, "organization_id": organization_id}
|
|
949
886
|
),
|
|
950
|
-
headers=
|
|
887
|
+
headers=self._client_wrapper.get_headers(),
|
|
951
888
|
timeout=60,
|
|
952
889
|
)
|
|
953
890
|
if 200 <= _response.status_code < 300:
|
|
@@ -967,7 +904,6 @@ class AsyncReportsClient:
|
|
|
967
904
|
project_id: typing.Optional[str] = None,
|
|
968
905
|
organization_id: typing.Optional[str] = None,
|
|
969
906
|
content: Report,
|
|
970
|
-
project_id: typing.Optional[str] = None,
|
|
971
907
|
) -> ReportResponse:
|
|
972
908
|
"""
|
|
973
909
|
Update a report's content.
|
|
@@ -980,8 +916,6 @@ class AsyncReportsClient:
|
|
|
980
916
|
- organization_id: typing.Optional[str].
|
|
981
917
|
|
|
982
918
|
- content: Report. The content of the report version
|
|
983
|
-
|
|
984
|
-
- project_id: typing.Optional[str].
|
|
985
919
|
---
|
|
986
920
|
from llama_cloud import Report
|
|
987
921
|
from llama_cloud.client import AsyncLlamaCloud
|
|
@@ -1001,7 +935,7 @@ class AsyncReportsClient:
|
|
|
1001
935
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/reports/{report_id}"),
|
|
1002
936
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
1003
937
|
json=jsonable_encoder({"content": content}),
|
|
1004
|
-
headers=
|
|
938
|
+
headers=self._client_wrapper.get_headers(),
|
|
1005
939
|
timeout=60,
|
|
1006
940
|
)
|
|
1007
941
|
if 200 <= _response.status_code < 300:
|
|
@@ -1015,12 +949,7 @@ class AsyncReportsClient:
|
|
|
1015
949
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1016
950
|
|
|
1017
951
|
async def get_report_plan(
|
|
1018
|
-
self,
|
|
1019
|
-
report_id: str,
|
|
1020
|
-
*,
|
|
1021
|
-
project_id: typing.Optional[str] = None,
|
|
1022
|
-
organization_id: typing.Optional[str] = None,
|
|
1023
|
-
project_id: typing.Optional[str] = None,
|
|
952
|
+
self, report_id: str, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
|
|
1024
953
|
) -> ReportPlan:
|
|
1025
954
|
"""
|
|
1026
955
|
Get the plan for a report.
|
|
@@ -1031,8 +960,6 @@ class AsyncReportsClient:
|
|
|
1031
960
|
- project_id: typing.Optional[str].
|
|
1032
961
|
|
|
1033
962
|
- organization_id: typing.Optional[str].
|
|
1034
|
-
|
|
1035
|
-
- project_id: typing.Optional[str].
|
|
1036
963
|
---
|
|
1037
964
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1038
965
|
|
|
@@ -1047,7 +974,7 @@ class AsyncReportsClient:
|
|
|
1047
974
|
"GET",
|
|
1048
975
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/reports/{report_id}/plan"),
|
|
1049
976
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
1050
|
-
headers=
|
|
977
|
+
headers=self._client_wrapper.get_headers(),
|
|
1051
978
|
timeout=60,
|
|
1052
979
|
)
|
|
1053
980
|
if 200 <= _response.status_code < 300:
|
|
@@ -1068,7 +995,6 @@ class AsyncReportsClient:
|
|
|
1068
995
|
project_id: typing.Optional[str] = None,
|
|
1069
996
|
organization_id: typing.Optional[str] = None,
|
|
1070
997
|
request: typing.Optional[ReportPlan] = None,
|
|
1071
|
-
project_id: typing.Optional[str] = None,
|
|
1072
998
|
) -> ReportResponse:
|
|
1073
999
|
"""
|
|
1074
1000
|
Update the plan of a report, including approval, rejection, and editing.
|
|
@@ -1083,8 +1009,6 @@ class AsyncReportsClient:
|
|
|
1083
1009
|
- organization_id: typing.Optional[str].
|
|
1084
1010
|
|
|
1085
1011
|
- request: typing.Optional[ReportPlan].
|
|
1086
|
-
|
|
1087
|
-
- project_id: typing.Optional[str].
|
|
1088
1012
|
---
|
|
1089
1013
|
from llama_cloud import (
|
|
1090
1014
|
ReportPlan,
|
|
@@ -1108,7 +1032,7 @@ class AsyncReportsClient:
|
|
|
1108
1032
|
{"action": action, "project_id": project_id, "organization_id": organization_id}
|
|
1109
1033
|
),
|
|
1110
1034
|
json=jsonable_encoder(request),
|
|
1111
|
-
headers=
|
|
1035
|
+
headers=self._client_wrapper.get_headers(),
|
|
1112
1036
|
timeout=60,
|
|
1113
1037
|
)
|
|
1114
1038
|
if 200 <= _response.status_code < 300:
|
|
@@ -1128,7 +1052,6 @@ class AsyncReportsClient:
|
|
|
1128
1052
|
after: typing.Optional[dt.datetime] = None,
|
|
1129
1053
|
project_id: typing.Optional[str] = None,
|
|
1130
1054
|
organization_id: typing.Optional[str] = None,
|
|
1131
|
-
project_id: typing.Optional[str] = None,
|
|
1132
1055
|
) -> typing.List[ReportEventItem]:
|
|
1133
1056
|
"""
|
|
1134
1057
|
Get all historical events for a report.
|
|
@@ -1141,8 +1064,6 @@ class AsyncReportsClient:
|
|
|
1141
1064
|
- project_id: typing.Optional[str].
|
|
1142
1065
|
|
|
1143
1066
|
- organization_id: typing.Optional[str].
|
|
1144
|
-
|
|
1145
|
-
- project_id: typing.Optional[str].
|
|
1146
1067
|
---
|
|
1147
1068
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1148
1069
|
|
|
@@ -1163,7 +1084,7 @@ class AsyncReportsClient:
|
|
|
1163
1084
|
"organization_id": organization_id,
|
|
1164
1085
|
}
|
|
1165
1086
|
),
|
|
1166
|
-
headers=
|
|
1087
|
+
headers=self._client_wrapper.get_headers(),
|
|
1167
1088
|
timeout=60,
|
|
1168
1089
|
)
|
|
1169
1090
|
if 200 <= _response.status_code < 300:
|
|
@@ -1177,12 +1098,7 @@ class AsyncReportsClient:
|
|
|
1177
1098
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1178
1099
|
|
|
1179
1100
|
async def get_report_metadata(
|
|
1180
|
-
self,
|
|
1181
|
-
report_id: str,
|
|
1182
|
-
*,
|
|
1183
|
-
project_id: typing.Optional[str] = None,
|
|
1184
|
-
organization_id: typing.Optional[str] = None,
|
|
1185
|
-
project_id: typing.Optional[str] = None,
|
|
1101
|
+
self, report_id: str, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
|
|
1186
1102
|
) -> ReportMetadata:
|
|
1187
1103
|
"""
|
|
1188
1104
|
Get metadata for a report.
|
|
@@ -1193,8 +1109,6 @@ class AsyncReportsClient:
|
|
|
1193
1109
|
- project_id: typing.Optional[str].
|
|
1194
1110
|
|
|
1195
1111
|
- organization_id: typing.Optional[str].
|
|
1196
|
-
|
|
1197
|
-
- project_id: typing.Optional[str].
|
|
1198
1112
|
---
|
|
1199
1113
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1200
1114
|
|
|
@@ -1209,7 +1123,7 @@ class AsyncReportsClient:
|
|
|
1209
1123
|
"GET",
|
|
1210
1124
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/reports/{report_id}/metadata"),
|
|
1211
1125
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
1212
|
-
headers=
|
|
1126
|
+
headers=self._client_wrapper.get_headers(),
|
|
1213
1127
|
timeout=60,
|
|
1214
1128
|
)
|
|
1215
1129
|
if 200 <= _response.status_code < 300:
|
|
@@ -1230,7 +1144,6 @@ class AsyncReportsClient:
|
|
|
1230
1144
|
organization_id: typing.Optional[str] = None,
|
|
1231
1145
|
user_query: str,
|
|
1232
1146
|
chat_history: typing.List[LlamaIndexCoreBaseLlmsTypesChatMessage],
|
|
1233
|
-
project_id: typing.Optional[str] = None,
|
|
1234
1147
|
) -> typing.List[EditSuggestion]:
|
|
1235
1148
|
"""
|
|
1236
1149
|
Suggest edits to a report based on user query and chat history.
|
|
@@ -1245,8 +1158,6 @@ class AsyncReportsClient:
|
|
|
1245
1158
|
- user_query: str.
|
|
1246
1159
|
|
|
1247
1160
|
- chat_history: typing.List[LlamaIndexCoreBaseLlmsTypesChatMessage].
|
|
1248
|
-
|
|
1249
|
-
- project_id: typing.Optional[str].
|
|
1250
1161
|
---
|
|
1251
1162
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1252
1163
|
|
|
@@ -1266,7 +1177,7 @@ class AsyncReportsClient:
|
|
|
1266
1177
|
),
|
|
1267
1178
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
1268
1179
|
json=jsonable_encoder({"user_query": user_query, "chat_history": chat_history}),
|
|
1269
|
-
headers=
|
|
1180
|
+
headers=self._client_wrapper.get_headers(),
|
|
1270
1181
|
timeout=60,
|
|
1271
1182
|
)
|
|
1272
1183
|
if 200 <= _response.status_code < 300:
|
|
@@ -1280,12 +1191,7 @@ class AsyncReportsClient:
|
|
|
1280
1191
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1281
1192
|
|
|
1282
1193
|
async def restart_report(
|
|
1283
|
-
self,
|
|
1284
|
-
report_id: str,
|
|
1285
|
-
*,
|
|
1286
|
-
project_id: typing.Optional[str] = None,
|
|
1287
|
-
organization_id: typing.Optional[str] = None,
|
|
1288
|
-
project_id: typing.Optional[str] = None,
|
|
1194
|
+
self, report_id: str, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
|
|
1289
1195
|
) -> typing.Any:
|
|
1290
1196
|
"""
|
|
1291
1197
|
Restart a report from scratch.
|
|
@@ -1296,8 +1202,6 @@ class AsyncReportsClient:
|
|
|
1296
1202
|
- project_id: typing.Optional[str].
|
|
1297
1203
|
|
|
1298
1204
|
- organization_id: typing.Optional[str].
|
|
1299
|
-
|
|
1300
|
-
- project_id: typing.Optional[str].
|
|
1301
1205
|
---
|
|
1302
1206
|
from llama_cloud.client import AsyncLlamaCloud
|
|
1303
1207
|
|
|
@@ -1312,7 +1216,7 @@ class AsyncReportsClient:
|
|
|
1312
1216
|
"POST",
|
|
1313
1217
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/reports/{report_id}/restart"),
|
|
1314
1218
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
1315
|
-
headers=
|
|
1219
|
+
headers=self._client_wrapper.get_headers(),
|
|
1316
1220
|
timeout=60,
|
|
1317
1221
|
)
|
|
1318
1222
|
if 200 <= _response.status_code < 300:
|