Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The infer_schema method, not available on LlamaParse object. AttributeError #27

Open
RemoSande opened this issue Aug 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@RemoSande
Copy link

LlamaParse Bug Report

Environment

  • LlamaParse version: 0.4.9
  • Python version: 3.12.4
  • Operating System: Windows (inferred from file paths)
  • Installation method: pip (conda environment)

Description

The infer_schema method, which is expected to be available on the LlamaParse object, is not present. This leads to an AttributeError when trying to use this method.

Steps to Reproduce

  1. Install LlamaParse version 0.4.9
  2. Create a Python script with the following content:
    from llama_parse import LlamaParse
    
    extractor = LlamaParse()
    extraction_schema = extractor.infer_schema("Our Schema", [
        "path/to/your/file.pdf",
    ])
  3. Run the script

Expected Behavior

The infer_schema method should be available and execute without raising an AttributeError.

Actual Behavior

An AttributeError is raised with the message:

AttributeError: 'LlamaParse' object has no attribute 'infer_schema'

Additional Information

  • The LlamaParse object does have other methods related to parsing and schemas, including:
    • parse_file
    • parse_obj
    • parse_raw
    • schema
    • schema_json
  • It's unclear if any of these methods are intended to replace the infer_schema functionality or if infer_schema was removed unintentionally.

Possible Workarounds

None identified at this time. Users of version 0.4.9 cannot use the infer_schema method as expected.

Impact

This issue prevents users from using the infer_schema method, which may be a critical functionality for many workflows involving LlamaParse. It requires users to find alternative methods or potentially use older versions of the library.

Additional Notes

It would be helpful to clarify in the documentation or release notes if the infer_schema method has been deprecated or replaced by another method in version 0.4.9.

@RemoSande RemoSande added the bug Something isn't working label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant