Commit Graph

2 Commits

Author SHA1 Message Date
Adrian Lyjak 730d00183a extract-basic: migrate to llama-cloud v2 SDK (#249)
* extract-basic: migrate workflow to llama-cloud v2 SDK

Switch extract-basic to llama-cloud>=2.3.0 and the v2 extract API:
configuration_id replaces extraction_agent_id, ExtractConfig mirrors
ExtractConfiguration (tier/extraction_target/etc), and process_file now
uses client.extract.create + wait_for_completion + get with
expand=["extract_metadata"] and ExtractedData.from_extract_job.
metadata_workflow resolves schemas via client.configurations.retrieve
gated on ExtractV2Parameters.

* extract-basic: update fake server and tests for llama-cloud v2

Rewrite FakeLlamaCloudServer.extract for v2 routes (POST/GET
/api/v2/extract, schema validate/generate, /api/v1/beta/configurations
CRUD) and update split to read categories from the nested
configuration payload. Rewrite test_extract and test_split to the v2
SDK shapes (client.extract.run with inline configuration and
configuration_id; split with configuration={'categories': [...]}).

* extract-basic: split configurations namespace out of extract fake

Move /api/v1/beta/configurations CRUD handlers and StoredConfiguration
state into their own FakeConfigurationsNamespace. FakeExtractNamespace
now takes a FakeConfigurationsNamespace and delegates configuration_id
lookups to it. Server wires both namespaces independently.
2026-04-15 11:12:11 -04:00
Clelia (Astra) Bertelli 6f4e661fb4 chore: add split to mock server (#199) 2026-01-27 14:17:04 +01:00