llama-cloud 0.0.2__py3-none-any.whl → 0.0.4__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.

Files changed (104) hide show
  1. llama_cloud/__init__.py +2 -0
  2. llama_cloud/client.py +16 -4
  3. llama_cloud/core/jsonable_encoder.py +3 -0
  4. llama_cloud/environment.py +7 -0
  5. llama_cloud/resources/api_keys/client.py +11 -16
  6. llama_cloud/resources/billing/client.py +9 -12
  7. llama_cloud/resources/component_definitions/client.py +9 -12
  8. llama_cloud/resources/data_sinks/client.py +21 -30
  9. llama_cloud/resources/data_sources/client.py +21 -30
  10. llama_cloud/resources/deprecated/client.py +27 -48
  11. llama_cloud/resources/evals/client.py +27 -44
  12. llama_cloud/resources/files/client.py +15 -24
  13. llama_cloud/resources/parsing/client.py +27 -48
  14. llama_cloud/resources/pipelines/client.py +73 -128
  15. llama_cloud/resources/projects/client.py +43 -72
  16. llama_cloud/types/api_key.py +3 -0
  17. llama_cloud/types/azure_open_ai_embedding.py +3 -0
  18. llama_cloud/types/base.py +3 -0
  19. llama_cloud/types/base_prompt_template.py +3 -0
  20. llama_cloud/types/bedrock_embedding.py +3 -0
  21. llama_cloud/types/chat_message.py +3 -0
  22. llama_cloud/types/cloud_az_storage_blob_data_source.py +3 -0
  23. llama_cloud/types/cloud_chroma_vector_store.py +3 -0
  24. llama_cloud/types/cloud_document.py +3 -0
  25. llama_cloud/types/cloud_document_create.py +3 -0
  26. llama_cloud/types/cloud_gcs_data_source.py +3 -0
  27. llama_cloud/types/cloud_google_drive_data_source.py +3 -0
  28. llama_cloud/types/cloud_one_drive_data_source.py +3 -0
  29. llama_cloud/types/cloud_pinecone_vector_store.py +3 -0
  30. llama_cloud/types/cloud_postgres_vector_store.py +3 -0
  31. llama_cloud/types/cloud_qdrant_vector_store.py +3 -0
  32. llama_cloud/types/cloud_s_3_data_source.py +3 -0
  33. llama_cloud/types/cloud_sharepoint_data_source.py +3 -0
  34. llama_cloud/types/cloud_weaviate_vector_store.py +3 -0
  35. llama_cloud/types/code_splitter.py +3 -0
  36. llama_cloud/types/cohere_embedding.py +3 -0
  37. llama_cloud/types/configurable_transformation_definition.py +3 -0
  38. llama_cloud/types/configured_transformation_item.py +3 -0
  39. llama_cloud/types/data_sink.py +3 -0
  40. llama_cloud/types/data_sink_create.py +3 -0
  41. llama_cloud/types/data_sink_definition.py +3 -0
  42. llama_cloud/types/data_source.py +3 -0
  43. llama_cloud/types/data_source_create.py +3 -0
  44. llama_cloud/types/data_source_definition.py +3 -0
  45. llama_cloud/types/eval_dataset.py +3 -0
  46. llama_cloud/types/eval_dataset_job_params.py +3 -0
  47. llama_cloud/types/eval_dataset_job_record.py +3 -0
  48. llama_cloud/types/eval_execution_params.py +3 -0
  49. llama_cloud/types/eval_execution_params_override.py +3 -0
  50. llama_cloud/types/eval_llm_model_data.py +3 -0
  51. llama_cloud/types/eval_question.py +3 -0
  52. llama_cloud/types/eval_question_create.py +3 -0
  53. llama_cloud/types/eval_question_result.py +3 -0
  54. llama_cloud/types/file.py +3 -0
  55. llama_cloud/types/gemini_embedding.py +3 -0
  56. llama_cloud/types/html_node_parser.py +3 -0
  57. llama_cloud/types/http_validation_error.py +3 -0
  58. llama_cloud/types/hugging_face_inference_api_embedding.py +3 -0
  59. llama_cloud/types/json_node_parser.py +3 -0
  60. llama_cloud/types/llm.py +3 -0
  61. llama_cloud/types/local_eval.py +3 -0
  62. llama_cloud/types/local_eval_results.py +3 -0
  63. llama_cloud/types/local_eval_sets.py +3 -0
  64. llama_cloud/types/markdown_element_node_parser.py +3 -0
  65. llama_cloud/types/markdown_node_parser.py +3 -0
  66. llama_cloud/types/metadata_filter.py +3 -0
  67. llama_cloud/types/metadata_filters.py +3 -0
  68. llama_cloud/types/metric_result.py +3 -0
  69. llama_cloud/types/node_parser.py +3 -0
  70. llama_cloud/types/open_ai_embedding.py +3 -0
  71. llama_cloud/types/parsing_history_item.py +3 -0
  72. llama_cloud/types/parsing_job.py +3 -0
  73. llama_cloud/types/parsing_job_json_result.py +3 -0
  74. llama_cloud/types/parsing_job_markdown_result.py +3 -0
  75. llama_cloud/types/parsing_job_text_result.py +3 -0
  76. llama_cloud/types/parsing_usage.py +3 -0
  77. llama_cloud/types/pipeline.py +3 -0
  78. llama_cloud/types/pipeline_create.py +3 -0
  79. llama_cloud/types/pipeline_data_source.py +3 -0
  80. llama_cloud/types/pipeline_data_source_create.py +3 -0
  81. llama_cloud/types/pipeline_deployment.py +3 -0
  82. llama_cloud/types/pipeline_file.py +3 -0
  83. llama_cloud/types/pipeline_file_create.py +3 -0
  84. llama_cloud/types/pipeline_file_status_response.py +3 -0
  85. llama_cloud/types/preset_retrieval_params.py +3 -0
  86. llama_cloud/types/presigned_url.py +3 -0
  87. llama_cloud/types/project.py +3 -0
  88. llama_cloud/types/project_create.py +3 -0
  89. llama_cloud/types/prompt_mixin_prompts.py +3 -0
  90. llama_cloud/types/prompt_spec.py +3 -0
  91. llama_cloud/types/related_node_info.py +3 -0
  92. llama_cloud/types/retrieve_results.py +3 -0
  93. llama_cloud/types/sentence_splitter.py +3 -0
  94. llama_cloud/types/simple_file_node_parser.py +3 -0
  95. llama_cloud/types/supported_eval_llm_model.py +3 -0
  96. llama_cloud/types/text_node.py +3 -0
  97. llama_cloud/types/text_node_with_score.py +3 -0
  98. llama_cloud/types/token_text_splitter.py +3 -0
  99. llama_cloud/types/validation_error.py +3 -0
  100. {llama_cloud-0.0.2.dist-info → llama_cloud-0.0.4.dist-info}/METADATA +1 -1
  101. llama_cloud-0.0.4.dist-info/RECORD +174 -0
  102. llama_cloud-0.0.2.dist-info/RECORD +0 -173
  103. {llama_cloud-0.0.2.dist-info → llama_cloud-0.0.4.dist-info}/LICENSE +0 -0
  104. {llama_cloud-0.0.2.dist-info → llama_cloud-0.0.4.dist-info}/WHEEL +0 -0
@@ -15,6 +15,9 @@ from ...types.http_validation_error import HttpValidationError
15
15
  from ...types.supported_eval_llm_model import SupportedEvalLlmModel
16
16
 
17
17
  try:
18
+ import pydantic
19
+ if pydantic.__version__.startswith("1."):
20
+ raise ImportError
18
21
  import pydantic.v1 as pydantic # type: ignore
19
22
  except ImportError:
20
23
  import pydantic # type: ignore
@@ -34,11 +37,10 @@ class EvalsClient:
34
37
  Parameters:
35
38
  - dataset_id: str.
36
39
  ---
37
- from platform.client import LlamaCloud
40
+ from llama_cloud.client import LlamaCloud
38
41
 
39
42
  client = LlamaCloud(
40
43
  token="YOUR_TOKEN",
41
- base_url="https://yourhost.com/path/to/api",
42
44
  )
43
45
  client.evals.get_dataset(
44
46
  dataset_id="string",
@@ -69,11 +71,10 @@ class EvalsClient:
69
71
 
70
72
  - name: str. The name of the EvalDataset.
71
73
  ---
72
- from platform.client import LlamaCloud
74
+ from llama_cloud.client import LlamaCloud
73
75
 
74
76
  client = LlamaCloud(
75
77
  token="YOUR_TOKEN",
76
- base_url="https://yourhost.com/path/to/api",
77
78
  )
78
79
  client.evals.update_dataset(
79
80
  dataset_id="string",
@@ -104,11 +105,10 @@ class EvalsClient:
104
105
  Parameters:
105
106
  - dataset_id: str.
106
107
  ---
107
- from platform.client import LlamaCloud
108
+ from llama_cloud.client import LlamaCloud
108
109
 
109
110
  client = LlamaCloud(
110
111
  token="YOUR_TOKEN",
111
- base_url="https://yourhost.com/path/to/api",
112
112
  )
113
113
  client.evals.delete_dataset(
114
114
  dataset_id="string",
@@ -137,11 +137,10 @@ class EvalsClient:
137
137
  Parameters:
138
138
  - dataset_id: str.
139
139
  ---
140
- from platform.client import LlamaCloud
140
+ from llama_cloud.client import LlamaCloud
141
141
 
142
142
  client = LlamaCloud(
143
143
  token="YOUR_TOKEN",
144
- base_url="https://yourhost.com/path/to/api",
145
144
  )
146
145
  client.evals.get_questions(
147
146
  dataset_id="string",
@@ -174,12 +173,11 @@ class EvalsClient:
174
173
 
175
174
  - request: EvalQuestionCreate.
176
175
  ---
177
- from platform import EvalQuestionCreate
178
- from platform.client import LlamaCloud
176
+ from llama_cloud import EvalQuestionCreate
177
+ from llama_cloud.client import LlamaCloud
179
178
 
180
179
  client = LlamaCloud(
181
180
  token="YOUR_TOKEN",
182
- base_url="https://yourhost.com/path/to/api",
183
181
  )
184
182
  client.evals.create_question(
185
183
  dataset_id="string",
@@ -218,11 +216,10 @@ class EvalsClient:
218
216
 
219
217
  - request: typing.List[EvalQuestionCreate].
220
218
  ---
221
- from platform.client import LlamaCloud
219
+ from llama_cloud.client import LlamaCloud
222
220
 
223
221
  client = LlamaCloud(
224
222
  token="YOUR_TOKEN",
225
- base_url="https://yourhost.com/path/to/api",
226
223
  )
227
224
  client.evals.create_questions(
228
225
  dataset_id="string",
@@ -255,11 +252,10 @@ class EvalsClient:
255
252
  Parameters:
256
253
  - question_id: str.
257
254
  ---
258
- from platform.client import LlamaCloud
255
+ from llama_cloud.client import LlamaCloud
259
256
 
260
257
  client = LlamaCloud(
261
258
  token="YOUR_TOKEN",
262
- base_url="https://yourhost.com/path/to/api",
263
259
  )
264
260
  client.evals.get_question(
265
261
  question_id="string",
@@ -290,12 +286,11 @@ class EvalsClient:
290
286
 
291
287
  - request: EvalQuestionCreate.
292
288
  ---
293
- from platform import EvalQuestionCreate
294
- from platform.client import LlamaCloud
289
+ from llama_cloud import EvalQuestionCreate
290
+ from llama_cloud.client import LlamaCloud
295
291
 
296
292
  client = LlamaCloud(
297
293
  token="YOUR_TOKEN",
298
- base_url="https://yourhost.com/path/to/api",
299
294
  )
300
295
  client.evals.replace_question(
301
296
  question_id="string",
@@ -328,11 +323,10 @@ class EvalsClient:
328
323
  Parameters:
329
324
  - question_id: str.
330
325
  ---
331
- from platform.client import LlamaCloud
326
+ from llama_cloud.client import LlamaCloud
332
327
 
333
328
  client = LlamaCloud(
334
329
  token="YOUR_TOKEN",
335
- base_url="https://yourhost.com/path/to/api",
336
330
  )
337
331
  client.evals.delete_question(
338
332
  question_id="string",
@@ -359,11 +353,10 @@ class EvalsClient:
359
353
  Get all supported models.
360
354
 
361
355
  ---
362
- from platform.client import LlamaCloud
356
+ from llama_cloud.client import LlamaCloud
363
357
 
364
358
  client = LlamaCloud(
365
359
  token="YOUR_TOKEN",
366
- base_url="https://yourhost.com/path/to/api",
367
360
  )
368
361
  client.evals.get_supported_models()
369
362
  """
@@ -395,11 +388,10 @@ class AsyncEvalsClient:
395
388
  Parameters:
396
389
  - dataset_id: str.
397
390
  ---
398
- from platform.client import AsyncLlamaCloud
391
+ from llama_cloud.client import AsyncLlamaCloud
399
392
 
400
393
  client = AsyncLlamaCloud(
401
394
  token="YOUR_TOKEN",
402
- base_url="https://yourhost.com/path/to/api",
403
395
  )
404
396
  await client.evals.get_dataset(
405
397
  dataset_id="string",
@@ -430,11 +422,10 @@ class AsyncEvalsClient:
430
422
 
431
423
  - name: str. The name of the EvalDataset.
432
424
  ---
433
- from platform.client import AsyncLlamaCloud
425
+ from llama_cloud.client import AsyncLlamaCloud
434
426
 
435
427
  client = AsyncLlamaCloud(
436
428
  token="YOUR_TOKEN",
437
- base_url="https://yourhost.com/path/to/api",
438
429
  )
439
430
  await client.evals.update_dataset(
440
431
  dataset_id="string",
@@ -465,11 +456,10 @@ class AsyncEvalsClient:
465
456
  Parameters:
466
457
  - dataset_id: str.
467
458
  ---
468
- from platform.client import AsyncLlamaCloud
459
+ from llama_cloud.client import AsyncLlamaCloud
469
460
 
470
461
  client = AsyncLlamaCloud(
471
462
  token="YOUR_TOKEN",
472
- base_url="https://yourhost.com/path/to/api",
473
463
  )
474
464
  await client.evals.delete_dataset(
475
465
  dataset_id="string",
@@ -498,11 +488,10 @@ class AsyncEvalsClient:
498
488
  Parameters:
499
489
  - dataset_id: str.
500
490
  ---
501
- from platform.client import AsyncLlamaCloud
491
+ from llama_cloud.client import AsyncLlamaCloud
502
492
 
503
493
  client = AsyncLlamaCloud(
504
494
  token="YOUR_TOKEN",
505
- base_url="https://yourhost.com/path/to/api",
506
495
  )
507
496
  await client.evals.get_questions(
508
497
  dataset_id="string",
@@ -535,12 +524,11 @@ class AsyncEvalsClient:
535
524
 
536
525
  - request: EvalQuestionCreate.
537
526
  ---
538
- from platform import EvalQuestionCreate
539
- from platform.client import AsyncLlamaCloud
527
+ from llama_cloud import EvalQuestionCreate
528
+ from llama_cloud.client import AsyncLlamaCloud
540
529
 
541
530
  client = AsyncLlamaCloud(
542
531
  token="YOUR_TOKEN",
543
- base_url="https://yourhost.com/path/to/api",
544
532
  )
545
533
  await client.evals.create_question(
546
534
  dataset_id="string",
@@ -579,11 +567,10 @@ class AsyncEvalsClient:
579
567
 
580
568
  - request: typing.List[EvalQuestionCreate].
581
569
  ---
582
- from platform.client import AsyncLlamaCloud
570
+ from llama_cloud.client import AsyncLlamaCloud
583
571
 
584
572
  client = AsyncLlamaCloud(
585
573
  token="YOUR_TOKEN",
586
- base_url="https://yourhost.com/path/to/api",
587
574
  )
588
575
  await client.evals.create_questions(
589
576
  dataset_id="string",
@@ -616,11 +603,10 @@ class AsyncEvalsClient:
616
603
  Parameters:
617
604
  - question_id: str.
618
605
  ---
619
- from platform.client import AsyncLlamaCloud
606
+ from llama_cloud.client import AsyncLlamaCloud
620
607
 
621
608
  client = AsyncLlamaCloud(
622
609
  token="YOUR_TOKEN",
623
- base_url="https://yourhost.com/path/to/api",
624
610
  )
625
611
  await client.evals.get_question(
626
612
  question_id="string",
@@ -651,12 +637,11 @@ class AsyncEvalsClient:
651
637
 
652
638
  - request: EvalQuestionCreate.
653
639
  ---
654
- from platform import EvalQuestionCreate
655
- from platform.client import AsyncLlamaCloud
640
+ from llama_cloud import EvalQuestionCreate
641
+ from llama_cloud.client import AsyncLlamaCloud
656
642
 
657
643
  client = AsyncLlamaCloud(
658
644
  token="YOUR_TOKEN",
659
- base_url="https://yourhost.com/path/to/api",
660
645
  )
661
646
  await client.evals.replace_question(
662
647
  question_id="string",
@@ -689,11 +674,10 @@ class AsyncEvalsClient:
689
674
  Parameters:
690
675
  - question_id: str.
691
676
  ---
692
- from platform.client import AsyncLlamaCloud
677
+ from llama_cloud.client import AsyncLlamaCloud
693
678
 
694
679
  client = AsyncLlamaCloud(
695
680
  token="YOUR_TOKEN",
696
- base_url="https://yourhost.com/path/to/api",
697
681
  )
698
682
  await client.evals.delete_question(
699
683
  question_id="string",
@@ -720,11 +704,10 @@ class AsyncEvalsClient:
720
704
  Get all supported models.
721
705
 
722
706
  ---
723
- from platform.client import AsyncLlamaCloud
707
+ from llama_cloud.client import AsyncLlamaCloud
724
708
 
725
709
  client = AsyncLlamaCloud(
726
710
  token="YOUR_TOKEN",
727
- base_url="https://yourhost.com/path/to/api",
728
711
  )
729
712
  await client.evals.get_supported_models()
730
713
  """
@@ -16,6 +16,9 @@ from ...types.presigned_url import PresignedUrl
16
16
  from .types.file_create_resource_info_value import FileCreateResourceInfoValue
17
17
 
18
18
  try:
19
+ import pydantic
20
+ if pydantic.__version__.startswith("1."):
21
+ raise ImportError
19
22
  import pydantic.v1 as pydantic # type: ignore
20
23
  except ImportError:
21
24
  import pydantic # type: ignore
@@ -37,11 +40,10 @@ class FilesClient:
37
40
 
38
41
  - project_id: typing.Optional[str].
39
42
  ---
40
- from platform.client import LlamaCloud
43
+ from llama_cloud.client import LlamaCloud
41
44
 
42
45
  client = LlamaCloud(
43
46
  token="YOUR_TOKEN",
44
- base_url="https://yourhost.com/path/to/api",
45
47
  )
46
48
  client.files.read_file(
47
49
  id="string",
@@ -73,11 +75,10 @@ class FilesClient:
73
75
 
74
76
  - project_id: typing.Optional[str].
75
77
  ---
76
- from platform.client import LlamaCloud
78
+ from llama_cloud.client import LlamaCloud
77
79
 
78
80
  client = LlamaCloud(
79
81
  token="YOUR_TOKEN",
80
- base_url="https://yourhost.com/path/to/api",
81
82
  )
82
83
  client.files.delete_file(
83
84
  id="string",
@@ -107,11 +108,10 @@ class FilesClient:
107
108
  Parameters:
108
109
  - project_id: typing.Optional[str].
109
110
  ---
110
- from platform.client import LlamaCloud
111
+ from llama_cloud.client import LlamaCloud
111
112
 
112
113
  client = LlamaCloud(
113
114
  token="YOUR_TOKEN",
114
- base_url="https://yourhost.com/path/to/api",
115
115
  )
116
116
  client.files.read_files()
117
117
  """
@@ -186,11 +186,10 @@ class FilesClient:
186
186
 
187
187
  - data_source_id: typing.Optional[str]. The ID of the data source that the file belongs to
188
188
  ---
189
- from platform.client import LlamaCloud
189
+ from llama_cloud.client import LlamaCloud
190
190
 
191
191
  client = LlamaCloud(
192
192
  token="YOUR_TOKEN",
193
- base_url="https://yourhost.com/path/to/api",
194
193
  )
195
194
  client.files.generate_presigned_url(
196
195
  name="string",
@@ -230,11 +229,10 @@ class FilesClient:
230
229
  Parameters:
231
230
  - project_id: typing.Optional[str].
232
231
  ---
233
- from platform.client import LlamaCloud
232
+ from llama_cloud.client import LlamaCloud
234
233
 
235
234
  client = LlamaCloud(
236
235
  token="YOUR_TOKEN",
237
- base_url="https://yourhost.com/path/to/api",
238
236
  )
239
237
  client.files.sync_files()
240
238
  """
@@ -264,11 +262,10 @@ class FilesClient:
264
262
 
265
263
  - project_id: typing.Optional[str].
266
264
  ---
267
- from platform.client import LlamaCloud
265
+ from llama_cloud.client import LlamaCloud
268
266
 
269
267
  client = LlamaCloud(
270
268
  token="YOUR_TOKEN",
271
- base_url="https://yourhost.com/path/to/api",
272
269
  )
273
270
  client.files.read_file_content(
274
271
  id="string",
@@ -305,11 +302,10 @@ class AsyncFilesClient:
305
302
 
306
303
  - project_id: typing.Optional[str].
307
304
  ---
308
- from platform.client import AsyncLlamaCloud
305
+ from llama_cloud.client import AsyncLlamaCloud
309
306
 
310
307
  client = AsyncLlamaCloud(
311
308
  token="YOUR_TOKEN",
312
- base_url="https://yourhost.com/path/to/api",
313
309
  )
314
310
  await client.files.read_file(
315
311
  id="string",
@@ -341,11 +337,10 @@ class AsyncFilesClient:
341
337
 
342
338
  - project_id: typing.Optional[str].
343
339
  ---
344
- from platform.client import AsyncLlamaCloud
340
+ from llama_cloud.client import AsyncLlamaCloud
345
341
 
346
342
  client = AsyncLlamaCloud(
347
343
  token="YOUR_TOKEN",
348
- base_url="https://yourhost.com/path/to/api",
349
344
  )
350
345
  await client.files.delete_file(
351
346
  id="string",
@@ -375,11 +370,10 @@ class AsyncFilesClient:
375
370
  Parameters:
376
371
  - project_id: typing.Optional[str].
377
372
  ---
378
- from platform.client import AsyncLlamaCloud
373
+ from llama_cloud.client import AsyncLlamaCloud
379
374
 
380
375
  client = AsyncLlamaCloud(
381
376
  token="YOUR_TOKEN",
382
- base_url="https://yourhost.com/path/to/api",
383
377
  )
384
378
  await client.files.read_files()
385
379
  """
@@ -454,11 +448,10 @@ class AsyncFilesClient:
454
448
 
455
449
  - data_source_id: typing.Optional[str]. The ID of the data source that the file belongs to
456
450
  ---
457
- from platform.client import AsyncLlamaCloud
451
+ from llama_cloud.client import AsyncLlamaCloud
458
452
 
459
453
  client = AsyncLlamaCloud(
460
454
  token="YOUR_TOKEN",
461
- base_url="https://yourhost.com/path/to/api",
462
455
  )
463
456
  await client.files.generate_presigned_url(
464
457
  name="string",
@@ -498,11 +491,10 @@ class AsyncFilesClient:
498
491
  Parameters:
499
492
  - project_id: typing.Optional[str].
500
493
  ---
501
- from platform.client import AsyncLlamaCloud
494
+ from llama_cloud.client import AsyncLlamaCloud
502
495
 
503
496
  client = AsyncLlamaCloud(
504
497
  token="YOUR_TOKEN",
505
- base_url="https://yourhost.com/path/to/api",
506
498
  )
507
499
  await client.files.sync_files()
508
500
  """
@@ -532,11 +524,10 @@ class AsyncFilesClient:
532
524
 
533
525
  - project_id: typing.Optional[str].
534
526
  ---
535
- from platform.client import AsyncLlamaCloud
527
+ from llama_cloud.client import AsyncLlamaCloud
536
528
 
537
529
  client = AsyncLlamaCloud(
538
530
  token="YOUR_TOKEN",
539
- base_url="https://yourhost.com/path/to/api",
540
531
  )
541
532
  await client.files.read_file_content(
542
533
  id="string",