Compare commits

...

4 Commits

Author SHA1 Message Date
Logan Markewich 97c4fd1495 fix tests 2025-12-04 20:13:58 -06:00
Logan Markewich bafb3f7061 regenerate client 2025-12-04 20:04:20 -06:00
Logan Markewich 6481c403e0 changesets 2025-12-04 20:01:34 -06:00
Logan Markewich 1509bf910e add tier and version to parse 2025-12-04 20:00:59 -06:00
9 changed files with 19919 additions and 31517 deletions
+6
View File
@@ -0,0 +1,6 @@
---
"llama-cloud-services": patch
"llama-cloud-services-py": patch
---
Add tier and version
+13
View File
@@ -568,6 +568,13 @@ class LlamaParse(BasePydanticReader):
default=False,
description="If set to true, the parser will include line-level bounding boxes in the result.",
)
tier: Optional[str] = Field(
default=None, description="The tier to use for the parsing job."
)
version: Optional[str] = Field(
default=None,
description="The version of the parser to use at the specified tier.",
)
# Deprecated
bounding_box: Optional[str] = Field(
@@ -1125,6 +1132,12 @@ class LlamaParse(BasePydanticReader):
if self.line_level_bounding_box is not None:
data["line_level_bounding_box"] = self.line_level_bounding_box
if self.tier is not None:
data["tier"] = self.tier
if self.version is not None:
data["version"] = self.version
# Deprecated
if self.bounding_box is not None:
data["bounding_box"] = self.bounding_box
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
import {
addFilesToPipelineApiApiV1PipelinesPipelineIdFilesPut,
getPipelineFileStatusApiV1PipelinesPipelineIdFilesFileIdStatusGet,
listPipelineFilesApiV1PipelinesPipelineIdFilesGet,
listPipelineFiles2ApiV1PipelinesPipelineIdFiles2Get,
listProjectsApiV1ProjectsGet,
readFileContentApiV1FilesIdContentGet,
searchPipelinesApiV1PipelinesGet,
@@ -97,21 +97,20 @@ export class LLamaCloudFileService {
*/
public static async getFileUrl(pipelineId: string, filename: string) {
initService();
const { data: allPipelineFiles } =
await listPipelineFilesApiV1PipelinesPipelineIdFilesGet({
path: {
pipeline_id: pipelineId,
},
throwOnError: true,
});
const file = allPipelineFiles.find((file) => file.name === filename);
const response = await listPipelineFiles2ApiV1PipelinesPipelineIdFiles2Get({
path: {
pipeline_id: pipelineId,
},
throwOnError: true,
});
const file = response.data.files.find((file) => file.name === filename);
if (!file?.file_id) return null;
const { data: fileContent } = await readFileContentApiV1FilesIdContentGet({
path: {
id: file.file_id,
},
query: {
project_id: file.project_id,
project_id: file.project_id || null,
},
throwOnError: true,
});
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+4
View File
@@ -186,6 +186,8 @@ export class LlamaParseReader extends FileReader {
page_footer_suffix?: string | undefined;
merge_tables_across_pages_in_markdown?: boolean | undefined;
extract_printed_page_number?: boolean | undefined;
tier?: string | undefined;
version?: string | undefined;
constructor(
params: Partial<Omit<LlamaParseReader, "language" | "apiKey">> & {
@@ -383,6 +385,8 @@ export class LlamaParseReader extends FileReader {
merge_tables_across_pages_in_markdown:
this.merge_tables_across_pages_in_markdown,
extract_printed_page_number: this.extract_printed_page_number,
tier: this.tier,
version: this.version,
} satisfies {
[Key in keyof BodyUploadFileApiParsingUploadPost]-?:
| BodyUploadFileApiParsingUploadPost[Key]