llama-cloud 0.1.15__py3-none-any.whl → 0.1.16__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of llama-cloud might be problematic. Click here for more details.
- llama_cloud/__init__.py +0 -28
- llama_cloud/resources/evals/client.py +0 -643
- llama_cloud/resources/pipelines/client.py +10 -371
- llama_cloud/resources/projects/client.py +72 -923
- llama_cloud/resources/retrievers/client.py +124 -0
- llama_cloud/types/__init__.py +0 -28
- llama_cloud/types/extract_config.py +0 -3
- llama_cloud/types/extract_mode.py +9 -1
- llama_cloud/types/prompt_conf.py +1 -0
- llama_cloud/types/report_block.py +1 -0
- llama_cloud/types/struct_mode.py +4 -0
- llama_cloud/types/struct_parse_conf.py +6 -0
- {llama_cloud-0.1.15.dist-info → llama_cloud-0.1.16.dist-info}/METADATA +1 -1
- {llama_cloud-0.1.15.dist-info → llama_cloud-0.1.16.dist-info}/RECORD +16 -30
- llama_cloud/types/eval_dataset.py +0 -40
- llama_cloud/types/eval_dataset_job_params.py +0 -39
- llama_cloud/types/eval_dataset_job_record.py +0 -58
- llama_cloud/types/eval_execution_params_override.py +0 -37
- llama_cloud/types/eval_metric.py +0 -17
- llama_cloud/types/eval_question.py +0 -38
- llama_cloud/types/eval_question_create.py +0 -31
- llama_cloud/types/eval_question_result.py +0 -52
- llama_cloud/types/local_eval.py +0 -47
- llama_cloud/types/local_eval_results.py +0 -40
- llama_cloud/types/local_eval_sets.py +0 -33
- llama_cloud/types/metric_result.py +0 -33
- llama_cloud/types/prompt_mixin_prompts.py +0 -39
- llama_cloud/types/prompt_spec.py +0 -36
- {llama_cloud-0.1.15.dist-info → llama_cloud-0.1.16.dist-info}/LICENSE +0 -0
- {llama_cloud-0.1.15.dist-info → llama_cloud-0.1.16.dist-info}/WHEEL +0 -0
|
@@ -14,10 +14,7 @@ from ...types.cloud_document import CloudDocument
|
|
|
14
14
|
from ...types.cloud_document_create import CloudDocumentCreate
|
|
15
15
|
from ...types.configured_transformation_item import ConfiguredTransformationItem
|
|
16
16
|
from ...types.data_sink_create import DataSinkCreate
|
|
17
|
-
from ...types.eval_dataset_job_record import EvalDatasetJobRecord
|
|
18
17
|
from ...types.eval_execution_params import EvalExecutionParams
|
|
19
|
-
from ...types.eval_execution_params_override import EvalExecutionParamsOverride
|
|
20
|
-
from ...types.eval_question_result import EvalQuestionResult
|
|
21
18
|
from ...types.http_validation_error import HttpValidationError
|
|
22
19
|
from ...types.input_message import InputMessage
|
|
23
20
|
from ...types.llama_parse_parameters import LlamaParseParameters
|
|
@@ -423,188 +420,6 @@ class PipelinesClient:
|
|
|
423
420
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
424
421
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
425
422
|
|
|
426
|
-
def get_eval_dataset_executions(self, eval_dataset_id: str, pipeline_id: str) -> typing.List[EvalDatasetJobRecord]:
|
|
427
|
-
"""
|
|
428
|
-
Get the status of an EvalDatasetExecution.
|
|
429
|
-
|
|
430
|
-
Parameters:
|
|
431
|
-
- eval_dataset_id: str.
|
|
432
|
-
|
|
433
|
-
- pipeline_id: str.
|
|
434
|
-
---
|
|
435
|
-
from llama_cloud.client import LlamaCloud
|
|
436
|
-
|
|
437
|
-
client = LlamaCloud(
|
|
438
|
-
token="YOUR_TOKEN",
|
|
439
|
-
)
|
|
440
|
-
client.pipelines.get_eval_dataset_executions(
|
|
441
|
-
eval_dataset_id="string",
|
|
442
|
-
pipeline_id="string",
|
|
443
|
-
)
|
|
444
|
-
"""
|
|
445
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
446
|
-
"GET",
|
|
447
|
-
urllib.parse.urljoin(
|
|
448
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
449
|
-
f"api/v1/pipelines/{pipeline_id}/eval-datasets/{eval_dataset_id}/execute",
|
|
450
|
-
),
|
|
451
|
-
headers=self._client_wrapper.get_headers(),
|
|
452
|
-
timeout=60,
|
|
453
|
-
)
|
|
454
|
-
if 200 <= _response.status_code < 300:
|
|
455
|
-
return pydantic.parse_obj_as(typing.List[EvalDatasetJobRecord], _response.json()) # type: ignore
|
|
456
|
-
if _response.status_code == 422:
|
|
457
|
-
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
458
|
-
try:
|
|
459
|
-
_response_json = _response.json()
|
|
460
|
-
except JSONDecodeError:
|
|
461
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
462
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
463
|
-
|
|
464
|
-
def execute_eval_dataset(
|
|
465
|
-
self,
|
|
466
|
-
eval_dataset_id: str,
|
|
467
|
-
pipeline_id: str,
|
|
468
|
-
*,
|
|
469
|
-
eval_question_ids: typing.List[str],
|
|
470
|
-
params: typing.Optional[EvalExecutionParamsOverride] = OMIT,
|
|
471
|
-
) -> EvalDatasetJobRecord:
|
|
472
|
-
"""
|
|
473
|
-
Execute a dataset.
|
|
474
|
-
|
|
475
|
-
Parameters:
|
|
476
|
-
- eval_dataset_id: str.
|
|
477
|
-
|
|
478
|
-
- pipeline_id: str.
|
|
479
|
-
|
|
480
|
-
- eval_question_ids: typing.List[str].
|
|
481
|
-
|
|
482
|
-
- params: typing.Optional[EvalExecutionParamsOverride]. The parameters for the eval execution that will override the ones set in the pipeline.
|
|
483
|
-
---
|
|
484
|
-
from llama_cloud import EvalExecutionParamsOverride, SupportedLlmModelNames
|
|
485
|
-
from llama_cloud.client import LlamaCloud
|
|
486
|
-
|
|
487
|
-
client = LlamaCloud(
|
|
488
|
-
token="YOUR_TOKEN",
|
|
489
|
-
)
|
|
490
|
-
client.pipelines.execute_eval_dataset(
|
|
491
|
-
eval_dataset_id="string",
|
|
492
|
-
pipeline_id="string",
|
|
493
|
-
eval_question_ids=[],
|
|
494
|
-
params=EvalExecutionParamsOverride(
|
|
495
|
-
llm_model=SupportedLlmModelNames.GPT_3_5_TURBO,
|
|
496
|
-
),
|
|
497
|
-
)
|
|
498
|
-
"""
|
|
499
|
-
_request: typing.Dict[str, typing.Any] = {"eval_question_ids": eval_question_ids}
|
|
500
|
-
if params is not OMIT:
|
|
501
|
-
_request["params"] = params
|
|
502
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
503
|
-
"POST",
|
|
504
|
-
urllib.parse.urljoin(
|
|
505
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
506
|
-
f"api/v1/pipelines/{pipeline_id}/eval-datasets/{eval_dataset_id}/execute",
|
|
507
|
-
),
|
|
508
|
-
json=jsonable_encoder(_request),
|
|
509
|
-
headers=self._client_wrapper.get_headers(),
|
|
510
|
-
timeout=60,
|
|
511
|
-
)
|
|
512
|
-
if 200 <= _response.status_code < 300:
|
|
513
|
-
return pydantic.parse_obj_as(EvalDatasetJobRecord, _response.json()) # type: ignore
|
|
514
|
-
if _response.status_code == 422:
|
|
515
|
-
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
516
|
-
try:
|
|
517
|
-
_response_json = _response.json()
|
|
518
|
-
except JSONDecodeError:
|
|
519
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
520
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
521
|
-
|
|
522
|
-
def get_eval_dataset_execution_result(
|
|
523
|
-
self, eval_dataset_id: str, pipeline_id: str
|
|
524
|
-
) -> typing.List[EvalQuestionResult]:
|
|
525
|
-
"""
|
|
526
|
-
Get the result of an EvalDatasetExecution.
|
|
527
|
-
If eval_question_ids is specified, only the results for the specified
|
|
528
|
-
questions will be returned.
|
|
529
|
-
If any of the specified questions do not have a result, they will be ignored.
|
|
530
|
-
|
|
531
|
-
Parameters:
|
|
532
|
-
- eval_dataset_id: str.
|
|
533
|
-
|
|
534
|
-
- pipeline_id: str.
|
|
535
|
-
---
|
|
536
|
-
from llama_cloud.client import LlamaCloud
|
|
537
|
-
|
|
538
|
-
client = LlamaCloud(
|
|
539
|
-
token="YOUR_TOKEN",
|
|
540
|
-
)
|
|
541
|
-
client.pipelines.get_eval_dataset_execution_result(
|
|
542
|
-
eval_dataset_id="string",
|
|
543
|
-
pipeline_id="string",
|
|
544
|
-
)
|
|
545
|
-
"""
|
|
546
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
547
|
-
"GET",
|
|
548
|
-
urllib.parse.urljoin(
|
|
549
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
550
|
-
f"api/v1/pipelines/{pipeline_id}/eval-datasets/{eval_dataset_id}/execute/result",
|
|
551
|
-
),
|
|
552
|
-
headers=self._client_wrapper.get_headers(),
|
|
553
|
-
timeout=60,
|
|
554
|
-
)
|
|
555
|
-
if 200 <= _response.status_code < 300:
|
|
556
|
-
return pydantic.parse_obj_as(typing.List[EvalQuestionResult], _response.json()) # type: ignore
|
|
557
|
-
if _response.status_code == 422:
|
|
558
|
-
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
559
|
-
try:
|
|
560
|
-
_response_json = _response.json()
|
|
561
|
-
except JSONDecodeError:
|
|
562
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
563
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
564
|
-
|
|
565
|
-
def get_eval_dataset_execution(
|
|
566
|
-
self, eval_dataset_id: str, eval_dataset_execution_id: str, pipeline_id: str
|
|
567
|
-
) -> EvalDatasetJobRecord:
|
|
568
|
-
"""
|
|
569
|
-
Get the status of an EvalDatasetExecution.
|
|
570
|
-
|
|
571
|
-
Parameters:
|
|
572
|
-
- eval_dataset_id: str.
|
|
573
|
-
|
|
574
|
-
- eval_dataset_execution_id: str.
|
|
575
|
-
|
|
576
|
-
- pipeline_id: str.
|
|
577
|
-
---
|
|
578
|
-
from llama_cloud.client import LlamaCloud
|
|
579
|
-
|
|
580
|
-
client = LlamaCloud(
|
|
581
|
-
token="YOUR_TOKEN",
|
|
582
|
-
)
|
|
583
|
-
client.pipelines.get_eval_dataset_execution(
|
|
584
|
-
eval_dataset_id="string",
|
|
585
|
-
eval_dataset_execution_id="string",
|
|
586
|
-
pipeline_id="string",
|
|
587
|
-
)
|
|
588
|
-
"""
|
|
589
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
590
|
-
"GET",
|
|
591
|
-
urllib.parse.urljoin(
|
|
592
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
593
|
-
f"api/v1/pipelines/{pipeline_id}/eval-datasets/{eval_dataset_id}/execute/{eval_dataset_execution_id}",
|
|
594
|
-
),
|
|
595
|
-
headers=self._client_wrapper.get_headers(),
|
|
596
|
-
timeout=60,
|
|
597
|
-
)
|
|
598
|
-
if 200 <= _response.status_code < 300:
|
|
599
|
-
return pydantic.parse_obj_as(EvalDatasetJobRecord, _response.json()) # type: ignore
|
|
600
|
-
if _response.status_code == 422:
|
|
601
|
-
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
602
|
-
try:
|
|
603
|
-
_response_json = _response.json()
|
|
604
|
-
except JSONDecodeError:
|
|
605
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
606
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
607
|
-
|
|
608
423
|
def list_pipeline_files(
|
|
609
424
|
self,
|
|
610
425
|
pipeline_id: str,
|
|
@@ -1675,7 +1490,11 @@ class PipelinesClient:
|
|
|
1675
1490
|
|
|
1676
1491
|
def delete_pipeline_document(self, document_id: str, pipeline_id: str) -> None:
|
|
1677
1492
|
"""
|
|
1678
|
-
Delete a document
|
|
1493
|
+
Delete a document from a pipeline.
|
|
1494
|
+
Initiates an async job that will:
|
|
1495
|
+
|
|
1496
|
+
1. Delete vectors from the vector store
|
|
1497
|
+
2. Delete the document from MongoDB after vectors are successfully deleted
|
|
1679
1498
|
|
|
1680
1499
|
Parameters:
|
|
1681
1500
|
- document_id: str.
|
|
@@ -2156,190 +1975,6 @@ class AsyncPipelinesClient:
|
|
|
2156
1975
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
2157
1976
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
2158
1977
|
|
|
2159
|
-
async def get_eval_dataset_executions(
|
|
2160
|
-
self, eval_dataset_id: str, pipeline_id: str
|
|
2161
|
-
) -> typing.List[EvalDatasetJobRecord]:
|
|
2162
|
-
"""
|
|
2163
|
-
Get the status of an EvalDatasetExecution.
|
|
2164
|
-
|
|
2165
|
-
Parameters:
|
|
2166
|
-
- eval_dataset_id: str.
|
|
2167
|
-
|
|
2168
|
-
- pipeline_id: str.
|
|
2169
|
-
---
|
|
2170
|
-
from llama_cloud.client import AsyncLlamaCloud
|
|
2171
|
-
|
|
2172
|
-
client = AsyncLlamaCloud(
|
|
2173
|
-
token="YOUR_TOKEN",
|
|
2174
|
-
)
|
|
2175
|
-
await client.pipelines.get_eval_dataset_executions(
|
|
2176
|
-
eval_dataset_id="string",
|
|
2177
|
-
pipeline_id="string",
|
|
2178
|
-
)
|
|
2179
|
-
"""
|
|
2180
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
2181
|
-
"GET",
|
|
2182
|
-
urllib.parse.urljoin(
|
|
2183
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
2184
|
-
f"api/v1/pipelines/{pipeline_id}/eval-datasets/{eval_dataset_id}/execute",
|
|
2185
|
-
),
|
|
2186
|
-
headers=self._client_wrapper.get_headers(),
|
|
2187
|
-
timeout=60,
|
|
2188
|
-
)
|
|
2189
|
-
if 200 <= _response.status_code < 300:
|
|
2190
|
-
return pydantic.parse_obj_as(typing.List[EvalDatasetJobRecord], _response.json()) # type: ignore
|
|
2191
|
-
if _response.status_code == 422:
|
|
2192
|
-
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
2193
|
-
try:
|
|
2194
|
-
_response_json = _response.json()
|
|
2195
|
-
except JSONDecodeError:
|
|
2196
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
2197
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
2198
|
-
|
|
2199
|
-
async def execute_eval_dataset(
|
|
2200
|
-
self,
|
|
2201
|
-
eval_dataset_id: str,
|
|
2202
|
-
pipeline_id: str,
|
|
2203
|
-
*,
|
|
2204
|
-
eval_question_ids: typing.List[str],
|
|
2205
|
-
params: typing.Optional[EvalExecutionParamsOverride] = OMIT,
|
|
2206
|
-
) -> EvalDatasetJobRecord:
|
|
2207
|
-
"""
|
|
2208
|
-
Execute a dataset.
|
|
2209
|
-
|
|
2210
|
-
Parameters:
|
|
2211
|
-
- eval_dataset_id: str.
|
|
2212
|
-
|
|
2213
|
-
- pipeline_id: str.
|
|
2214
|
-
|
|
2215
|
-
- eval_question_ids: typing.List[str].
|
|
2216
|
-
|
|
2217
|
-
- params: typing.Optional[EvalExecutionParamsOverride]. The parameters for the eval execution that will override the ones set in the pipeline.
|
|
2218
|
-
---
|
|
2219
|
-
from llama_cloud import EvalExecutionParamsOverride, SupportedLlmModelNames
|
|
2220
|
-
from llama_cloud.client import AsyncLlamaCloud
|
|
2221
|
-
|
|
2222
|
-
client = AsyncLlamaCloud(
|
|
2223
|
-
token="YOUR_TOKEN",
|
|
2224
|
-
)
|
|
2225
|
-
await client.pipelines.execute_eval_dataset(
|
|
2226
|
-
eval_dataset_id="string",
|
|
2227
|
-
pipeline_id="string",
|
|
2228
|
-
eval_question_ids=[],
|
|
2229
|
-
params=EvalExecutionParamsOverride(
|
|
2230
|
-
llm_model=SupportedLlmModelNames.GPT_3_5_TURBO,
|
|
2231
|
-
),
|
|
2232
|
-
)
|
|
2233
|
-
"""
|
|
2234
|
-
_request: typing.Dict[str, typing.Any] = {"eval_question_ids": eval_question_ids}
|
|
2235
|
-
if params is not OMIT:
|
|
2236
|
-
_request["params"] = params
|
|
2237
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
2238
|
-
"POST",
|
|
2239
|
-
urllib.parse.urljoin(
|
|
2240
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
2241
|
-
f"api/v1/pipelines/{pipeline_id}/eval-datasets/{eval_dataset_id}/execute",
|
|
2242
|
-
),
|
|
2243
|
-
json=jsonable_encoder(_request),
|
|
2244
|
-
headers=self._client_wrapper.get_headers(),
|
|
2245
|
-
timeout=60,
|
|
2246
|
-
)
|
|
2247
|
-
if 200 <= _response.status_code < 300:
|
|
2248
|
-
return pydantic.parse_obj_as(EvalDatasetJobRecord, _response.json()) # type: ignore
|
|
2249
|
-
if _response.status_code == 422:
|
|
2250
|
-
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
2251
|
-
try:
|
|
2252
|
-
_response_json = _response.json()
|
|
2253
|
-
except JSONDecodeError:
|
|
2254
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
2255
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
2256
|
-
|
|
2257
|
-
async def get_eval_dataset_execution_result(
|
|
2258
|
-
self, eval_dataset_id: str, pipeline_id: str
|
|
2259
|
-
) -> typing.List[EvalQuestionResult]:
|
|
2260
|
-
"""
|
|
2261
|
-
Get the result of an EvalDatasetExecution.
|
|
2262
|
-
If eval_question_ids is specified, only the results for the specified
|
|
2263
|
-
questions will be returned.
|
|
2264
|
-
If any of the specified questions do not have a result, they will be ignored.
|
|
2265
|
-
|
|
2266
|
-
Parameters:
|
|
2267
|
-
- eval_dataset_id: str.
|
|
2268
|
-
|
|
2269
|
-
- pipeline_id: str.
|
|
2270
|
-
---
|
|
2271
|
-
from llama_cloud.client import AsyncLlamaCloud
|
|
2272
|
-
|
|
2273
|
-
client = AsyncLlamaCloud(
|
|
2274
|
-
token="YOUR_TOKEN",
|
|
2275
|
-
)
|
|
2276
|
-
await client.pipelines.get_eval_dataset_execution_result(
|
|
2277
|
-
eval_dataset_id="string",
|
|
2278
|
-
pipeline_id="string",
|
|
2279
|
-
)
|
|
2280
|
-
"""
|
|
2281
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
2282
|
-
"GET",
|
|
2283
|
-
urllib.parse.urljoin(
|
|
2284
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
2285
|
-
f"api/v1/pipelines/{pipeline_id}/eval-datasets/{eval_dataset_id}/execute/result",
|
|
2286
|
-
),
|
|
2287
|
-
headers=self._client_wrapper.get_headers(),
|
|
2288
|
-
timeout=60,
|
|
2289
|
-
)
|
|
2290
|
-
if 200 <= _response.status_code < 300:
|
|
2291
|
-
return pydantic.parse_obj_as(typing.List[EvalQuestionResult], _response.json()) # type: ignore
|
|
2292
|
-
if _response.status_code == 422:
|
|
2293
|
-
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
2294
|
-
try:
|
|
2295
|
-
_response_json = _response.json()
|
|
2296
|
-
except JSONDecodeError:
|
|
2297
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
2298
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
2299
|
-
|
|
2300
|
-
async def get_eval_dataset_execution(
|
|
2301
|
-
self, eval_dataset_id: str, eval_dataset_execution_id: str, pipeline_id: str
|
|
2302
|
-
) -> EvalDatasetJobRecord:
|
|
2303
|
-
"""
|
|
2304
|
-
Get the status of an EvalDatasetExecution.
|
|
2305
|
-
|
|
2306
|
-
Parameters:
|
|
2307
|
-
- eval_dataset_id: str.
|
|
2308
|
-
|
|
2309
|
-
- eval_dataset_execution_id: str.
|
|
2310
|
-
|
|
2311
|
-
- pipeline_id: str.
|
|
2312
|
-
---
|
|
2313
|
-
from llama_cloud.client import AsyncLlamaCloud
|
|
2314
|
-
|
|
2315
|
-
client = AsyncLlamaCloud(
|
|
2316
|
-
token="YOUR_TOKEN",
|
|
2317
|
-
)
|
|
2318
|
-
await client.pipelines.get_eval_dataset_execution(
|
|
2319
|
-
eval_dataset_id="string",
|
|
2320
|
-
eval_dataset_execution_id="string",
|
|
2321
|
-
pipeline_id="string",
|
|
2322
|
-
)
|
|
2323
|
-
"""
|
|
2324
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
2325
|
-
"GET",
|
|
2326
|
-
urllib.parse.urljoin(
|
|
2327
|
-
f"{self._client_wrapper.get_base_url()}/",
|
|
2328
|
-
f"api/v1/pipelines/{pipeline_id}/eval-datasets/{eval_dataset_id}/execute/{eval_dataset_execution_id}",
|
|
2329
|
-
),
|
|
2330
|
-
headers=self._client_wrapper.get_headers(),
|
|
2331
|
-
timeout=60,
|
|
2332
|
-
)
|
|
2333
|
-
if 200 <= _response.status_code < 300:
|
|
2334
|
-
return pydantic.parse_obj_as(EvalDatasetJobRecord, _response.json()) # type: ignore
|
|
2335
|
-
if _response.status_code == 422:
|
|
2336
|
-
raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
|
|
2337
|
-
try:
|
|
2338
|
-
_response_json = _response.json()
|
|
2339
|
-
except JSONDecodeError:
|
|
2340
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
2341
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
2342
|
-
|
|
2343
1978
|
async def list_pipeline_files(
|
|
2344
1979
|
self,
|
|
2345
1980
|
pipeline_id: str,
|
|
@@ -3412,7 +3047,11 @@ class AsyncPipelinesClient:
|
|
|
3412
3047
|
|
|
3413
3048
|
async def delete_pipeline_document(self, document_id: str, pipeline_id: str) -> None:
|
|
3414
3049
|
"""
|
|
3415
|
-
Delete a document
|
|
3050
|
+
Delete a document from a pipeline.
|
|
3051
|
+
Initiates an async job that will:
|
|
3052
|
+
|
|
3053
|
+
1. Delete vectors from the vector store
|
|
3054
|
+
2. Delete the document from MongoDB after vectors are successfully deleted
|
|
3416
3055
|
|
|
3417
3056
|
Parameters:
|
|
3418
3057
|
- document_id: str.
|