Find answers from the community

Updated 2 weeks ago

Is the Documentation for Llama Extract Up-to-Date?

https://github.com/run-llama/llama_extract - is the documentation up-to date?

i cannot call create_agent method on the extractor. Can I pass an s3 url ?

Plain Text
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[44], line 1
----> 1 extractor.create_agents()

File ~/myenv/lib/python3.12/site-packages/pydantic/main.py:891, in BaseModel.__getattr__(self, item)
    888     return super().__getattribute__(item)  # Raises AttributeError if appropriate
    889 else:
    890     # this is the current error
--> 891     raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')

AttributeError: 'LlamaExtract' object has no attribute 'create_agents'


running version:

Plain Text
Name: llama-extract
Version: 0.0.4
1
L
k
n
18 comments
Yes, that is indeed out of date, following the banner at the top πŸ‘ Moving llama-cloud related services to a single package/repo
@Logan M

I am getting an import error when I try to import

Plain Text
from llama_cloud_services import LlamaExtract


---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[76], line 15
     12 from PyPDF2 import PdfReader
     13 from urllib.parse import urlparse
---> 15 from llama_cloud_services import LlamaExtract
     16 from pydantic import BaseModel, Field
     17 from typing import List, Optional

File ~/myenv/lib/python3.12/site-packages/llama_cloud_services/__init__.py:2
      1 from llama_cloud_services.parse import LlamaParse
----> 2 from llama_cloud_services.report import ReportClient, LlamaReport
      3 from llama_cloud_services.extract import LlamaExtract, ExtractionAgent
      5 __all__ = [
      6     "LlamaParse",
      7     "ReportClient",
   (...)
     10     "ExtractionAgent",
     11 ]

File ~/myenv/lib/python3.12/site-packages/llama_cloud_services/report/__init__.py:1
----> 1 from llama_cloud_services.report.report import ReportClient
      2 from llama_cloud_services.report.base import LlamaReport
      4 __all__ = ["ReportClient", "LlamaReport"]

File ~/myenv/lib/python3.12/site-packages/llama_cloud_services/report/report.py:9
      6 from datetime import datetime
      7 from enum import Enum
----> 9 from llama_cloud.types import (
     10     ReportEventItemEventData_Progress,
     11     ReportMetadata,
     12     EditSuggestion,
     13     ReportResponse,
     14     ReportPlan,
     15     ReportBlock,
     16     ReportPlanBlock,
     17     Report,
     18 )
     20 if TYPE_CHECKING:
     21     from llama_cloud_services.report.base import LlamaReport

ImportError: cannot import name 'ReportEventItemEventData_Progress' from 'llama_cloud.types' (/Users/myenv/lib/python3.12/site-packages/llama_cloud/types/__init__.py)
Hmm, pip install -U llama-cloud ?
Might need to set a min version for that
what version is stable? I am on:
Plain Text
llama-cloud               0.1.13
llama-cloud-services      0.6.3
The latest of both should be stable
if you are in a notebook, make sure you restart it
thanks, works.
would we be able to pass s3 urls for extraction?
I'm actually not sure! cc @neerajprad
would we be able to pass s3 urls for extraction?
Not at the moment. You'll need to upload the files. We'll soon be adding a text-mode where you should be able to read from other sources and pass the text directly for extraction.
What kind of files do you have on S3?
cool, so i can read the pdf files from s3 and pass the text blob as input with the text-mode ?
Yes, that's the idea.
Add a reply
Sign up and join the conversation on Discord