firecrawl-sdk 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/firecrawl/models/document.rb +4 -1
- data/lib/firecrawl/models/query_format.rb +41 -1
- data/lib/firecrawl/version.rb +1 -1
- 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: 70b6cc0e7e9b3713301a01f3e016cc4d1d8c5c9ef710a4070a89c016d6618d94
|
|
4
|
+
data.tar.gz: 56ac98b6d8c495e2b449484441f31540435066b8c0be35a456e0faad609df2e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 46deb97a266f954bd2f9f32b4c100e4bcfa7a15ef408f93df502665431bd4f88656d53f8d02d3bc19aa6dd07ea7cbc4f3b1a5a5db9b81cafcfc0b3a140bb6dd6
|
|
7
|
+
data.tar.gz: a992a108c3e46e242d584a47f9558ce18dc870c378560413b7cdad3064707f134d0971520cfe17568824f7a80c278f46bf94fd420e1d58824866a73066228f39
|
|
@@ -6,7 +6,8 @@ module Firecrawl
|
|
|
6
6
|
class Document
|
|
7
7
|
attr_reader :markdown, :html, :raw_html, :json, :summary,
|
|
8
8
|
:metadata, :links, :images, :screenshot, :audio,
|
|
9
|
-
:attributes, :actions, :
|
|
9
|
+
:attributes, :actions, :answer, :highlights, :warning,
|
|
10
|
+
:change_tracking, :branding
|
|
10
11
|
|
|
11
12
|
def initialize(data)
|
|
12
13
|
@markdown = data["markdown"]
|
|
@@ -21,6 +22,8 @@ module Firecrawl
|
|
|
21
22
|
@audio = data["audio"]
|
|
22
23
|
@attributes = data["attributes"]
|
|
23
24
|
@actions = data["actions"]
|
|
25
|
+
@answer = data["answer"]
|
|
26
|
+
@highlights = data["highlights"]
|
|
24
27
|
@warning = data["warning"]
|
|
25
28
|
@change_tracking = data["changeTracking"]
|
|
26
29
|
@branding = data["branding"]
|
|
@@ -2,7 +2,47 @@
|
|
|
2
2
|
|
|
3
3
|
module Firecrawl
|
|
4
4
|
module Models
|
|
5
|
-
#
|
|
5
|
+
# Question format for asking a question about page content.
|
|
6
|
+
class QuestionFormat
|
|
7
|
+
attr_reader :question
|
|
8
|
+
|
|
9
|
+
def initialize(question:)
|
|
10
|
+
@question = question
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def to_h
|
|
14
|
+
{
|
|
15
|
+
"type" => "question",
|
|
16
|
+
"question" => question,
|
|
17
|
+
}
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def type
|
|
21
|
+
"question"
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Highlights format for extracting direct highlights from page content.
|
|
26
|
+
class HighlightsFormat
|
|
27
|
+
attr_reader :query
|
|
28
|
+
|
|
29
|
+
def initialize(query:)
|
|
30
|
+
@query = query
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def to_h
|
|
34
|
+
{
|
|
35
|
+
"type" => "highlights",
|
|
36
|
+
"query" => query,
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def type
|
|
41
|
+
"highlights"
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Deprecated query format for asking a question about page content.
|
|
6
46
|
class QueryFormat
|
|
7
47
|
MODE_FREEFORM = "freeform"
|
|
8
48
|
MODE_DIRECT_QUOTE = "directQuote"
|
data/lib/firecrawl/version.rb
CHANGED