Compare commits

..

9 Commits

Author SHA1 Message Date
Adrian Lyjak b8f95c6a3d Update pyproject.toml
back out of version bump
2026-01-14 13:00:02 -05:00
Adrian Lyjak 878605b347 Update package.json
back out of version bump
2026-01-14 12:59:43 -05:00
Adrian Lyjak 22130a35d7 Update pyproject.toml
back out of version bump
2026-01-14 12:59:27 -05:00
Adrian Lyjak ed4b55305c Update package.json
back out of version bump
2026-01-14 12:59:00 -05:00
Adrian Lyjak 4b9d48f5e6 Update ninety-goats-look.md
Make it a patch version
2026-01-14 12:58:38 -05:00
Pierre-Loic doulcet ae6d6c276f changeset 2026-01-14 18:57:30 +01:00
Pierre-Loic doulcet 25f9efd5bc remove extension filter 2026-01-14 18:41:23 +01:00
github-actions[bot] 812e2f7d72 chore: version packages (#1073)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-12 19:03:13 +01:00
Clelia (Astra) Bertelli d7864afe3f fix: bug fix retry logic in Classify and Extract (#1066)
* fix: bug fix retry logic in Classify and Extract

* chore: apply suggestion

* chore: add PARTIAL_SUCCESS to classify
2026-01-12 18:57:40 +01:00
6 changed files with 27 additions and 22 deletions
+6
View File
@@ -0,0 +1,6 @@
---
"llama_parse": patch
"llama-cloud-services-py": patch
---
Remove extension filter
+3 -5
View File
@@ -751,11 +751,9 @@ class LlamaParse(BasePydanticReader):
file_path = str(file_input)
file_ext = os.path.splitext(file_path)[1].lower()
if file_ext not in SUPPORTED_FILE_TYPES:
raise Exception(
f"Currently, only the following file types are supported: {SUPPORTED_FILE_TYPES}\n"
f"Current file type: {file_ext}"
)
mime_type = mimetypes.guess_type(file_path)[0]
mime_type = "application/octet-stream"
else:
mime_type = mimetypes.guess_type(file_path)[0]
# Open the file here for the duration of the async context
# load data, set the mime type
fs = fs or get_default_fs()
+6
View File
@@ -1,5 +1,11 @@
# llama-cloud-services
## 0.5.3
### Patch Changes
- d7864af: bugfixes in retry logic for LlamaExtract and LlamaClassify
## 0.5.2
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "llama-cloud-services",
"version": "0.5.2",
"version": "0.5.3",
"type": "module",
"license": "MIT",
"scripts": {
+8 -9
View File
@@ -108,20 +108,19 @@ async function pollForJobCompletion({
}
const response =
await getClassifyJobApiV1ClassifierJobsClassifyJobIdGet(jobOptions);
if (!response.response.ok) {
numIterations++;
}
if (typeof response.data != "undefined") {
status = response.data.status as StatusEnum;
if (status == StatusEnum.CANCELLED || status == StatusEnum.ERROR) {
throw new Error("There was an error during the classification job.");
} else if (status == StatusEnum.SUCCESS) {
throw new Error("There was an error extracting data from your file.");
} else if (
status == StatusEnum.SUCCESS ||
status == StatusEnum.PARTIAL_SUCCESS
) {
return true;
} else {
numIterations++;
await sleep(interval * 1000);
}
}
numIterations++;
await sleep(interval * 1000);
}
}
@@ -169,7 +168,7 @@ async function getJobResult({
retries++;
await sleep(retryInterval * 1000);
}
if (typeof response.data != "undefined") {
if (response.response.ok && typeof response.data != "undefined") {
return response.data as ClassifyJobResults;
} else {
throw new Error(
+3 -7
View File
@@ -296,20 +296,16 @@ async function pollForJobCompletion(
return false;
}
const response = await getJobApiV1ExtractionJobsJobIdGet(jobOptions);
if (!response.response.ok) {
numIterations++;
}
if (typeof response.data != "undefined") {
status = response.data.status as StatusEnum;
if (status == StatusEnum.CANCELLED || status == StatusEnum.ERROR) {
throw new Error("There was an error extracting data from your file.");
} else if (status == StatusEnum.SUCCESS) {
return true;
} else {
numIterations++;
await sleep(interval * 1000);
}
}
numIterations++;
await sleep(interval * 1000);
}
}
@@ -350,7 +346,7 @@ async function getJobResult(
retries++;
await sleep(retryInterval * 1000);
}
if (typeof response.data != "undefined") {
if (response.response.ok && typeof response.data != "undefined") {
return {
data: response.data.data,
extractionMetadata: response.data.extraction_metadata,