-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26a17ed
commit 1ceee39
Showing
3 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" | |
|
||
[tool.poetry] | ||
name = "llama-extract" | ||
version = "0.0.4" | ||
version = "0.0.5" | ||
description = "Infer schema and extract data from unstructured files" | ||
authors = ["Logan Markewich <[email protected]>"] | ||
license = "MIT" | ||
|
@@ -13,9 +13,8 @@ packages = [{include = "llama_extract"}] | |
|
||
[tool.poetry.dependencies] | ||
python = ">=3.8.1,<4.0" | ||
llama-index-core = ">=0.10.29" | ||
llama-cloud = "^0.0.11" | ||
pydantic = ">=1.10" | ||
llama-index-core = "^0.11.0" | ||
llama-cloud = ">=0.1.0" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = "^8.0.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
import os | ||
import pytest | ||
|
||
from llama_extract import LlamaExtract | ||
|
||
|
||
TEST_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data/test.pdf") | ||
|
||
|
||
@pytest.mark.skipif( | ||
os.environ.get("LLAMA_CLOUD_API_KEY", "") == "", | ||
reason="LLAMA_CLOUD_API_KEY not set", | ||
) | ||
def test_simple() -> None: | ||
pass | ||
extractor = LlamaExtract( | ||
api_key=os.environ["LLAMA_CLOUD_API_KEY"], | ||
) | ||
|
||
# Infer schema | ||
schema = extractor.infer_schema( | ||
"my_schema", [TEST_FILE] | ||
) | ||
|
||
# Extract data | ||
results = extractor.extract(schema.id, [TEST_FILE]) | ||
|