llama-cloud 0.1.28__py3-none-any.whl → 0.1.29__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 CHANGED
@@ -163,6 +163,7 @@ from .types import (
163
163
  JobRecordWithUsageMetrics,
164
164
  LLamaParseTransformConfig,
165
165
  LegacyParseJobConfig,
166
+ LicenseInfoResponse,
166
167
  LlamaExtractSettings,
167
168
  LlamaIndexCoreBaseLlmsTypesChatMessage,
168
169
  LlamaIndexCoreBaseLlmsTypesChatMessageBlocksItem,
@@ -332,6 +333,8 @@ from .types import (
332
333
  VertexAiEmbeddingConfig,
333
334
  VertexEmbeddingMode,
334
335
  VertexTextEmbedding,
336
+ WebhookConfiguration,
337
+ WebhookConfigurationWebhookEventsItem,
335
338
  )
336
339
  from .errors import UnprocessableEntityError
337
340
  from .resources import (
@@ -369,6 +372,7 @@ from .resources import (
369
372
  PipelineUpdateTransformConfig,
370
373
  RetrievalParamsSearchFiltersInferenceSchemaValue,
371
374
  UpdateReportPlanApiV1ReportsReportIdPlanPatchRequestAction,
375
+ admin,
372
376
  beta,
373
377
  chat_apps,
374
378
  data_sinks,
@@ -574,6 +578,7 @@ __all__ = [
574
578
  "JobRecordWithUsageMetrics",
575
579
  "LLamaParseTransformConfig",
576
580
  "LegacyParseJobConfig",
581
+ "LicenseInfoResponse",
577
582
  "LlamaCloudEnvironment",
578
583
  "LlamaExtractSettings",
579
584
  "LlamaIndexCoreBaseLlmsTypesChatMessage",
@@ -757,6 +762,9 @@ __all__ = [
757
762
  "VertexAiEmbeddingConfig",
758
763
  "VertexEmbeddingMode",
759
764
  "VertexTextEmbedding",
765
+ "WebhookConfiguration",
766
+ "WebhookConfigurationWebhookEventsItem",
767
+ "admin",
760
768
  "beta",
761
769
  "chat_apps",
762
770
  "data_sinks",
llama_cloud/client.py CHANGED
@@ -6,6 +6,7 @@ import httpx
6
6
 
7
7
  from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
8
  from .environment import LlamaCloudEnvironment
9
+ from .resources.admin.client import AdminClient, AsyncAdminClient
9
10
  from .resources.beta.client import AsyncBetaClient, BetaClient
10
11
  from .resources.chat_apps.client import AsyncChatAppsClient, ChatAppsClient
11
12
  from .resources.data_sinks.client import AsyncDataSinksClient, DataSinksClient
@@ -54,6 +55,7 @@ class LlamaCloud:
54
55
  self.parsing = ParsingClient(client_wrapper=self._client_wrapper)
55
56
  self.chat_apps = ChatAppsClient(client_wrapper=self._client_wrapper)
56
57
  self.llama_apps = LlamaAppsClient(client_wrapper=self._client_wrapper)
58
+ self.admin = AdminClient(client_wrapper=self._client_wrapper)
57
59
  self.llama_extract = LlamaExtractClient(client_wrapper=self._client_wrapper)
58
60
  self.reports = ReportsClient(client_wrapper=self._client_wrapper)
59
61
  self.beta = BetaClient(client_wrapper=self._client_wrapper)
@@ -88,6 +90,7 @@ class AsyncLlamaCloud:
88
90
  self.parsing = AsyncParsingClient(client_wrapper=self._client_wrapper)
89
91
  self.chat_apps = AsyncChatAppsClient(client_wrapper=self._client_wrapper)
90
92
  self.llama_apps = AsyncLlamaAppsClient(client_wrapper=self._client_wrapper)
93
+ self.admin = AsyncAdminClient(client_wrapper=self._client_wrapper)
91
94
  self.llama_extract = AsyncLlamaExtractClient(client_wrapper=self._client_wrapper)
92
95
  self.reports = AsyncReportsClient(client_wrapper=self._client_wrapper)
93
96
  self.beta = AsyncBetaClient(client_wrapper=self._client_wrapper)
@@ -1,6 +1,7 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from . import (
4
+ admin,
4
5
  beta,
5
6
  chat_apps,
6
7
  data_sinks,
@@ -92,6 +93,7 @@ __all__ = [
92
93
  "PipelineUpdateTransformConfig",
93
94
  "RetrievalParamsSearchFiltersInferenceSchemaValue",
94
95
  "UpdateReportPlanApiV1ReportsReportIdPlanPatchRequestAction",
96
+ "admin",
95
97
  "beta",
96
98
  "chat_apps",
97
99
  "data_sinks",
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,88 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ import urllib.parse
5
+ from json.decoder import JSONDecodeError
6
+
7
+ from ...core.api_error import ApiError
8
+ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
+ from ...core.remove_none_from_dict import remove_none_from_dict
10
+ from ...errors.unprocessable_entity_error import UnprocessableEntityError
11
+ from ...types.http_validation_error import HttpValidationError
12
+ from ...types.license_info_response import LicenseInfoResponse
13
+
14
+ try:
15
+ import pydantic
16
+ if pydantic.__version__.startswith("1."):
17
+ raise ImportError
18
+ import pydantic.v1 as pydantic # type: ignore
19
+ except ImportError:
20
+ import pydantic # type: ignore
21
+
22
+
23
+ class AdminClient:
24
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
25
+ self._client_wrapper = client_wrapper
26
+
27
+ def get_license_info(self, *, include_scopes: typing.Optional[bool] = None) -> LicenseInfoResponse:
28
+ """
29
+ Parameters:
30
+ - include_scopes: typing.Optional[bool]. Whether to include scopes in the response
31
+ ---
32
+ from llama_cloud.client import LlamaCloud
33
+
34
+ client = LlamaCloud(
35
+ token="YOUR_TOKEN",
36
+ )
37
+ client.admin.get_license_info()
38
+ """
39
+ _response = self._client_wrapper.httpx_client.request(
40
+ "GET",
41
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/admin/license/info"),
42
+ params=remove_none_from_dict({"include_scopes": include_scopes}),
43
+ headers=self._client_wrapper.get_headers(),
44
+ timeout=60,
45
+ )
46
+ if 200 <= _response.status_code < 300:
47
+ return pydantic.parse_obj_as(LicenseInfoResponse, _response.json()) # type: ignore
48
+ if _response.status_code == 422:
49
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
50
+ try:
51
+ _response_json = _response.json()
52
+ except JSONDecodeError:
53
+ raise ApiError(status_code=_response.status_code, body=_response.text)
54
+ raise ApiError(status_code=_response.status_code, body=_response_json)
55
+
56
+
57
+ class AsyncAdminClient:
58
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
59
+ self._client_wrapper = client_wrapper
60
+
61
+ async def get_license_info(self, *, include_scopes: typing.Optional[bool] = None) -> LicenseInfoResponse:
62
+ """
63
+ Parameters:
64
+ - include_scopes: typing.Optional[bool]. Whether to include scopes in the response
65
+ ---
66
+ from llama_cloud.client import AsyncLlamaCloud
67
+
68
+ client = AsyncLlamaCloud(
69
+ token="YOUR_TOKEN",
70
+ )
71
+ await client.admin.get_license_info()
72
+ """
73
+ _response = await self._client_wrapper.httpx_client.request(
74
+ "GET",
75
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v1/admin/license/info"),
76
+ params=remove_none_from_dict({"include_scopes": include_scopes}),
77
+ headers=self._client_wrapper.get_headers(),
78
+ timeout=60,
79
+ )
80
+ if 200 <= _response.status_code < 300:
81
+ return pydantic.parse_obj_as(LicenseInfoResponse, _response.json()) # type: ignore
82
+ if _response.status_code == 422:
83
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
84
+ try:
85
+ _response_json = _response.json()
86
+ except JSONDecodeError:
87
+ raise ApiError(status_code=_response.status_code, body=_response.text)
88
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -709,6 +709,40 @@ class ParsingClient:
709
709
  raise ApiError(status_code=_response.status_code, body=_response.text)
710
710
  raise ApiError(status_code=_response.status_code, body=_response_json)
711
711
 
712
+ def get_job_raw_text_result_raw(self, job_id: str) -> typing.Any:
713
+ """
714
+ Get a job by id
715
+
716
+ Parameters:
717
+ - job_id: str.
718
+ ---
719
+ from llama_cloud.client import LlamaCloud
720
+
721
+ client = LlamaCloud(
722
+ token="YOUR_TOKEN",
723
+ )
724
+ client.parsing.get_job_raw_text_result_raw(
725
+ job_id="string",
726
+ )
727
+ """
728
+ _response = self._client_wrapper.httpx_client.request(
729
+ "GET",
730
+ urllib.parse.urljoin(
731
+ f"{self._client_wrapper.get_base_url()}/", f"api/v1/parsing/job/{job_id}/result/raw/text"
732
+ ),
733
+ headers=self._client_wrapper.get_headers(),
734
+ timeout=60,
735
+ )
736
+ if 200 <= _response.status_code < 300:
737
+ return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
738
+ if _response.status_code == 422:
739
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
740
+ try:
741
+ _response_json = _response.json()
742
+ except JSONDecodeError:
743
+ raise ApiError(status_code=_response.status_code, body=_response.text)
744
+ raise ApiError(status_code=_response.status_code, body=_response_json)
745
+
712
746
  def get_job_raw_text_result(self, job_id: str) -> typing.Any:
713
747
  """
714
748
  Get a job by id
@@ -725,6 +759,38 @@ class ParsingClient:
725
759
  job_id="string",
726
760
  )
727
761
  """
762
+ _response = self._client_wrapper.httpx_client.request(
763
+ "GET",
764
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/parsing/job/{job_id}/result/pdf"),
765
+ headers=self._client_wrapper.get_headers(),
766
+ timeout=60,
767
+ )
768
+ if 200 <= _response.status_code < 300:
769
+ return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
770
+ if _response.status_code == 422:
771
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
772
+ try:
773
+ _response_json = _response.json()
774
+ except JSONDecodeError:
775
+ raise ApiError(status_code=_response.status_code, body=_response.text)
776
+ raise ApiError(status_code=_response.status_code, body=_response_json)
777
+
778
+ def get_job_raw_text_result_raw_pdf(self, job_id: str) -> typing.Any:
779
+ """
780
+ Get a job by id
781
+
782
+ Parameters:
783
+ - job_id: str.
784
+ ---
785
+ from llama_cloud.client import LlamaCloud
786
+
787
+ client = LlamaCloud(
788
+ token="YOUR_TOKEN",
789
+ )
790
+ client.parsing.get_job_raw_text_result_raw_pdf(
791
+ job_id="string",
792
+ )
793
+ """
728
794
  _response = self._client_wrapper.httpx_client.request(
729
795
  "GET",
730
796
  urllib.parse.urljoin(
@@ -835,6 +901,38 @@ class ParsingClient:
835
901
  job_id="string",
836
902
  )
837
903
  """
904
+ _response = self._client_wrapper.httpx_client.request(
905
+ "GET",
906
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/parsing/job/{job_id}/result/xlsx"),
907
+ headers=self._client_wrapper.get_headers(),
908
+ timeout=60,
909
+ )
910
+ if 200 <= _response.status_code < 300:
911
+ return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
912
+ if _response.status_code == 422:
913
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
914
+ try:
915
+ _response_json = _response.json()
916
+ except JSONDecodeError:
917
+ raise ApiError(status_code=_response.status_code, body=_response.text)
918
+ raise ApiError(status_code=_response.status_code, body=_response_json)
919
+
920
+ def get_job_raw_xlsx_result_raw(self, job_id: str) -> typing.Any:
921
+ """
922
+ Get a job by id
923
+
924
+ Parameters:
925
+ - job_id: str.
926
+ ---
927
+ from llama_cloud.client import LlamaCloud
928
+
929
+ client = LlamaCloud(
930
+ token="YOUR_TOKEN",
931
+ )
932
+ client.parsing.get_job_raw_xlsx_result_raw(
933
+ job_id="string",
934
+ )
935
+ """
838
936
  _response = self._client_wrapper.httpx_client.request(
839
937
  "GET",
840
938
  urllib.parse.urljoin(
@@ -1745,6 +1843,40 @@ class AsyncParsingClient:
1745
1843
  raise ApiError(status_code=_response.status_code, body=_response.text)
1746
1844
  raise ApiError(status_code=_response.status_code, body=_response_json)
1747
1845
 
1846
+ async def get_job_raw_text_result_raw(self, job_id: str) -> typing.Any:
1847
+ """
1848
+ Get a job by id
1849
+
1850
+ Parameters:
1851
+ - job_id: str.
1852
+ ---
1853
+ from llama_cloud.client import AsyncLlamaCloud
1854
+
1855
+ client = AsyncLlamaCloud(
1856
+ token="YOUR_TOKEN",
1857
+ )
1858
+ await client.parsing.get_job_raw_text_result_raw(
1859
+ job_id="string",
1860
+ )
1861
+ """
1862
+ _response = await self._client_wrapper.httpx_client.request(
1863
+ "GET",
1864
+ urllib.parse.urljoin(
1865
+ f"{self._client_wrapper.get_base_url()}/", f"api/v1/parsing/job/{job_id}/result/raw/text"
1866
+ ),
1867
+ headers=self._client_wrapper.get_headers(),
1868
+ timeout=60,
1869
+ )
1870
+ if 200 <= _response.status_code < 300:
1871
+ return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
1872
+ if _response.status_code == 422:
1873
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
1874
+ try:
1875
+ _response_json = _response.json()
1876
+ except JSONDecodeError:
1877
+ raise ApiError(status_code=_response.status_code, body=_response.text)
1878
+ raise ApiError(status_code=_response.status_code, body=_response_json)
1879
+
1748
1880
  async def get_job_raw_text_result(self, job_id: str) -> typing.Any:
1749
1881
  """
1750
1882
  Get a job by id
@@ -1761,6 +1893,38 @@ class AsyncParsingClient:
1761
1893
  job_id="string",
1762
1894
  )
1763
1895
  """
1896
+ _response = await self._client_wrapper.httpx_client.request(
1897
+ "GET",
1898
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/parsing/job/{job_id}/result/pdf"),
1899
+ headers=self._client_wrapper.get_headers(),
1900
+ timeout=60,
1901
+ )
1902
+ if 200 <= _response.status_code < 300:
1903
+ return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
1904
+ if _response.status_code == 422:
1905
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
1906
+ try:
1907
+ _response_json = _response.json()
1908
+ except JSONDecodeError:
1909
+ raise ApiError(status_code=_response.status_code, body=_response.text)
1910
+ raise ApiError(status_code=_response.status_code, body=_response_json)
1911
+
1912
+ async def get_job_raw_text_result_raw_pdf(self, job_id: str) -> typing.Any:
1913
+ """
1914
+ Get a job by id
1915
+
1916
+ Parameters:
1917
+ - job_id: str.
1918
+ ---
1919
+ from llama_cloud.client import AsyncLlamaCloud
1920
+
1921
+ client = AsyncLlamaCloud(
1922
+ token="YOUR_TOKEN",
1923
+ )
1924
+ await client.parsing.get_job_raw_text_result_raw_pdf(
1925
+ job_id="string",
1926
+ )
1927
+ """
1764
1928
  _response = await self._client_wrapper.httpx_client.request(
1765
1929
  "GET",
1766
1930
  urllib.parse.urljoin(
@@ -1871,6 +2035,38 @@ class AsyncParsingClient:
1871
2035
  job_id="string",
1872
2036
  )
1873
2037
  """
2038
+ _response = await self._client_wrapper.httpx_client.request(
2039
+ "GET",
2040
+ urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/v1/parsing/job/{job_id}/result/xlsx"),
2041
+ headers=self._client_wrapper.get_headers(),
2042
+ timeout=60,
2043
+ )
2044
+ if 200 <= _response.status_code < 300:
2045
+ return pydantic.parse_obj_as(typing.Any, _response.json()) # type: ignore
2046
+ if _response.status_code == 422:
2047
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
2048
+ try:
2049
+ _response_json = _response.json()
2050
+ except JSONDecodeError:
2051
+ raise ApiError(status_code=_response.status_code, body=_response.text)
2052
+ raise ApiError(status_code=_response.status_code, body=_response_json)
2053
+
2054
+ async def get_job_raw_xlsx_result_raw(self, job_id: str) -> typing.Any:
2055
+ """
2056
+ Get a job by id
2057
+
2058
+ Parameters:
2059
+ - job_id: str.
2060
+ ---
2061
+ from llama_cloud.client import AsyncLlamaCloud
2062
+
2063
+ client = AsyncLlamaCloud(
2064
+ token="YOUR_TOKEN",
2065
+ )
2066
+ await client.parsing.get_job_raw_xlsx_result_raw(
2067
+ job_id="string",
2068
+ )
2069
+ """
1874
2070
  _response = await self._client_wrapper.httpx_client.request(
1875
2071
  "GET",
1876
2072
  urllib.parse.urljoin(
@@ -172,6 +172,7 @@ from .job_record_parameters import (
172
172
  from .job_record_with_usage_metrics import JobRecordWithUsageMetrics
173
173
  from .l_lama_parse_transform_config import LLamaParseTransformConfig
174
174
  from .legacy_parse_job_config import LegacyParseJobConfig
175
+ from .license_info_response import LicenseInfoResponse
175
176
  from .llama_extract_settings import LlamaExtractSettings
176
177
  from .llama_index_core_base_llms_types_chat_message import LlamaIndexCoreBaseLlmsTypesChatMessage
177
178
  from .llama_index_core_base_llms_types_chat_message_blocks_item import (
@@ -353,6 +354,8 @@ from .validation_error_loc_item import ValidationErrorLocItem
353
354
  from .vertex_ai_embedding_config import VertexAiEmbeddingConfig
354
355
  from .vertex_embedding_mode import VertexEmbeddingMode
355
356
  from .vertex_text_embedding import VertexTextEmbedding
357
+ from .webhook_configuration import WebhookConfiguration
358
+ from .webhook_configuration_webhook_events_item import WebhookConfigurationWebhookEventsItem
356
359
 
357
360
  __all__ = [
358
361
  "AdvancedModeTransformConfig",
@@ -517,6 +520,7 @@ __all__ = [
517
520
  "JobRecordWithUsageMetrics",
518
521
  "LLamaParseTransformConfig",
519
522
  "LegacyParseJobConfig",
523
+ "LicenseInfoResponse",
520
524
  "LlamaExtractSettings",
521
525
  "LlamaIndexCoreBaseLlmsTypesChatMessage",
522
526
  "LlamaIndexCoreBaseLlmsTypesChatMessageBlocksItem",
@@ -686,4 +690,6 @@ __all__ = [
686
690
  "VertexAiEmbeddingConfig",
687
691
  "VertexEmbeddingMode",
688
692
  "VertexTextEmbedding",
693
+ "WebhookConfiguration",
694
+ "WebhookConfigurationWebhookEventsItem",
689
695
  ]
@@ -6,6 +6,7 @@ import typing
6
6
  from ..core.datetime_utils import serialize_datetime
7
7
  from .extract_config import ExtractConfig
8
8
  from .extract_job_create_data_schema_override import ExtractJobCreateDataSchemaOverride
9
+ from .webhook_configuration import WebhookConfiguration
9
10
 
10
11
  try:
11
12
  import pydantic
@@ -21,6 +22,7 @@ class ExtractJobCreate(pydantic.BaseModel):
21
22
  Schema for creating an extraction job.
22
23
  """
23
24
 
25
+ webhook_configurations: typing.Optional[typing.List[WebhookConfiguration]]
24
26
  extraction_agent_id: str = pydantic.Field(description="The id of the extraction agent")
25
27
  file_id: str = pydantic.Field(description="The id of the file")
26
28
  data_schema_override: typing.Optional[ExtractJobCreateDataSchemaOverride] = pydantic.Field(
@@ -14,7 +14,7 @@ class ExtractModels(str, enum.Enum):
14
14
  O_3_MINI = "o3-mini"
15
15
  GEMINI_25_FLASH = "gemini-2.5-flash"
16
16
  GEMINI_25_PRO = "gemini-2.5-pro"
17
- GEMINI_25_FLASH_LITE_001 = "gemini-2.5-flash-lite-001"
17
+ GEMINI_25_FLASH_LITE_PREVIEW_0617 = "gemini-2.5-flash-lite-preview-06-17"
18
18
  GPT_4_O = "gpt-4o"
19
19
  GPT_4_O_MINI = "gpt-4o-mini"
20
20
 
@@ -27,7 +27,7 @@ class ExtractModels(str, enum.Enum):
27
27
  o_3_mini: typing.Callable[[], T_Result],
28
28
  gemini_25_flash: typing.Callable[[], T_Result],
29
29
  gemini_25_pro: typing.Callable[[], T_Result],
30
- gemini_25_flash_lite_001: typing.Callable[[], T_Result],
30
+ gemini_25_flash_lite_preview_0617: typing.Callable[[], T_Result],
31
31
  gpt_4_o: typing.Callable[[], T_Result],
32
32
  gpt_4_o_mini: typing.Callable[[], T_Result],
33
33
  ) -> T_Result:
@@ -45,8 +45,8 @@ class ExtractModels(str, enum.Enum):
45
45
  return gemini_25_flash()
46
46
  if self is ExtractModels.GEMINI_25_PRO:
47
47
  return gemini_25_pro()
48
- if self is ExtractModels.GEMINI_25_FLASH_LITE_001:
49
- return gemini_25_flash_lite_001()
48
+ if self is ExtractModels.GEMINI_25_FLASH_LITE_PREVIEW_0617:
49
+ return gemini_25_flash_lite_preview_0617()
50
50
  if self is ExtractModels.GPT_4_O:
51
51
  return gpt_4_o()
52
52
  if self is ExtractModels.GPT_4_O_MINI:
@@ -7,6 +7,7 @@ from ..core.datetime_utils import serialize_datetime
7
7
  from .job_names import JobNames
8
8
  from .job_record_parameters import JobRecordParameters
9
9
  from .status_enum import StatusEnum
10
+ from .webhook_configuration import WebhookConfiguration
10
11
 
11
12
  try:
12
13
  import pydantic
@@ -22,6 +23,7 @@ class JobRecord(pydantic.BaseModel):
22
23
  Schema for a job's metadata.
23
24
  """
24
25
 
26
+ webhook_configurations: typing.Optional[typing.List[WebhookConfiguration]]
25
27
  job_name: JobNames = pydantic.Field(description="The name of the job.")
26
28
  partitions: typing.Dict[str, str] = pydantic.Field(
27
29
  description="The partitions for this execution. Used for determining where to save job output."
@@ -0,0 +1,34 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+
8
+ try:
9
+ import pydantic
10
+ if pydantic.__version__.startswith("1."):
11
+ raise ImportError
12
+ import pydantic.v1 as pydantic # type: ignore
13
+ except ImportError:
14
+ import pydantic # type: ignore
15
+
16
+
17
+ class LicenseInfoResponse(pydantic.BaseModel):
18
+ status: str = pydantic.Field(description="License validation status")
19
+ expires_at: dt.datetime = pydantic.Field(description="License expiration date")
20
+ scopes: typing.Optional[typing.List[str]]
21
+ message: typing.Optional[str]
22
+
23
+ def json(self, **kwargs: typing.Any) -> str:
24
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
25
+ return super().json(**kwargs_with_defaults)
26
+
27
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
29
+ return super().dict(**kwargs_with_defaults)
30
+
31
+ class Config:
32
+ frozen = True
33
+ smart_union = True
34
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,38 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from .webhook_configuration_webhook_events_item import WebhookConfigurationWebhookEventsItem
8
+
9
+ try:
10
+ import pydantic
11
+ if pydantic.__version__.startswith("1."):
12
+ raise ImportError
13
+ import pydantic.v1 as pydantic # type: ignore
14
+ except ImportError:
15
+ import pydantic # type: ignore
16
+
17
+
18
+ class WebhookConfiguration(pydantic.BaseModel):
19
+ """
20
+ Allows the user to configure webhook options for notifications and callbacks.
21
+ """
22
+
23
+ webhook_url: typing.Optional[str]
24
+ webhook_headers: typing.Optional[typing.Dict[str, typing.Optional[str]]]
25
+ webhook_events: typing.Optional[typing.List[WebhookConfigurationWebhookEventsItem]]
26
+
27
+ def json(self, **kwargs: typing.Any) -> str:
28
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
29
+ return super().json(**kwargs_with_defaults)
30
+
31
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
33
+ return super().dict(**kwargs_with_defaults)
34
+
35
+ class Config:
36
+ frozen = True
37
+ smart_union = True
38
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,37 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import enum
4
+ import typing
5
+
6
+ T_Result = typing.TypeVar("T_Result")
7
+
8
+
9
+ class WebhookConfigurationWebhookEventsItem(str, enum.Enum):
10
+ EXTRACT_PENDING = "extract.pending"
11
+ EXTRACT_SUCCESS = "extract.success"
12
+ EXTRACT_ERROR = "extract.error"
13
+ EXTRACT_PARTIAL_SUCCESS = "extract.partial_success"
14
+ EXTRACT_CANCELLED = "extract.cancelled"
15
+ UNMAPPED_EVENT = "unmapped_event"
16
+
17
+ def visit(
18
+ self,
19
+ extract_pending: typing.Callable[[], T_Result],
20
+ extract_success: typing.Callable[[], T_Result],
21
+ extract_error: typing.Callable[[], T_Result],
22
+ extract_partial_success: typing.Callable[[], T_Result],
23
+ extract_cancelled: typing.Callable[[], T_Result],
24
+ unmapped_event: typing.Callable[[], T_Result],
25
+ ) -> T_Result:
26
+ if self is WebhookConfigurationWebhookEventsItem.EXTRACT_PENDING:
27
+ return extract_pending()
28
+ if self is WebhookConfigurationWebhookEventsItem.EXTRACT_SUCCESS:
29
+ return extract_success()
30
+ if self is WebhookConfigurationWebhookEventsItem.EXTRACT_ERROR:
31
+ return extract_error()
32
+ if self is WebhookConfigurationWebhookEventsItem.EXTRACT_PARTIAL_SUCCESS:
33
+ return extract_partial_success()
34
+ if self is WebhookConfigurationWebhookEventsItem.EXTRACT_CANCELLED:
35
+ return extract_cancelled()
36
+ if self is WebhookConfigurationWebhookEventsItem.UNMAPPED_EVENT:
37
+ return unmapped_event()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: llama-cloud
3
- Version: 0.1.28
3
+ Version: 0.1.29
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: Logan Markewich
@@ -1,5 +1,5 @@
1
- llama_cloud/__init__.py,sha256=TqirQSbwkbQBWfNbyfJcfLmOKhrzQi5Y9rTYQdfU7_M,25063
2
- llama_cloud/client.py,sha256=w2iEUQwY6Etv9hiKMClDUgUbqVxODbbGDiEPyWYzih0,5921
1
+ llama_cloud/__init__.py,sha256=c0hb7KN6meETe4lv8VSgTlArJ8oMq507m4k33Wy3M1Q,25281
2
+ llama_cloud/client.py,sha256=ylV-19129KufjzRDCoH4yARObhdUxc9vLL4kV-7fIck,6132
3
3
  llama_cloud/core/__init__.py,sha256=QJS3CJ2TYP2E1Tge0CS6Z7r8LTNzJHQVX1hD3558eP0,519
4
4
  llama_cloud/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
5
5
  llama_cloud/core/client_wrapper.py,sha256=xmj0jCdQ0ySzbSqHUWOkpRRy069y74I_HuXkWltcsVM,1507
@@ -9,7 +9,9 @@ llama_cloud/core/remove_none_from_dict.py,sha256=8m91FC3YuVem0Gm9_sXhJ2tGvP33owJ
9
9
  llama_cloud/environment.py,sha256=feTjOebeFZMrBdnHat4RE5aHlpt-sJm4NhK4ntV1htI,167
10
10
  llama_cloud/errors/__init__.py,sha256=pbbVUFtB9LCocA1RMWMMF_RKjsy5YkOKX5BAuE49w6g,170
11
11
  llama_cloud/errors/unprocessable_entity_error.py,sha256=FvR7XPlV3Xx5nu8HNlmLhBRdk4so_gCHjYT5PyZe6sM,313
12
- llama_cloud/resources/__init__.py,sha256=WtzoiLY722OAdGMyJsuL_uVwZ39pYwihN947K98NJSw,4187
12
+ llama_cloud/resources/__init__.py,sha256=n3hSlo3KQatoFhDLk7Vm_hB_5lzh70T0S2r3cSpDWec,4211
13
+ llama_cloud/resources/admin/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
14
+ llama_cloud/resources/admin/client.py,sha256=mzA_ezCjugKNmvWCMWEF0Z0k86ErACWov1VtPV1J2tU,3678
13
15
  llama_cloud/resources/beta/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
14
16
  llama_cloud/resources/beta/client.py,sha256=mfqHAPWQEZwZM0LRYkia36EFdGrU2sZ_Y-MM1JU_0Yg,14966
15
17
  llama_cloud/resources/chat_apps/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
@@ -53,7 +55,7 @@ llama_cloud/resources/llama_extract/types/extract_schema_validate_request_data_s
53
55
  llama_cloud/resources/organizations/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
54
56
  llama_cloud/resources/organizations/client.py,sha256=CdrdNdB9R-bOsNqZ4Jbm1BzG1RafXMFjuCsrVYf2OrE,56567
55
57
  llama_cloud/resources/parsing/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
56
- llama_cloud/resources/parsing/client.py,sha256=DcJKn3bJHQqjDBeMTXbCtarG_49TkbSjWNYJoxvF31A,78701
58
+ llama_cloud/resources/parsing/client.py,sha256=qVYN7dFAXiGTrSyZPoM-aMsHtVDuRjcgR2skjhc1bTY,86271
57
59
  llama_cloud/resources/pipelines/__init__.py,sha256=zyvVEOF_krvEZkCIj_kZoMKfhDqHo_R32a1mv9CriQc,1193
58
60
  llama_cloud/resources/pipelines/client.py,sha256=BcBqzTPu1LUsdimXvuaaKjUu6w5xjbL-ZBfWsO183Vk,132360
59
61
  llama_cloud/resources/pipelines/types/__init__.py,sha256=C68NQ5QzA0dFXf9oePFFGmV1vn96jcAp-QAznSgoRYQ,1375
@@ -71,7 +73,7 @@ llama_cloud/resources/responses/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_
71
73
  llama_cloud/resources/responses/client.py,sha256=ard4U9yZcD89pJ_hyYqeRDIfQYaX2WGl36OK7re8q3U,5481
72
74
  llama_cloud/resources/retrievers/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
73
75
  llama_cloud/resources/retrievers/client.py,sha256=z2LhmA-cZVFzr9P6loeCZYnJbvSIk0QitFeVFp-IyZk,32126
74
- llama_cloud/types/__init__.py,sha256=Do3j-jdXSzyguuoeC1901NSU1w5Nhfx1iTsf-uuNapk,29775
76
+ llama_cloud/types/__init__.py,sha256=tXFGxcZWipC_PE9wpPgtXWvtcHbT0VnZCQSP4jNo-H8,30079
75
77
  llama_cloud/types/advanced_mode_transform_config.py,sha256=4xCXye0_cPmVS1F8aNTx81sIaEPjQH9kiCCAIoqUzlI,1502
76
78
  llama_cloud/types/advanced_mode_transform_config_chunking_config.py,sha256=wYbJnWLpeQDfhmDZz-wJfYzD1iGT5Jcxb9ga3mzUuvk,1983
77
79
  llama_cloud/types/advanced_mode_transform_config_segmentation_config.py,sha256=anNGq0F5-IlbIW3kpC8OilzLJnUq5tdIcWHnRnmlYsg,1303
@@ -155,11 +157,11 @@ llama_cloud/types/extract_agent_data_schema_value.py,sha256=UaDQ2KjajLDccW7F4NKd
155
157
  llama_cloud/types/extract_config.py,sha256=pYErVV6Lq4VteqO3Wxu4exCfiGnJ9_aqSuXiLuNI6JE,2194
156
158
  llama_cloud/types/extract_config_priority.py,sha256=btl5lxl25Ve6_lTbQzQyjOKle8XoY0r16lk3364c3uw,795
157
159
  llama_cloud/types/extract_job.py,sha256=Yx4fDdCdylAji2LPTwqflVpz1o9slpj9tTLS93-1tzU,1431
158
- llama_cloud/types/extract_job_create.py,sha256=UK1mBIKyflo7e6m1MxMN95pLscj67jH_yvs8EvmBXqU,1545
160
+ llama_cloud/types/extract_job_create.py,sha256=yLtrh46fsK8Q2_hz8Ub3mvGriSn5BI2OjjwpWRy5YsA,1680
159
161
  llama_cloud/types/extract_job_create_data_schema_override.py,sha256=vuiJ2lGJjbXEnvFKzVnKyvgwhMXPg1Pb5GZne2DrB60,330
160
162
  llama_cloud/types/extract_job_create_data_schema_override_zero_value.py,sha256=HHEYxOSQXXyBYOiUQg_qwfQtXFj-OtThMwbUDBIgZU0,223
161
163
  llama_cloud/types/extract_mode.py,sha256=DwTMzDq3HHJop_fxQelHEE_k8UcdDz-W_v_Oj2WWXLk,931
162
- llama_cloud/types/extract_models.py,sha256=fEpKSKYy1pGjektTt7JgNyAIYPvpZV05D6bR0VJ--BQ,1912
164
+ llama_cloud/types/extract_models.py,sha256=tx4NquIoJ4irXncqRUjnuE542nPu5jMuzy-ZaMdg3PI,1958
163
165
  llama_cloud/types/extract_resultset.py,sha256=Alje0YQJUiA_aKi0hQs7TAnhDmZuQ_yL9b6HCNYBFQg,1627
164
166
  llama_cloud/types/extract_resultset_data.py,sha256=v9Ae4SxLsvYPE9crko4N16lBjsxuZpz1yrUOhnaM_VY,427
165
167
  llama_cloud/types/extract_resultset_data_item_value.py,sha256=JwqgDIGW0irr8QWaSTIrl24FhGxTUDOXIbxoSdIjuxs,209
@@ -198,11 +200,12 @@ llama_cloud/types/ingestion_error_response.py,sha256=8u0cyT44dnpkNeUKemTvJMUqi_W
198
200
  llama_cloud/types/input_message.py,sha256=H7XMpGjkk7f9Fgz4YuuD9OBpNDR68lnP91LxCP1R-Vw,1433
199
201
  llama_cloud/types/job_name_mapping.py,sha256=2dQFQlVHoeSlkyEKSEJv0M3PzJf7hMvkuABj3vMY7ys,1617
200
202
  llama_cloud/types/job_names.py,sha256=WacongwoJygg_gCyYjPsOVv3cmVtRaX633JNgFxy-d8,3915
201
- llama_cloud/types/job_record.py,sha256=7hdDPZU11EG8g6_9iq6vy-zqLEryeC7i8fZ-CkUB_xQ,2084
203
+ llama_cloud/types/job_record.py,sha256=Z6sF9AruZJo-kTRgNufAWS3WK1yaEqop6kox1GpBYy4,2219
202
204
  llama_cloud/types/job_record_parameters.py,sha256=Oqxp5y0owPfjLc_NR7AYE8P3zM2PJo36N9olbyNl7AA,3425
203
205
  llama_cloud/types/job_record_with_usage_metrics.py,sha256=iNV2do5TB_0e3PoOz_DJyAaM6Cn9G8KG-dGPGgEs5SY,1198
204
206
  llama_cloud/types/l_lama_parse_transform_config.py,sha256=YQRJZvKh1Ee2FUyW_N0nqYJoW599qBgH3JCH9SH6YLo,1249
205
207
  llama_cloud/types/legacy_parse_job_config.py,sha256=9NdRkGkUhDkJBMDBvBDmhq_Mkf6bSROrtECVpttlD8k,11878
208
+ llama_cloud/types/license_info_response.py,sha256=fE9vcWO8k92SBqb_wOyBu_16C61s72utA-SifEi9iBc,1192
206
209
  llama_cloud/types/llama_extract_settings.py,sha256=bHtF5AD0r896-248e7WKthcbbvrAUdptZrENP2Ed4LM,2388
207
210
  llama_cloud/types/llama_index_core_base_llms_types_chat_message.py,sha256=tF54vcCwjArHWozzC81bCZfI4gJBmhnx6s592VoQ5UM,1452
208
211
  llama_cloud/types/llama_index_core_base_llms_types_chat_message_blocks_item.py,sha256=-aL8fh-w2Xf4uQs_LHzb3q6LL_onLAcVzCR5yMI4qJw,1571
@@ -349,7 +352,9 @@ llama_cloud/types/validation_error_loc_item.py,sha256=LAtjCHIllWRBFXvAZ5QZpp7CPX
349
352
  llama_cloud/types/vertex_ai_embedding_config.py,sha256=DvQk2xMJFmo54MEXTzoM4KSADyhGm_ygmFyx6wIcQdw,1159
350
353
  llama_cloud/types/vertex_embedding_mode.py,sha256=yY23FjuWU_DkXjBb3JoKV4SCMqel2BaIMltDqGnIowU,1217
351
354
  llama_cloud/types/vertex_text_embedding.py,sha256=-C4fNCYfFl36ATdBMGFVPpiHIKxjk0KB1ERA2Ec20aU,1932
352
- llama_cloud-0.1.28.dist-info/LICENSE,sha256=_iNqtPcw1Ue7dZKwOwgPtbegMUkWVy15hC7bffAdNmY,1067
353
- llama_cloud-0.1.28.dist-info/METADATA,sha256=MSCraB3qzujrmYLn7JP_qCCEnMyz-vSGOIhQGHKljSw,1194
354
- llama_cloud-0.1.28.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
355
- llama_cloud-0.1.28.dist-info/RECORD,,
355
+ llama_cloud/types/webhook_configuration.py,sha256=_Xm15whrWoKNBuCoO5y_NunA-ByhCAYK87LnC4W-Pzg,1350
356
+ llama_cloud/types/webhook_configuration_webhook_events_item.py,sha256=LTfOwphnoYUQYwsHGTlCxoVU_PseIRAbmQJRBdyXnbg,1519
357
+ llama_cloud-0.1.29.dist-info/LICENSE,sha256=_iNqtPcw1Ue7dZKwOwgPtbegMUkWVy15hC7bffAdNmY,1067
358
+ llama_cloud-0.1.29.dist-info/METADATA,sha256=6yOwKuEn6gMPGcWviE_L-LI5gY4g5n4bAB0PUZQINLc,1194
359
+ llama_cloud-0.1.29.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
360
+ llama_cloud-0.1.29.dist-info/RECORD,,