steamship.agents.tools package#
Subpackages#
- steamship.agents.tools.audio_transcription package
- Submodules
- steamship.agents.tools.audio_transcription.assembly_speech_to_text_tool module
- steamship.agents.tools.audio_transcription.fetch_audio_urls_from_rss_tool module
- steamship.agents.tools.audio_transcription.whisper_speech_to_text_tool module
- Module contents
- steamship.agents.tools.classification package
- steamship.agents.tools.conversation_starters package
- steamship.agents.tools.image_generation package
- steamship.agents.tools.question_answering package
- Submodules
- steamship.agents.tools.question_answering.prompt_database_question_answerer module
- steamship.agents.tools.question_answering.vector_search_qa_tool module
VectorSearchQATool
VectorSearchQATool.agent_description
VectorSearchQATool.answer_question()
VectorSearchQATool.embedding_index_config
VectorSearchQATool.embedding_index_handle
VectorSearchQATool.embedding_index_instance_handle
VectorSearchQATool.embedding_index_version
VectorSearchQATool.get_embedding_index()
VectorSearchQATool.human_description
VectorSearchQATool.load_docs_count
VectorSearchQATool.name
VectorSearchQATool.question_answering_prompt
VectorSearchQATool.run()
VectorSearchQATool.source_document_prompt
- Module contents
PromptDatabaseQATool
VectorSearchQATool
VectorSearchQATool.agent_description
VectorSearchQATool.answer_question()
VectorSearchQATool.embedding_index_config
VectorSearchQATool.embedding_index_handle
VectorSearchQATool.embedding_index_instance_handle
VectorSearchQATool.embedding_index_version
VectorSearchQATool.get_embedding_index()
VectorSearchQATool.human_description
VectorSearchQATool.load_docs_count
VectorSearchQATool.name
VectorSearchQATool.question_answering_prompt
VectorSearchQATool.run()
VectorSearchQATool.source_document_prompt
- steamship.agents.tools.search package
- steamship.agents.tools.speech_generation package
- steamship.agents.tools.text_generation package
- Submodules
- steamship.agents.tools.text_generation.image_prompt_generator_tool module
- steamship.agents.tools.text_generation.json_object_generator module
JsonObjectGeneratorTool
JsonObjectGeneratorTool.agent_description
JsonObjectGeneratorTool.example_rows
JsonObjectGeneratorTool.human_description
JsonObjectGeneratorTool.kv_clause()
JsonObjectGeneratorTool.name
JsonObjectGeneratorTool.new_row_prefix_fields
JsonObjectGeneratorTool.object_json()
JsonObjectGeneratorTool.object_keys
JsonObjectGeneratorTool.plural_object_description
JsonObjectGeneratorTool.rewrite_prompt
JsonObjectGeneratorTool.run()
JsonObjectGeneratorTool.shuffle_example_rows
JsonObjectGeneratorTool.validate_output_as_json
- steamship.agents.tools.text_generation.personality_tool module
- steamship.agents.tools.text_generation.summarize_text_with_prompt_tool module
- steamship.agents.tools.text_generation.text_rewrite_tool module
- steamship.agents.tools.text_generation.text_translation_tool module
- Module contents
ImagePromptGeneratorTool
JsonObjectGeneratorTool
JsonObjectGeneratorTool.agent_description
JsonObjectGeneratorTool.example_rows
JsonObjectGeneratorTool.human_description
JsonObjectGeneratorTool.kv_clause()
JsonObjectGeneratorTool.name
JsonObjectGeneratorTool.new_row_prefix_fields
JsonObjectGeneratorTool.object_json()
JsonObjectGeneratorTool.object_keys
JsonObjectGeneratorTool.plural_object_description
JsonObjectGeneratorTool.rewrite_prompt
JsonObjectGeneratorTool.run()
JsonObjectGeneratorTool.shuffle_example_rows
JsonObjectGeneratorTool.validate_output_as_json
PersonalityTool
SummarizeTextWithPromptTool
TextRewritingTool
TextTranslationTool
Submodules#
steamship.agents.tools.base_tools module#
- class steamship.agents.tools.base_tools.AudioBlockifierTool(*, name: str, agent_description: str, human_description: str, blockifier_plugin_handle: str, blockifier_plugin_instance_handle: Optional[str] = None, blockifier_plugin_config: dict = {})[source]#
Bases:
ScrapeAndBlockifyTool
A base class for tools that wrap Steamship Audio Blockifier plugins.
- class steamship.agents.tools.base_tools.AudioGeneratorTool(*, name: str, agent_description: str, human_description: str, generator_plugin_handle: str, generator_plugin_instance_handle: Optional[str] = None, generator_plugin_config: dict = {}, merge_blocks: bool = False)[source]#
Bases:
GeneratorTool
A base class for tools that wrap Steamship Audio Generator plugins.
- class steamship.agents.tools.base_tools.GeneratorTool(*, name: str, agent_description: str, human_description: str, generator_plugin_handle: str, generator_plugin_instance_handle: Optional[str] = None, generator_plugin_config: dict = {}, merge_blocks: bool = False)[source]#
Bases:
Tool
A base class for tools that wrap Steamship Generator plugins. Subclass this and implement the accept_output_block method.
- post_process(task: Task, context: AgentContext) List[Block] [source]#
In this case, the Generator returns a GeneratorResponse that has a .blocks method on it
- run(tool_input: List[Block], context: AgentContext) Union[List[Block], Task[Any]] [source]#
Run the tool given the provided input and context.
At the moment, only synchronous Tools (those that return List[Block]) are supported.
Support for asynchronous Tools (those that return Task[Any]) will be added shortly.
- class steamship.agents.tools.base_tools.ImageBlockifierTool(*, name: str, agent_description: str, human_description: str, blockifier_plugin_handle: str, blockifier_plugin_instance_handle: Optional[str] = None, blockifier_plugin_config: dict = {})[source]#
Bases:
ScrapeAndBlockifyTool
A base class for tools that wrap Steamship Image Blockifier plugins.
- class steamship.agents.tools.base_tools.ImageGeneratorTool(*, name: str, agent_description: str, human_description: str, generator_plugin_handle: str, generator_plugin_instance_handle: Optional[str] = None, generator_plugin_config: dict = {}, merge_blocks: bool = False)[source]#
Bases:
GeneratorTool
A base class for tools that wrap Steamship Image Generator plugins.
- class steamship.agents.tools.base_tools.ScrapeAndBlockifyTool(*, name: str, agent_description: str, human_description: str, blockifier_plugin_handle: str, blockifier_plugin_instance_handle: Optional[str] = None, blockifier_plugin_config: dict = {})[source]#
Bases:
Tool
A base class for tools that wrap Steamship Blockifier plugin which transforms bytes to a set of blocks.
- post_process(task: Task, context: AgentContext) List[Block] [source]#
In this case, the Blockifier returns a BlockAndTagResponse that has a .file.blocks method on it
- run(tool_input: List[Block], context: AgentContext) Union[List[Block], Task[Any]] [source]#
Run the tool given the provided input and context.
At the moment, only synchronous Tools (those that return List[Block]) are supported.
Support for asynchronous Tools (those that return Task[Any]) will be added shortly.
Module contents#
- class steamship.agents.tools.AudioBlockifierTool(*, name: str, agent_description: str, human_description: str, blockifier_plugin_handle: str, blockifier_plugin_instance_handle: Optional[str] = None, blockifier_plugin_config: dict = {})[source]#
Bases:
ScrapeAndBlockifyTool
A base class for tools that wrap Steamship Audio Blockifier plugins.
- class steamship.agents.tools.AudioGeneratorTool(*, name: str, agent_description: str, human_description: str, generator_plugin_handle: str, generator_plugin_instance_handle: Optional[str] = None, generator_plugin_config: dict = {}, merge_blocks: bool = False)[source]#
Bases:
GeneratorTool
A base class for tools that wrap Steamship Audio Generator plugins.
- class steamship.agents.tools.GeneratorTool(*, name: str, agent_description: str, human_description: str, generator_plugin_handle: str, generator_plugin_instance_handle: Optional[str] = None, generator_plugin_config: dict = {}, merge_blocks: bool = False)[source]#
Bases:
Tool
A base class for tools that wrap Steamship Generator plugins. Subclass this and implement the accept_output_block method.
- 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.
- name: str#
The short name for the tool. This will be used by Agents to refer to this tool during action selection.
- post_process(task: Task, context: AgentContext) List[Block] [source]#
In this case, the Generator returns a GeneratorResponse that has a .blocks method on it
- run(tool_input: List[Block], context: AgentContext) Union[List[Block], Task[Any]] [source]#
Run the tool given the provided input and context.
At the moment, only synchronous Tools (those that return List[Block]) are supported.
Support for asynchronous Tools (those that return Task[Any]) will be added shortly.
- class steamship.agents.tools.ImageBlockifierTool(*, name: str, agent_description: str, human_description: str, blockifier_plugin_handle: str, blockifier_plugin_instance_handle: Optional[str] = None, blockifier_plugin_config: dict = {})[source]#
Bases:
ScrapeAndBlockifyTool
A base class for tools that wrap Steamship Image Blockifier plugins.
- class steamship.agents.tools.ImageGeneratorTool(*, name: str, agent_description: str, human_description: str, generator_plugin_handle: str, generator_plugin_instance_handle: Optional[str] = None, generator_plugin_config: dict = {}, merge_blocks: bool = False)[source]#
Bases:
GeneratorTool
A base class for tools that wrap Steamship Image Generator plugins.
- class steamship.agents.tools.ScrapeAndBlockifyTool(*, name: str, agent_description: str, human_description: str, blockifier_plugin_handle: str, blockifier_plugin_instance_handle: Optional[str] = None, blockifier_plugin_config: dict = {})[source]#
Bases:
Tool
A base class for tools that wrap Steamship Blockifier plugin which transforms bytes to a set of blocks.
- 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.
- name: str#
The short name for the tool. This will be used by Agents to refer to this tool during action selection.
- post_process(task: Task, context: AgentContext) List[Block] [source]#
In this case, the Blockifier returns a BlockAndTagResponse that has a .file.blocks method on it
- run(tool_input: List[Block], context: AgentContext) Union[List[Block], Task[Any]] [source]#
Run the tool given the provided input and context.
At the moment, only synchronous Tools (those that return List[Block]) are supported.
Support for asynchronous Tools (those that return Task[Any]) will be added shortly.