承接 jpcaparas/laravel-llamaparse-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jpcaparas/laravel-llamaparse-client

最新稳定版本:v0.1.0

Composer 安装命令:

composer require jpcaparas/laravel-llamaparse-client

包简介

A Laravel library for interacting with Llamaparse Cloud API to parse PDF, XLS, and other file types into more efficient RAG context.

README 文档

README

Tests

image

This package provides a Laravel library for interacting with the LlamaCloud Parsing & Transformation API (aka LlamaParse Cloud) to parse PDF, XLS, and other file types into more efficient RAG context for consumption into other systems.

Installation

You can install the package via Composer:

composer require jpcaparas/laravel-llamaparse-client

After installing the package, publish the configuration file:

php artisan vendor:publish --provider="JPCaparas\LLamaparse\LLamaparseServiceProvider"

Then, add your LlamaParse API key to your .env file:

LLAMAPARSE_API_KEY=your-api-key

Usage

Here is an example of how to use the package with Laravel Tinker:

  1. Set a variable to a path of the file:
$filePath = 'path/to/your/file.pdf';

Hint: This PDF full of charts is a good resource to upload.

  1. Instantiate the service:
$llamaparse = app('llamaparse');
  1. Upload the file and get the job ID:
$response = $llamaparse->uploadFile($filePath);
$jobId = $response['id'];
  1. Get the job status:
$jobStatus = $llamaparse->getJob($jobId);
  1. Get the job markdown result:
$markdownResult = $llamaparse->getJobResult($jobId);
$textResult = $llamaparse->getJobTextResult($jobId);

Running Tests

To run the tests, use the following command:

composer test

API Reference

For a full API reference, please visit the LlamaCloud Parsing & Transformation API documentation.

License

MIT

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-05