llama-cloud 0.1.38__py3-none-any.whl → 0.1.39__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/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 +32 -138
- llama_cloud/resources/organizations/client.py +4 -18
- llama_cloud/resources/parsing/client.py +4 -16
- llama_cloud/resources/pipelines/client.py +8 -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/file.py +1 -1
- llama_cloud/types/pipeline_file.py +4 -4
- {llama_cloud-0.1.38.dist-info → llama_cloud-0.1.39.dist-info}/METADATA +1 -1
- {llama_cloud-0.1.38.dist-info → llama_cloud-0.1.39.dist-info}/RECORD +22 -22
- {llama_cloud-0.1.38.dist-info → llama_cloud-0.1.39.dist-info}/LICENSE +0 -0
- {llama_cloud-0.1.38.dist-info → llama_cloud-0.1.39.dist-info}/WHEEL +0 -0
|
@@ -121,7 +121,6 @@ class ParsingClient:
|
|
|
121
121
|
webhook_configurations: str,
|
|
122
122
|
job_timeout_in_seconds: float,
|
|
123
123
|
job_timeout_extra_time_per_page_in_seconds: float,
|
|
124
|
-
project_id: typing.Optional[str] = None,
|
|
125
124
|
) -> ParsingJob:
|
|
126
125
|
"""
|
|
127
126
|
Parameters:
|
|
@@ -158,8 +157,6 @@ class ParsingClient:
|
|
|
158
157
|
- job_timeout_in_seconds: float.
|
|
159
158
|
|
|
160
159
|
- job_timeout_extra_time_per_page_in_seconds: float.
|
|
161
|
-
|
|
162
|
-
- project_id: typing.Optional[str].
|
|
163
160
|
"""
|
|
164
161
|
_request: typing.Dict[str, typing.Any] = {
|
|
165
162
|
"do_not_cache": do_not_cache,
|
|
@@ -185,7 +182,7 @@ class ParsingClient:
|
|
|
185
182
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/parsing/screenshot"),
|
|
186
183
|
params=remove_none_from_dict({"organization_id": organization_id, "project_id": project_id}),
|
|
187
184
|
json=jsonable_encoder(_request),
|
|
188
|
-
headers=
|
|
185
|
+
headers=self._client_wrapper.get_headers(),
|
|
189
186
|
timeout=60,
|
|
190
187
|
)
|
|
191
188
|
if 200 <= _response.status_code < 300:
|
|
@@ -299,7 +296,6 @@ class ParsingClient:
|
|
|
299
296
|
page_header_suffix: str,
|
|
300
297
|
page_footer_prefix: str,
|
|
301
298
|
page_footer_suffix: str,
|
|
302
|
-
project_id: typing.Optional[str] = None,
|
|
303
299
|
) -> ParsingJob:
|
|
304
300
|
"""
|
|
305
301
|
Parameters:
|
|
@@ -498,8 +494,6 @@ class ParsingClient:
|
|
|
498
494
|
- page_footer_prefix: str.
|
|
499
495
|
|
|
500
496
|
- page_footer_suffix: str.
|
|
501
|
-
|
|
502
|
-
- project_id: typing.Optional[str].
|
|
503
497
|
"""
|
|
504
498
|
_request: typing.Dict[str, typing.Any] = {
|
|
505
499
|
"adaptive_long_table": adaptive_long_table,
|
|
@@ -608,7 +602,7 @@ class ParsingClient:
|
|
|
608
602
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/parsing/upload"),
|
|
609
603
|
params=remove_none_from_dict({"organization_id": organization_id, "project_id": project_id}),
|
|
610
604
|
json=jsonable_encoder(_request),
|
|
611
|
-
headers=
|
|
605
|
+
headers=self._client_wrapper.get_headers(),
|
|
612
606
|
timeout=60,
|
|
613
607
|
)
|
|
614
608
|
if 200 <= _response.status_code < 300:
|
|
@@ -1299,7 +1293,6 @@ class AsyncParsingClient:
|
|
|
1299
1293
|
webhook_configurations: str,
|
|
1300
1294
|
job_timeout_in_seconds: float,
|
|
1301
1295
|
job_timeout_extra_time_per_page_in_seconds: float,
|
|
1302
|
-
project_id: typing.Optional[str] = None,
|
|
1303
1296
|
) -> ParsingJob:
|
|
1304
1297
|
"""
|
|
1305
1298
|
Parameters:
|
|
@@ -1336,8 +1329,6 @@ class AsyncParsingClient:
|
|
|
1336
1329
|
- job_timeout_in_seconds: float.
|
|
1337
1330
|
|
|
1338
1331
|
- job_timeout_extra_time_per_page_in_seconds: float.
|
|
1339
|
-
|
|
1340
|
-
- project_id: typing.Optional[str].
|
|
1341
1332
|
"""
|
|
1342
1333
|
_request: typing.Dict[str, typing.Any] = {
|
|
1343
1334
|
"do_not_cache": do_not_cache,
|
|
@@ -1363,7 +1354,7 @@ class AsyncParsingClient:
|
|
|
1363
1354
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/parsing/screenshot"),
|
|
1364
1355
|
params=remove_none_from_dict({"organization_id": organization_id, "project_id": project_id}),
|
|
1365
1356
|
json=jsonable_encoder(_request),
|
|
1366
|
-
headers=
|
|
1357
|
+
headers=self._client_wrapper.get_headers(),
|
|
1367
1358
|
timeout=60,
|
|
1368
1359
|
)
|
|
1369
1360
|
if 200 <= _response.status_code < 300:
|
|
@@ -1477,7 +1468,6 @@ class AsyncParsingClient:
|
|
|
1477
1468
|
page_header_suffix: str,
|
|
1478
1469
|
page_footer_prefix: str,
|
|
1479
1470
|
page_footer_suffix: str,
|
|
1480
|
-
project_id: typing.Optional[str] = None,
|
|
1481
1471
|
) -> ParsingJob:
|
|
1482
1472
|
"""
|
|
1483
1473
|
Parameters:
|
|
@@ -1676,8 +1666,6 @@ class AsyncParsingClient:
|
|
|
1676
1666
|
- page_footer_prefix: str.
|
|
1677
1667
|
|
|
1678
1668
|
- page_footer_suffix: str.
|
|
1679
|
-
|
|
1680
|
-
- project_id: typing.Optional[str].
|
|
1681
1669
|
"""
|
|
1682
1670
|
_request: typing.Dict[str, typing.Any] = {
|
|
1683
1671
|
"adaptive_long_table": adaptive_long_table,
|
|
@@ -1786,7 +1774,7 @@ class AsyncParsingClient:
|
|
|
1786
1774
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/parsing/upload"),
|
|
1787
1775
|
params=remove_none_from_dict({"organization_id": organization_id, "project_id": project_id}),
|
|
1788
1776
|
json=jsonable_encoder(_request),
|
|
1789
|
-
headers=
|
|
1777
|
+
headers=self._client_wrapper.get_headers(),
|
|
1790
1778
|
timeout=60,
|
|
1791
1779
|
)
|
|
1792
1780
|
if 200 <= _response.status_code < 300:
|
|
@@ -67,7 +67,6 @@ class PipelinesClient:
|
|
|
67
67
|
pipeline_name: typing.Optional[str] = None,
|
|
68
68
|
pipeline_type: typing.Optional[PipelineType] = None,
|
|
69
69
|
organization_id: typing.Optional[str] = None,
|
|
70
|
-
project_id: typing.Optional[str] = None,
|
|
71
70
|
) -> typing.List[Pipeline]:
|
|
72
71
|
"""
|
|
73
72
|
Search for pipelines by various parameters.
|
|
@@ -82,8 +81,6 @@ class PipelinesClient:
|
|
|
82
81
|
- pipeline_type: typing.Optional[PipelineType].
|
|
83
82
|
|
|
84
83
|
- organization_id: typing.Optional[str].
|
|
85
|
-
|
|
86
|
-
- project_id: typing.Optional[str].
|
|
87
84
|
---
|
|
88
85
|
from llama_cloud import PipelineType
|
|
89
86
|
from llama_cloud.client import LlamaCloud
|
|
@@ -107,7 +104,7 @@ class PipelinesClient:
|
|
|
107
104
|
"organization_id": organization_id,
|
|
108
105
|
}
|
|
109
106
|
),
|
|
110
|
-
headers=
|
|
107
|
+
headers=self._client_wrapper.get_headers(),
|
|
111
108
|
timeout=60,
|
|
112
109
|
)
|
|
113
110
|
if 200 <= _response.status_code < 300:
|
|
@@ -126,7 +123,6 @@ class PipelinesClient:
|
|
|
126
123
|
project_id: typing.Optional[str] = None,
|
|
127
124
|
organization_id: typing.Optional[str] = None,
|
|
128
125
|
request: PipelineCreate,
|
|
129
|
-
project_id: typing.Optional[str] = None,
|
|
130
126
|
) -> Pipeline:
|
|
131
127
|
"""
|
|
132
128
|
Create a new pipeline for a project.
|
|
@@ -137,15 +133,13 @@ class PipelinesClient:
|
|
|
137
133
|
- organization_id: typing.Optional[str].
|
|
138
134
|
|
|
139
135
|
- request: PipelineCreate.
|
|
140
|
-
|
|
141
|
-
- project_id: typing.Optional[str].
|
|
142
136
|
"""
|
|
143
137
|
_response = self._client_wrapper.httpx_client.request(
|
|
144
138
|
"POST",
|
|
145
139
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/pipelines"),
|
|
146
140
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
147
141
|
json=jsonable_encoder(request),
|
|
148
|
-
headers=
|
|
142
|
+
headers=self._client_wrapper.get_headers(),
|
|
149
143
|
timeout=60,
|
|
150
144
|
)
|
|
151
145
|
if 200 <= _response.status_code < 300:
|
|
@@ -164,7 +158,6 @@ class PipelinesClient:
|
|
|
164
158
|
project_id: typing.Optional[str] = None,
|
|
165
159
|
organization_id: typing.Optional[str] = None,
|
|
166
160
|
request: PipelineCreate,
|
|
167
|
-
project_id: typing.Optional[str] = None,
|
|
168
161
|
) -> Pipeline:
|
|
169
162
|
"""
|
|
170
163
|
Upsert a pipeline for a project.
|
|
@@ -176,15 +169,13 @@ class PipelinesClient:
|
|
|
176
169
|
- organization_id: typing.Optional[str].
|
|
177
170
|
|
|
178
171
|
- request: PipelineCreate.
|
|
179
|
-
|
|
180
|
-
- project_id: typing.Optional[str].
|
|
181
172
|
"""
|
|
182
173
|
_response = self._client_wrapper.httpx_client.request(
|
|
183
174
|
"PUT",
|
|
184
175
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/pipelines"),
|
|
185
176
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
186
177
|
json=jsonable_encoder(request),
|
|
187
|
-
headers=
|
|
178
|
+
headers=self._client_wrapper.get_headers(),
|
|
188
179
|
timeout=60,
|
|
189
180
|
)
|
|
190
181
|
if 200 <= _response.status_code < 300:
|
|
@@ -1095,7 +1086,6 @@ class PipelinesClient:
|
|
|
1095
1086
|
retrieve_page_figure_nodes: typing.Optional[bool] = OMIT,
|
|
1096
1087
|
query: str,
|
|
1097
1088
|
class_name: typing.Optional[str] = OMIT,
|
|
1098
|
-
project_id: typing.Optional[str] = None,
|
|
1099
1089
|
) -> RetrieveResults:
|
|
1100
1090
|
"""
|
|
1101
1091
|
Get retrieval results for a managed pipeline and a query
|
|
@@ -1136,8 +1126,6 @@ class PipelinesClient:
|
|
|
1136
1126
|
- query: str. The query to retrieve against.
|
|
1137
1127
|
|
|
1138
1128
|
- class_name: typing.Optional[str].
|
|
1139
|
-
|
|
1140
|
-
- project_id: typing.Optional[str].
|
|
1141
1129
|
---
|
|
1142
1130
|
from llama_cloud import FilterCondition, MetadataFilters, RetrievalMode
|
|
1143
1131
|
from llama_cloud.client import LlamaCloud
|
|
@@ -1189,7 +1177,7 @@ class PipelinesClient:
|
|
|
1189
1177
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/pipelines/{pipeline_id}/retrieve"),
|
|
1190
1178
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
1191
1179
|
json=jsonable_encoder(_request),
|
|
1192
|
-
headers=
|
|
1180
|
+
headers=self._client_wrapper.get_headers(),
|
|
1193
1181
|
timeout=60,
|
|
1194
1182
|
)
|
|
1195
1183
|
if 200 <= _response.status_code < 300:
|
|
@@ -1750,7 +1738,6 @@ class AsyncPipelinesClient:
|
|
|
1750
1738
|
pipeline_name: typing.Optional[str] = None,
|
|
1751
1739
|
pipeline_type: typing.Optional[PipelineType] = None,
|
|
1752
1740
|
organization_id: typing.Optional[str] = None,
|
|
1753
|
-
project_id: typing.Optional[str] = None,
|
|
1754
1741
|
) -> typing.List[Pipeline]:
|
|
1755
1742
|
"""
|
|
1756
1743
|
Search for pipelines by various parameters.
|
|
@@ -1765,8 +1752,6 @@ class AsyncPipelinesClient:
|
|
|
1765
1752
|
- pipeline_type: typing.Optional[PipelineType].
|
|
1766
1753
|
|
|
1767
1754
|
- organization_id: typing.Optional[str].
|
|
1768
|
-
|
|
1769
|
-
- project_id: typing.Optional[str].
|
|
1770
1755
|
---
|
|
1771
1756
|
from llama_cloud import PipelineType
|
|
1772
1757
|
from llama_cloud.client import AsyncLlamaCloud
|
|
@@ -1790,7 +1775,7 @@ class AsyncPipelinesClient:
|
|
|
1790
1775
|
"organization_id": organization_id,
|
|
1791
1776
|
}
|
|
1792
1777
|
),
|
|
1793
|
-
headers=
|
|
1778
|
+
headers=self._client_wrapper.get_headers(),
|
|
1794
1779
|
timeout=60,
|
|
1795
1780
|
)
|
|
1796
1781
|
if 200 <= _response.status_code < 300:
|
|
@@ -1809,7 +1794,6 @@ class AsyncPipelinesClient:
|
|
|
1809
1794
|
project_id: typing.Optional[str] = None,
|
|
1810
1795
|
organization_id: typing.Optional[str] = None,
|
|
1811
1796
|
request: PipelineCreate,
|
|
1812
|
-
project_id: typing.Optional[str] = None,
|
|
1813
1797
|
) -> Pipeline:
|
|
1814
1798
|
"""
|
|
1815
1799
|
Create a new pipeline for a project.
|
|
@@ -1820,15 +1804,13 @@ class AsyncPipelinesClient:
|
|
|
1820
1804
|
- organization_id: typing.Optional[str].
|
|
1821
1805
|
|
|
1822
1806
|
- request: PipelineCreate.
|
|
1823
|
-
|
|
1824
|
-
- project_id: typing.Optional[str].
|
|
1825
1807
|
"""
|
|
1826
1808
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1827
1809
|
"POST",
|
|
1828
1810
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/pipelines"),
|
|
1829
1811
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
1830
1812
|
json=jsonable_encoder(request),
|
|
1831
|
-
headers=
|
|
1813
|
+
headers=self._client_wrapper.get_headers(),
|
|
1832
1814
|
timeout=60,
|
|
1833
1815
|
)
|
|
1834
1816
|
if 200 <= _response.status_code < 300:
|
|
@@ -1847,7 +1829,6 @@ class AsyncPipelinesClient:
|
|
|
1847
1829
|
project_id: typing.Optional[str] = None,
|
|
1848
1830
|
organization_id: typing.Optional[str] = None,
|
|
1849
1831
|
request: PipelineCreate,
|
|
1850
|
-
project_id: typing.Optional[str] = None,
|
|
1851
1832
|
) -> Pipeline:
|
|
1852
1833
|
"""
|
|
1853
1834
|
Upsert a pipeline for a project.
|
|
@@ -1859,15 +1840,13 @@ class AsyncPipelinesClient:
|
|
|
1859
1840
|
- organization_id: typing.Optional[str].
|
|
1860
1841
|
|
|
1861
1842
|
- request: PipelineCreate.
|
|
1862
|
-
|
|
1863
|
-
- project_id: typing.Optional[str].
|
|
1864
1843
|
"""
|
|
1865
1844
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1866
1845
|
"PUT",
|
|
1867
1846
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/pipelines"),
|
|
1868
1847
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
1869
1848
|
json=jsonable_encoder(request),
|
|
1870
|
-
headers=
|
|
1849
|
+
headers=self._client_wrapper.get_headers(),
|
|
1871
1850
|
timeout=60,
|
|
1872
1851
|
)
|
|
1873
1852
|
if 200 <= _response.status_code < 300:
|
|
@@ -2780,7 +2759,6 @@ class AsyncPipelinesClient:
|
|
|
2780
2759
|
retrieve_page_figure_nodes: typing.Optional[bool] = OMIT,
|
|
2781
2760
|
query: str,
|
|
2782
2761
|
class_name: typing.Optional[str] = OMIT,
|
|
2783
|
-
project_id: typing.Optional[str] = None,
|
|
2784
2762
|
) -> RetrieveResults:
|
|
2785
2763
|
"""
|
|
2786
2764
|
Get retrieval results for a managed pipeline and a query
|
|
@@ -2821,8 +2799,6 @@ class AsyncPipelinesClient:
|
|
|
2821
2799
|
- query: str. The query to retrieve against.
|
|
2822
2800
|
|
|
2823
2801
|
- class_name: typing.Optional[str].
|
|
2824
|
-
|
|
2825
|
-
- project_id: typing.Optional[str].
|
|
2826
2802
|
---
|
|
2827
2803
|
from llama_cloud import FilterCondition, MetadataFilters, RetrievalMode
|
|
2828
2804
|
from llama_cloud.client import AsyncLlamaCloud
|
|
@@ -2874,7 +2850,7 @@ class AsyncPipelinesClient:
|
|
|
2874
2850
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/pipelines/{pipeline_id}/retrieve"),
|
|
2875
2851
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
2876
2852
|
json=jsonable_encoder(_request),
|
|
2877
|
-
headers=
|
|
2853
|
+
headers=self._client_wrapper.get_headers(),
|
|
2878
2854
|
timeout=60,
|
|
2879
2855
|
)
|
|
2880
2856
|
if 200 <= _response.status_code < 300:
|
|
@@ -144,13 +144,7 @@ class ProjectsClient:
|
|
|
144
144
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
145
145
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
146
146
|
|
|
147
|
-
def get_project(
|
|
148
|
-
self,
|
|
149
|
-
project_id: typing.Optional[str],
|
|
150
|
-
*,
|
|
151
|
-
organization_id: typing.Optional[str] = None,
|
|
152
|
-
project_id: typing.Optional[str] = None,
|
|
153
|
-
) -> Project:
|
|
147
|
+
def get_project(self, project_id: typing.Optional[str], *, organization_id: typing.Optional[str] = None) -> Project:
|
|
154
148
|
"""
|
|
155
149
|
Get a project by ID.
|
|
156
150
|
|
|
@@ -158,8 +152,6 @@ class ProjectsClient:
|
|
|
158
152
|
- project_id: typing.Optional[str].
|
|
159
153
|
|
|
160
154
|
- organization_id: typing.Optional[str].
|
|
161
|
-
|
|
162
|
-
- project_id: typing.Optional[str].
|
|
163
155
|
---
|
|
164
156
|
from llama_cloud.client import LlamaCloud
|
|
165
157
|
|
|
@@ -172,7 +164,7 @@ class ProjectsClient:
|
|
|
172
164
|
"GET",
|
|
173
165
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/projects/{project_id}"),
|
|
174
166
|
params=remove_none_from_dict({"organization_id": organization_id}),
|
|
175
|
-
headers=
|
|
167
|
+
headers=self._client_wrapper.get_headers(),
|
|
176
168
|
timeout=60,
|
|
177
169
|
)
|
|
178
170
|
if 200 <= _response.status_code < 300:
|
|
@@ -186,12 +178,7 @@ class ProjectsClient:
|
|
|
186
178
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
187
179
|
|
|
188
180
|
def update_existing_project(
|
|
189
|
-
self,
|
|
190
|
-
project_id: typing.Optional[str],
|
|
191
|
-
*,
|
|
192
|
-
organization_id: typing.Optional[str] = None,
|
|
193
|
-
name: str,
|
|
194
|
-
project_id: typing.Optional[str] = None,
|
|
181
|
+
self, project_id: typing.Optional[str], *, organization_id: typing.Optional[str] = None, name: str
|
|
195
182
|
) -> Project:
|
|
196
183
|
"""
|
|
197
184
|
Update an existing project.
|
|
@@ -202,8 +189,6 @@ class ProjectsClient:
|
|
|
202
189
|
- organization_id: typing.Optional[str].
|
|
203
190
|
|
|
204
191
|
- name: str.
|
|
205
|
-
|
|
206
|
-
- project_id: typing.Optional[str].
|
|
207
192
|
---
|
|
208
193
|
from llama_cloud.client import LlamaCloud
|
|
209
194
|
|
|
@@ -219,7 +204,7 @@ class ProjectsClient:
|
|
|
219
204
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/projects/{project_id}"),
|
|
220
205
|
params=remove_none_from_dict({"organization_id": organization_id}),
|
|
221
206
|
json=jsonable_encoder({"name": name}),
|
|
222
|
-
headers=
|
|
207
|
+
headers=self._client_wrapper.get_headers(),
|
|
223
208
|
timeout=60,
|
|
224
209
|
)
|
|
225
210
|
if 200 <= _response.status_code < 300:
|
|
@@ -232,13 +217,7 @@ class ProjectsClient:
|
|
|
232
217
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
233
218
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
234
219
|
|
|
235
|
-
def delete_project(
|
|
236
|
-
self,
|
|
237
|
-
project_id: typing.Optional[str],
|
|
238
|
-
*,
|
|
239
|
-
organization_id: typing.Optional[str] = None,
|
|
240
|
-
project_id: typing.Optional[str] = None,
|
|
241
|
-
) -> None:
|
|
220
|
+
def delete_project(self, project_id: typing.Optional[str], *, organization_id: typing.Optional[str] = None) -> None:
|
|
242
221
|
"""
|
|
243
222
|
Delete a project by ID.
|
|
244
223
|
|
|
@@ -246,8 +225,6 @@ class ProjectsClient:
|
|
|
246
225
|
- project_id: typing.Optional[str].
|
|
247
226
|
|
|
248
227
|
- organization_id: typing.Optional[str].
|
|
249
|
-
|
|
250
|
-
- project_id: typing.Optional[str].
|
|
251
228
|
---
|
|
252
229
|
from llama_cloud.client import LlamaCloud
|
|
253
230
|
|
|
@@ -260,7 +237,7 @@ class ProjectsClient:
|
|
|
260
237
|
"DELETE",
|
|
261
238
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/projects/{project_id}"),
|
|
262
239
|
params=remove_none_from_dict({"organization_id": organization_id}),
|
|
263
|
-
headers=
|
|
240
|
+
headers=self._client_wrapper.get_headers(),
|
|
264
241
|
timeout=60,
|
|
265
242
|
)
|
|
266
243
|
if 200 <= _response.status_code < 300:
|
|
@@ -274,11 +251,7 @@ class ProjectsClient:
|
|
|
274
251
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
275
252
|
|
|
276
253
|
def get_current_project(
|
|
277
|
-
self,
|
|
278
|
-
*,
|
|
279
|
-
project_id: typing.Optional[str] = None,
|
|
280
|
-
organization_id: typing.Optional[str] = None,
|
|
281
|
-
project_id: typing.Optional[str] = None,
|
|
254
|
+
self, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
|
|
282
255
|
) -> Project:
|
|
283
256
|
"""
|
|
284
257
|
Get the current project.
|
|
@@ -287,8 +260,6 @@ class ProjectsClient:
|
|
|
287
260
|
- project_id: typing.Optional[str].
|
|
288
261
|
|
|
289
262
|
- organization_id: typing.Optional[str].
|
|
290
|
-
|
|
291
|
-
- project_id: typing.Optional[str].
|
|
292
263
|
---
|
|
293
264
|
from llama_cloud.client import LlamaCloud
|
|
294
265
|
|
|
@@ -301,7 +272,7 @@ class ProjectsClient:
|
|
|
301
272
|
"GET",
|
|
302
273
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/projects/current"),
|
|
303
274
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
304
|
-
headers=
|
|
275
|
+
headers=self._client_wrapper.get_headers(),
|
|
305
276
|
timeout=60,
|
|
306
277
|
)
|
|
307
278
|
if 200 <= _response.status_code < 300:
|
|
@@ -320,7 +291,6 @@ class ProjectsClient:
|
|
|
320
291
|
*,
|
|
321
292
|
get_current_invoice_total: typing.Optional[bool] = None,
|
|
322
293
|
organization_id: typing.Optional[str] = None,
|
|
323
|
-
project_id: typing.Optional[str] = None,
|
|
324
294
|
) -> UsageAndPlan:
|
|
325
295
|
"""
|
|
326
296
|
Get usage for a project
|
|
@@ -331,8 +301,6 @@ class ProjectsClient:
|
|
|
331
301
|
- get_current_invoice_total: typing.Optional[bool].
|
|
332
302
|
|
|
333
303
|
- organization_id: typing.Optional[str].
|
|
334
|
-
|
|
335
|
-
- project_id: typing.Optional[str].
|
|
336
304
|
---
|
|
337
305
|
from llama_cloud.client import LlamaCloud
|
|
338
306
|
|
|
@@ -347,7 +315,7 @@ class ProjectsClient:
|
|
|
347
315
|
params=remove_none_from_dict(
|
|
348
316
|
{"get_current_invoice_total": get_current_invoice_total, "organization_id": organization_id}
|
|
349
317
|
),
|
|
350
|
-
headers=
|
|
318
|
+
headers=self._client_wrapper.get_headers(),
|
|
351
319
|
timeout=60,
|
|
352
320
|
)
|
|
353
321
|
if 200 <= _response.status_code < 300:
|
|
@@ -480,11 +448,7 @@ class AsyncProjectsClient:
|
|
|
480
448
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
481
449
|
|
|
482
450
|
async def get_project(
|
|
483
|
-
self,
|
|
484
|
-
project_id: typing.Optional[str],
|
|
485
|
-
*,
|
|
486
|
-
organization_id: typing.Optional[str] = None,
|
|
487
|
-
project_id: typing.Optional[str] = None,
|
|
451
|
+
self, project_id: typing.Optional[str], *, organization_id: typing.Optional[str] = None
|
|
488
452
|
) -> Project:
|
|
489
453
|
"""
|
|
490
454
|
Get a project by ID.
|
|
@@ -493,8 +457,6 @@ class AsyncProjectsClient:
|
|
|
493
457
|
- project_id: typing.Optional[str].
|
|
494
458
|
|
|
495
459
|
- organization_id: typing.Optional[str].
|
|
496
|
-
|
|
497
|
-
- project_id: typing.Optional[str].
|
|
498
460
|
---
|
|
499
461
|
from llama_cloud.client import AsyncLlamaCloud
|
|
500
462
|
|
|
@@ -507,7 +469,7 @@ class AsyncProjectsClient:
|
|
|
507
469
|
"GET",
|
|
508
470
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/projects/{project_id}"),
|
|
509
471
|
params=remove_none_from_dict({"organization_id": organization_id}),
|
|
510
|
-
headers=
|
|
472
|
+
headers=self._client_wrapper.get_headers(),
|
|
511
473
|
timeout=60,
|
|
512
474
|
)
|
|
513
475
|
if 200 <= _response.status_code < 300:
|
|
@@ -521,12 +483,7 @@ class AsyncProjectsClient:
|
|
|
521
483
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
522
484
|
|
|
523
485
|
async def update_existing_project(
|
|
524
|
-
self,
|
|
525
|
-
project_id: typing.Optional[str],
|
|
526
|
-
*,
|
|
527
|
-
organization_id: typing.Optional[str] = None,
|
|
528
|
-
name: str,
|
|
529
|
-
project_id: typing.Optional[str] = None,
|
|
486
|
+
self, project_id: typing.Optional[str], *, organization_id: typing.Optional[str] = None, name: str
|
|
530
487
|
) -> Project:
|
|
531
488
|
"""
|
|
532
489
|
Update an existing project.
|
|
@@ -537,8 +494,6 @@ class AsyncProjectsClient:
|
|
|
537
494
|
- organization_id: typing.Optional[str].
|
|
538
495
|
|
|
539
496
|
- name: str.
|
|
540
|
-
|
|
541
|
-
- project_id: typing.Optional[str].
|
|
542
497
|
---
|
|
543
498
|
from llama_cloud.client import AsyncLlamaCloud
|
|
544
499
|
|
|
@@ -554,7 +509,7 @@ class AsyncProjectsClient:
|
|
|
554
509
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/projects/{project_id}"),
|
|
555
510
|
params=remove_none_from_dict({"organization_id": organization_id}),
|
|
556
511
|
json=jsonable_encoder({"name": name}),
|
|
557
|
-
headers=
|
|
512
|
+
headers=self._client_wrapper.get_headers(),
|
|
558
513
|
timeout=60,
|
|
559
514
|
)
|
|
560
515
|
if 200 <= _response.status_code < 300:
|
|
@@ -568,11 +523,7 @@ class AsyncProjectsClient:
|
|
|
568
523
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
569
524
|
|
|
570
525
|
async def delete_project(
|
|
571
|
-
self,
|
|
572
|
-
project_id: typing.Optional[str],
|
|
573
|
-
*,
|
|
574
|
-
organization_id: typing.Optional[str] = None,
|
|
575
|
-
project_id: typing.Optional[str] = None,
|
|
526
|
+
self, project_id: typing.Optional[str], *, organization_id: typing.Optional[str] = None
|
|
576
527
|
) -> None:
|
|
577
528
|
"""
|
|
578
529
|
Delete a project by ID.
|
|
@@ -581,8 +532,6 @@ class AsyncProjectsClient:
|
|
|
581
532
|
- project_id: typing.Optional[str].
|
|
582
533
|
|
|
583
534
|
- organization_id: typing.Optional[str].
|
|
584
|
-
|
|
585
|
-
- project_id: typing.Optional[str].
|
|
586
535
|
---
|
|
587
536
|
from llama_cloud.client import AsyncLlamaCloud
|
|
588
537
|
|
|
@@ -595,7 +544,7 @@ class AsyncProjectsClient:
|
|
|
595
544
|
"DELETE",
|
|
596
545
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/projects/{project_id}"),
|
|
597
546
|
params=remove_none_from_dict({"organization_id": organization_id}),
|
|
598
|
-
headers=
|
|
547
|
+
headers=self._client_wrapper.get_headers(),
|
|
599
548
|
timeout=60,
|
|
600
549
|
)
|
|
601
550
|
if 200 <= _response.status_code < 300:
|
|
@@ -609,11 +558,7 @@ class AsyncProjectsClient:
|
|
|
609
558
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
610
559
|
|
|
611
560
|
async def get_current_project(
|
|
612
|
-
self,
|
|
613
|
-
*,
|
|
614
|
-
project_id: typing.Optional[str] = None,
|
|
615
|
-
organization_id: typing.Optional[str] = None,
|
|
616
|
-
project_id: typing.Optional[str] = None,
|
|
561
|
+
self, *, project_id: typing.Optional[str] = None, organization_id: typing.Optional[str] = None
|
|
617
562
|
) -> Project:
|
|
618
563
|
"""
|
|
619
564
|
Get the current project.
|
|
@@ -622,8 +567,6 @@ class AsyncProjectsClient:
|
|
|
622
567
|
- project_id: typing.Optional[str].
|
|
623
568
|
|
|
624
569
|
- organization_id: typing.Optional[str].
|
|
625
|
-
|
|
626
|
-
- project_id: typing.Optional[str].
|
|
627
570
|
---
|
|
628
571
|
from llama_cloud.client import AsyncLlamaCloud
|
|
629
572
|
|
|
@@ -636,7 +579,7 @@ class AsyncProjectsClient:
|
|
|
636
579
|
"GET",
|
|
637
580
|
urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/projects/current"),
|
|
638
581
|
params=remove_none_from_dict({"project_id": project_id, "organization_id": organization_id}),
|
|
639
|
-
headers=
|
|
582
|
+
headers=self._client_wrapper.get_headers(),
|
|
640
583
|
timeout=60,
|
|
641
584
|
)
|
|
642
585
|
if 200 <= _response.status_code < 300:
|
|
@@ -655,7 +598,6 @@ class AsyncProjectsClient:
|
|
|
655
598
|
*,
|
|
656
599
|
get_current_invoice_total: typing.Optional[bool] = None,
|
|
657
600
|
organization_id: typing.Optional[str] = None,
|
|
658
|
-
project_id: typing.Optional[str] = None,
|
|
659
601
|
) -> UsageAndPlan:
|
|
660
602
|
"""
|
|
661
603
|
Get usage for a project
|
|
@@ -666,8 +608,6 @@ class AsyncProjectsClient:
|
|
|
666
608
|
- get_current_invoice_total: typing.Optional[bool].
|
|
667
609
|
|
|
668
610
|
- organization_id: typing.Optional[str].
|
|
669
|
-
|
|
670
|
-
- project_id: typing.Optional[str].
|
|
671
611
|
---
|
|
672
612
|
from llama_cloud.client import AsyncLlamaCloud
|
|
673
613
|
|
|
@@ -682,7 +622,7 @@ class AsyncProjectsClient:
|
|
|
682
622
|
params=remove_none_from_dict(
|
|
683
623
|
{"get_current_invoice_total": get_current_invoice_total, "organization_id": organization_id}
|
|
684
624
|
),
|
|
685
|
-
headers=
|
|
625
|
+
headers=self._client_wrapper.get_headers(),
|
|
686
626
|
timeout=60,
|
|
687
627
|
)
|
|
688
628
|
if 200 <= _response.status_code < 300:
|