Skip to content

Commit

Permalink
Update search to actually work. (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
dglazkov authored Apr 26, 2024
1 parent 8ced5b7 commit 9df3440
Showing 1 changed file with 13 additions and 62 deletions.
75 changes: 13 additions & 62 deletions seeds/team-experiments/graphs/bgl/insta/tool-search.bgl.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
},
"metadata": {
"visual": {
"x": 19,
"y": 538.0000000000001
"x": 14,
"y": 352
}
}
},
Expand All @@ -45,7 +45,7 @@
},
"metadata": {
"visual": {
"x": 595,
"x": 594.9999999999999,
"y": 505
}
}
Expand All @@ -55,8 +55,8 @@
"type": "fetch",
"metadata": {
"visual": {
"x": 568.0000000000001,
"y": 151
"x": 568,
"y": 150.9999999999999
},
"title": "Scraping Bee",
"description": "Calling Scraping Bee to Get the Contents",
Expand All @@ -74,8 +74,8 @@
},
"metadata": {
"visual": {
"x": 318,
"y": 193
"x": 270,
"y": 226
},
"title": "Scraping Bee API Template",
"logLevel": "debug"
Expand All @@ -92,61 +92,12 @@
"metadata": {
"visual": {
"x": 25,
"y": 4
"y": 3.9999999999998863
},
"title": "Get API Key",
"description": "Asking for API Key",
"logLevel": "debug"
}
},
{
"id": "jsonata-02f9c069",
"type": "jsonata",
"configuration": {
"expression": "(\n $results := $eval(evaluate_results[0]);\n{ \"title\": body.title, \"body\": $results.data, \"links\": $results.links }\n)"
},
"metadata": {
"visual": {
"x": 366,
"y": 501
},
"title": "Format Output",
"logLevel": "debug"
}
},
{
"id": "jsonata-c018bbf7",
"type": "jsonata",
"configuration": {
"expression": "$string({ \"title\": \"title\" })",
"json": "{}"
},
"metadata": {
"visual": {
"x": 23,
"y": 165
},
"title": "Extract Rules",
"description": "Specifying the rules to extract content",
"logLevel": "debug"
}
},
{
"id": "jsonata-a145253b",
"type": "jsonata",
"metadata": {
"title": "JS Scenario",
"description": "Specifying JS to evaluate",
"logLevel": "debug",
"visual": {
"x": 17,
"y": 349
}
},
"configuration": {
"expression": "$string({\n \"instructions\":[ {\"evaluate\": $ }]\n})",
"json": "JSON.stringify({ data: document.body.innerText, links: Array.from(document.querySelectorAll(\"a\")).map((a) => ({ href: a.href, title: a.innerText.trim() }))})"
}
}
],
"edges": [
Expand All @@ -163,14 +114,14 @@
"in": "SCRAPING_BEE_KEY"
},
{
"from": "jsonata-02f9c069",
"to": "output",
"out": "result",
"in": "text"
"from": "input",
"to": "urlTemplate-77553e6f",
"out": "search",
"in": "search"
},
{
"from": "fetch-27da0eda",
"to": "jsonata-02f9c069",
"to": "output",
"out": "response",
"in": "json"
}
Expand Down

0 comments on commit 9df3440

Please sign in to comment.