searchmate.skills package¶
Submodules¶
searchmate.skills.gpt_skill module¶
GPT skill.
- class searchmate.skills.gpt_skill.GPTSkill¶
Bases:
Skill
GPT skill, makes chatting with GPT available in SearchMate.
- run(query)¶
Sends request to OpenAI’s GPT module.
- Parameters:
query (
str
) – Users’ text input.- Returns:
GPT’s response.
- Return type:
Optional[Dict[str, str]]
- suggestion(query)¶
What to display before executing skill.
- Parameters:
query (
str
) – Users’ text input.- Returns:
Text to display before skill runs.
- Return type:
Optional[Dict[str, str]]
searchmate.skills.math_skill module¶
Math skill.
- class searchmate.skills.math_skill.MathSkill¶
Bases:
Skill
Math skill, it evaluates string to a math value.
- run(query)¶
Evaluates math expression.
- Parameters:
query (
str
) – Users’ text input.- Returns:
Evaluated text to display after skill runs.
- Return type:
Optional[Dict[str, str]]
- suggestion(query)¶
Evaluates math expression.
- Parameters:
query (
str
) – Users’ text input.- Returns:
Evaluated text to display before skill runs.
- Return type:
Optional[Dict[str, str]]
searchmate.skills.web_skill module¶
Web skill.
- class searchmate.skills.web_skill.WebSkill¶
Bases:
Skill
Web skill, it launches web search with given input as fallback.
- run(query)¶
Launches web search.
- Parameters:
query (
str
) – Users’ text input.- Returns:
Evaluated text to display after skill runs.
- Return type:
Optional[Dict[str, str]]
- suggestion(query)¶
Evaluates math expression.
- Parameters:
query (
str
) – Users’ text input.- Returns:
Suggestion to display.
- Return type:
Optional[Dict[str, str]]