Spaces:
Sleeping
Sleeping
Update tools/social_media_search.py
Browse files
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 = "
|
| 9 |
-
inputs = {'
|
| 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/",
|