llamaparserb 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -1
- data/lib/llamaparserb/version.rb +1 -1
- data/lib/llamaparserb.rb +19 -21
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '045959dc406ac1ba5ce9db3cde8bdfc7e0bbccf83601027a0847b6693220af8f'
|
4
|
+
data.tar.gz: a56317601d9feba955aa6d8c08586ac495673b3d506ed0b332c43aca59a0bacf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 585bd687b193ffedceccf87e3a95550a1053e31d6d14da430f603109e9be74aa4aaf06d901afda2a0aaa9cdf87be93a08420cbc88b876630ce7d865c2e1c08db
|
7
|
+
data.tar.gz: 2d0616205409a56943d31014ca01c910bd31d6fb40a0c98fcbb02e6ba946d92a22925ba77ba05cfeae10ae6af0f3e7753b8dbcefed66739b97663808862d1892
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
|
+
### Added
|
9
|
+
- Add support for all supported optional llamaparse parameters when parsing files from URLs
|
8
10
|
|
9
11
|
## [0.3.0] - 2024-11-28
|
10
12
|
### Added
|
@@ -12,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
12
14
|
|
13
15
|
## [0.2.3] - 2024-11-28
|
14
16
|
### Added
|
15
|
-
- Add support for all supported optional
|
17
|
+
- Add support for all supported optional llamaparse parameters to `parse_file`
|
16
18
|
|
17
19
|
[0.2.3]: https://github.com/horizing/llamaparserb/releases/tag/v0.2.3...v0.2.2
|
18
20
|
|
data/lib/llamaparserb/version.rb
CHANGED
data/lib/llamaparserb.rb
CHANGED
@@ -240,7 +240,7 @@ module Llamaparserb
|
|
240
240
|
|
241
241
|
response = @connection.post("upload") do |req|
|
242
242
|
req.headers["Authorization"] = "Bearer #{api_key}"
|
243
|
-
req.body =
|
243
|
+
req.body = upload_params(file)
|
244
244
|
end
|
245
245
|
|
246
246
|
response.body["id"]
|
@@ -269,31 +269,30 @@ module Llamaparserb
|
|
269
269
|
premium_mode: @options[:premium_mode],
|
270
270
|
continuous_mode: @options[:continuous_mode],
|
271
271
|
do_not_unroll_columns: @options[:do_not_unroll_columns],
|
272
|
+
page_separator: @options[:page_separator],
|
273
|
+
page_prefix: @options[:page_prefix],
|
274
|
+
page_suffix: @options[:page_suffix],
|
275
|
+
target_pages: @options[:target_pages],
|
276
|
+
bounding_box: @options[:bounding_box],
|
277
|
+
disable_ocr: @options[:disable_ocr],
|
278
|
+
take_screenshot: @options[:take_screenshot],
|
272
279
|
gpt4o_mode: @options[:gpt4o_mode],
|
273
280
|
gpt4o_api_key: @options[:gpt4o_api_key],
|
274
|
-
vendor_multimodal_api_key: @options[:vendor_multimodal_api_key],
|
275
|
-
use_vendor_multimodal_model: @options[:use_vendor_multimodal_model],
|
276
|
-
vendor_multimodal_model_name: @options[:vendor_multimodal_model_name],
|
277
|
-
take_screenshot: @options[:take_screenshot],
|
278
|
-
disable_ocr: @options[:disable_ocr],
|
279
281
|
guess_xlsx_sheet_names: @options[:guess_xlsx_sheet_names],
|
280
282
|
is_formatting_instruction: @options[:is_formatting_instruction],
|
281
283
|
annotate_links: @options[:annotate_links],
|
284
|
+
vendor_multimodal_api_key: @options[:vendor_multimodal_api_key],
|
285
|
+
use_vendor_multimodal_model: @options[:use_vendor_multimodal_model],
|
286
|
+
vendor_multimodal_model_name: @options[:vendor_multimodal_model_name],
|
287
|
+
webhook_url: @options[:webhook_url],
|
288
|
+
http_proxy: @options[:http_proxy],
|
289
|
+
azure_openai_deployment_name: @options[:azure_openai_deployment_name],
|
290
|
+
azure_openai_endpoint: @options[:azure_openai_endpoint],
|
291
|
+
azure_openai_api_version: @options[:azure_openai_api_version],
|
292
|
+
azure_openai_key: @options[:azure_openai_key],
|
282
293
|
from_ruby_package: true
|
283
294
|
}
|
284
295
|
|
285
|
-
params[:page_separator] = @options[:page_separator] if @options[:page_separator]
|
286
|
-
params[:page_prefix] = @options[:page_prefix] if @options[:page_prefix]
|
287
|
-
params[:page_suffix] = @options[:page_suffix] if @options[:page_suffix]
|
288
|
-
params[:bounding_box] = @options[:bounding_box] if @options[:bounding_box]
|
289
|
-
params[:target_pages] = @options[:target_pages] if @options[:target_pages]
|
290
|
-
params[:webhook_url] = @options[:webhook_url] if @options[:webhook_url]
|
291
|
-
params[:azure_openai_deployment_name] = @options[:azure_openai_deployment_name] if @options[:azure_openai_deployment_name]
|
292
|
-
params[:azure_openai_endpoint] = @options[:azure_openai_endpoint] if @options[:azure_openai_endpoint]
|
293
|
-
params[:azure_openai_api_version] = @options[:azure_openai_api_version] if @options[:azure_openai_api_version]
|
294
|
-
params[:azure_openai_key] = @options[:azure_openai_key] if @options[:azure_openai_key]
|
295
|
-
params[:http_proxy] = @options[:http_proxy] if @options[:http_proxy]
|
296
|
-
|
297
296
|
if url
|
298
297
|
params[:input_url] = url.to_s
|
299
298
|
elsif file
|
@@ -356,9 +355,8 @@ module Llamaparserb
|
|
356
355
|
response = @connection.post("upload") do |req|
|
357
356
|
req.headers["Authorization"] = "Bearer #{api_key}"
|
358
357
|
req.headers["Accept"] = "application/json"
|
359
|
-
|
360
|
-
req.
|
361
|
-
req.body = {"input_url" => url.to_s}
|
358
|
+
req.options.timeout = 30
|
359
|
+
req.body = upload_params(nil, url)
|
362
360
|
end
|
363
361
|
|
364
362
|
log "Response: #{response.body.inspect}", :debug
|