AhsanRazi commited on
Commit
8958b4b
·
verified ·
1 Parent(s): a8332f5

Update blog_content_generator.py

Browse files
Files changed (1) hide show
  1. blog_content_generator.py +7 -4
blog_content_generator.py CHANGED
@@ -26,6 +26,8 @@ def blog_content_agent(llm, state):
26
  Returns:
27
  str: The result of the search query.
28
  """
 
 
29
  tavily = TavilySearchResults(
30
  max_results=5,
31
  search_depth="advanced",
@@ -33,7 +35,7 @@ def blog_content_agent(llm, state):
33
  include_raw_content=True,
34
  )
35
 
36
- text = tavily.invoke({"query": f"Search this in UK: {query} After:2025"})
37
  print("Tool Call")
38
  print(text)
39
  return text
@@ -140,9 +142,10 @@ Replacing your boiler is a big investment, but it’s one that can bring signifi
140
 
141
  Context:
142
  - The blog post should be informative and engaging.
143
- - The Blog Post is for the UK audience.
144
- - Always Use the attached tool tavily_search to get the latest information about the topic.
145
- - Always use the Tool Message in writing the Blog content.
 
146
 
147
  Constraints:
148
  - The blog post should be between 700 to 800 words.
 
26
  Returns:
27
  str: The result of the search query.
28
  """
29
+ current_year = date.today().strftime("%Y")
30
+
31
  tavily = TavilySearchResults(
32
  max_results=5,
33
  search_depth="advanced",
 
35
  include_raw_content=True,
36
  )
37
 
38
+ text = tavily.invoke({"query": f"Search this in UK: {query} After: {current_year}"})
39
  print("Tool Call")
40
  print(text)
41
  return text
 
142
 
143
  Context:
144
  - The blog post should be informative and engaging.
145
+ - Use **UK Grammar and Spelling** in writing the Blog.
146
+ - The Blog Post is for the **UK audience**.
147
+ - Always Use the attached tool **tavily_search** to get the latest information about the topic.
148
+ - Always use the **Tool Message** in writing the Blog content.
149
 
150
  Constraints:
151
  - The blog post should be between 700 to 800 words.