
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
llama-parser
Advanced tools
Llama Parser is an API created by LlamaIndex to effeciently parse and represent files for effecient retrieval and context augmentation using LlamaIndex frameworks.
Available for free as a preivew, you can try it out today.
NOTE: Currently, only PDF files are supported.
First, login and get an api-key from https://cloud.llamaindex.ai
.
Simply install the package:
pip install llama-parser
Then, you can run the following to parse your first PDF file:
from llama_parser import LlamaParser
parser = LlamaParser(
api_key="...", # can also be set in your env as LLAMA_CLOUD_API_KEY
result_type="markdown" # "markdown" and "text" are available
)
# sync
documents = parser.load_data("./my_file.pdf")
# async
documents = await parser.aload_data("./my_file.pdf")
SimpleDirectoryReader
You can also integrate the parser as the default PDF loader in SimpleDirectoryReader
:
from llama_parser import LlamaParser
from llama_index import SimpleDirectoryReader
parser = LlamaParser(
api_key="...", # can also be set in your env as LLAMA_CLOUD_API_KEY
result_type="markdown" # "markdown" and "text" are available
)
file_extractor = {".pdf": parser}
documents = SimpleDirectoryReader("./data", file_extractor=file_extractor).load_data()
Full documentation for SimpleDirectoryReader
can be found on the LlamaIndex Documentation.
Serveral end-to-end indexing examples can be found in the examples folder
FAQs
Parse files into RAG-Optimized formats.
We found that llama-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.