mohan260851 commited on
Commit
8fe31af
·
verified ·
1 Parent(s): 4bc0f59

Update tools/social_media_search.py

Browse files
Files changed (1) hide show
  1. tools/social_media_search.py +6 -4
tools/social_media_search.py CHANGED
@@ -1,14 +1,16 @@
1
  from duckduckgo_search import DDGS
 
2
  from typing import List, Dict
3
  import re
4
 
5
 
6
- class SocialMediaSearchTool:
7
  name = "social_media_search"
8
- description = "Visits a each and every social accounts web page of a particular person at the given url and reads its content as a markdown string. Use this to browse webpages."
9
- inputs = {'url': {'type': 'string', 'description': 'The url of the social account webpage to visit.'}}
10
  output_type = "string"
11
- def __init__(self):
 
12
  self.ddgs = DDGS(**kwargs)
13
  self.platforms = {
14
  "LinkedIn": r"linkedin\.com/in/",
 
1
  from duckduckgo_search import DDGS
2
+ from smolagents.tools import Tool
3
  from typing import List, Dict
4
  import re
5
 
6
 
7
+ class SocialMediaSearchTool(Tool):
8
  name = "social_media_search"
9
+ description = "Performs a duckduckgo web search based on your query (think a Google search) then returns the top search results."
10
+ inputs = {'query': {'type': 'string', 'description': 'The url of the social account webpage to visit.'}}
11
  output_type = "string"
12
+ def __init__(self, **kwargs):
13
+ super().__init__()
14
  self.ddgs = DDGS(**kwargs)
15
  self.platforms = {
16
  "LinkedIn": r"linkedin\.com/in/",