Spaces:
Sleeping
Sleeping
Update tools.py
Browse files
tools.py
CHANGED
|
@@ -96,18 +96,18 @@ def tool_register(cls: BaseModel):
|
|
| 96 |
|
| 97 |
|
| 98 |
@tool_register
|
| 99 |
-
class
|
| 100 |
-
"""Retrieves
|
| 101 |
|
| 102 |
-
logging.info("@tool_register:
|
| 103 |
|
| 104 |
-
query: str = Field(description="
|
| 105 |
logging.info(f"query: {query}")
|
| 106 |
|
| 107 |
@classmethod
|
| 108 |
def invoke(cls, input: Dict) -> str:
|
| 109 |
|
| 110 |
-
logging.info(f"
|
| 111 |
# Check if the input is a dictionary
|
| 112 |
|
| 113 |
query = input.get("query", None)
|
|
|
|
| 96 |
|
| 97 |
|
| 98 |
@tool_register
|
| 99 |
+
class retrieve_wiki_data(ToolBase):
|
| 100 |
+
"""Retrieves relevant information from Wikipedia based on the user’s query."""
|
| 101 |
|
| 102 |
+
logging.info("@tool_register: retrieve_wiki_data()")
|
| 103 |
|
| 104 |
+
query: str = Field(description="The user's input or question, used to search.")
|
| 105 |
logging.info(f"query: {query}")
|
| 106 |
|
| 107 |
@classmethod
|
| 108 |
def invoke(cls, input: Dict) -> str:
|
| 109 |
|
| 110 |
+
logging.info(f"retrieve_wiki_data.invoke() input: {input}")
|
| 111 |
# Check if the input is a dictionary
|
| 112 |
|
| 113 |
query = input.get("query", None)
|