steamship.agents.tools.classification package#

Submodules#

steamship.agents.tools.classification.sentiment_analysis_tool module#

class steamship.agents.tools.classification.sentiment_analysis_tool.SentimentAnalysisTool(labels: Optional[List[str]] = None, rewrite_prompt: Optional[str] = None, *, name: str = 'SentimentAnalysisTool', agent_description: str = 'Used to record the sentiment of a user message. The input is a string, and the output is a string with the sentiment.', human_description: str = 'Returns the sentiment of a user message.')[source]#

Bases: TextRewritingTool

Example tool to illustrate how one might classify a user message with a sentiment.

TODO: This feels like it wants to emit data to a side channel. Or perhaps it TAGS the user input block?

labels: List[str]#
rewrite_prompt: str#

steamship.agents.tools.classification.zero_shot_classifier_tool module#

class steamship.agents.tools.classification.zero_shot_classifier_tool.ZeroShotClassifierTool(labels: Optional[List[str]] = None, rewrite_prompt: Optional[str] = None, *, name: str = 'ZeroShotClassifierTool', agent_description: str = 'Used to classify a user message. The input is a string, and the output is a string with the classification label.', human_description: str = 'Classifies a user message.')[source]#

Bases: TextRewritingTool

Example tool to illustrate how one might classify a user message.

For example: the agent may wish to know if the use message was a question, complaint, or suggestion.

TODO: This feels like it wants to emit data to a side channel. Or perhaps it TAGS the user input block?

labels: List[str]#
rewrite_prompt: str#

Module contents#

class steamship.agents.tools.classification.SentimentAnalysisTool(labels: Optional[List[str]] = None, rewrite_prompt: Optional[str] = None, *, name: str = 'SentimentAnalysisTool', agent_description: str = 'Used to record the sentiment of a user message. The input is a string, and the output is a string with the sentiment.', human_description: str = 'Returns the sentiment of a user message.')[source]#

Bases: TextRewritingTool

Example tool to illustrate how one might classify a user message with a sentiment.

TODO: This feels like it wants to emit data to a side channel. Or perhaps it TAGS the user input block?

agent_description: str#

Description for use in an agent in order to enable Action selection. It should include a short summary of what the Tool does, what the inputs to the Tool should be, and what the outputs of the tool are.

human_description: str#

Human-friendly description. Used for logging, tool indices, etc.

labels: List[str]#
name: str#

The short name for the tool. This will be used by Agents to refer to this tool during action selection.

rewrite_prompt: str#
class steamship.agents.tools.classification.ZeroShotClassifierTool(labels: Optional[List[str]] = None, rewrite_prompt: Optional[str] = None, *, name: str = 'ZeroShotClassifierTool', agent_description: str = 'Used to classify a user message. The input is a string, and the output is a string with the classification label.', human_description: str = 'Classifies a user message.')[source]#

Bases: TextRewritingTool

Example tool to illustrate how one might classify a user message.

For example: the agent may wish to know if the use message was a question, complaint, or suggestion.

TODO: This feels like it wants to emit data to a side channel. Or perhaps it TAGS the user input block?

agent_description: str#

Description for use in an agent in order to enable Action selection. It should include a short summary of what the Tool does, what the inputs to the Tool should be, and what the outputs of the tool are.

human_description: str#

Human-friendly description. Used for logging, tool indices, etc.

labels: List[str]#
name: str#

The short name for the tool. This will be used by Agents to refer to this tool during action selection.

rewrite_prompt: str#