apify-haystack 0.1.4__tar.gz → 0.1.4a1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apify_haystack
3
- Version: 0.1.4
3
+ Version: 0.1.4a1
4
4
  Summary: Apify-haystack integration
5
5
  Home-page: https://apify.com
6
6
  License: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "apify_haystack"
7
- version = "0.1.4"
7
+ version = "0.1.4a1"
8
8
  description = "Apify-haystack integration"
9
9
  authors = ["Apify Technologies s.r.o. <support@apify.com>"]
10
10
  homepage = "https://apify.com"
@@ -64,8 +64,8 @@ generator = OpenAIGenerator(model="gpt-3.5-turbo")
64
64
  pipe = Pipeline()
65
65
  pipe.add_component("loader", document_loader)
66
66
  pipe.add_component("cleaner", cleaner)
67
- pipe.add_component("prompt_builder", prompt_builder)
68
- pipe.add_component("llm", generator)
67
+ pipe.add_component("prompt_builder", PromptBuilder(template=prompt))
68
+ pipe.add_component("llm", OpenAIGenerator(model="gpt-3.5-turbo"))
69
69
  pipe.connect("loader", "cleaner")
70
70
  pipe.connect("cleaner", "prompt_builder")
71
71
  pipe.connect("prompt_builder", "llm")
@@ -76,10 +76,10 @@ url1 = "https://www.instagram.com/p/C_a9jcRuJZZ/" # @tiffintech on How to easil
76
76
  print(f"\nScraping Instagram comments for: {url1} and running analysis (it might take around 30-60 secs) ...\n")
77
77
 
78
78
  res = pipe.run({"loader": {"run_input": {"directUrls": [url1]}}})
79
- print("Analysis:", res.get("llm", {}).get("replies", ["No response"])[0])
79
+ print("Analysis:", res.get("llm", {}).get("replies", "No response")[0])
80
80
 
81
81
  url2 = "https://www.instagram.com/p/C_RgBzogufK/" # @maharishis on Affordable Care Act
82
82
  print(f"\nScraping Instagram comments for: {url2} and running analysis (it might take around 30-60 secs)... \n")
83
83
 
84
84
  res = pipe.run({"loader": {"run_input": {"directUrls": [url2]}}})
85
- print("Analysis:", res.get("llm", {}).get("replies", ["No response"])[0])
85
+ print("Analysis:", res.get("llm", {}).get("replies", "No response")[0])
File without changes