steamship.experimental.package_starters namespace#

Submodules#

steamship.experimental.package_starters.telegram_agent module#

class steamship.experimental.package_starters.telegram_agent.TelegramAgentService(incoming_message_agent: Agent, **kwargs)[source]#

Bases: SteamshipWidgetAgentService, ABC

build_emit_func(chat_id: str) Callable[[List[Block], Dict[str, Any]], None][source]#
config: TelegramBotConfig#
classmethod config_cls() Type[Config][source]#

Return the Configuration class.

disconnect_webhook() InvocableResponse[str][source]#
incoming_message_agent: Agent#
info() dict[source]#

Endpoint returning information about this bot.

instance_init()[source]#

This instance init method is called automatically when an instance of this package is created. It registers the URL of the instance as the Telegram webhook for messages.

respond(**kwargs) InvocableResponse[str][source]#

Endpoint implementing the Telegram WebHook contract. This is a PUBLIC endpoint since Telegram cannot pass a Bearer token.

telegram_transport: TelegramTransport#
webhook_info() dict[source]#
class steamship.experimental.package_starters.telegram_agent.TelegramBotConfig(*, botToken: str)[source]#

Bases: Config

bot_token: str#

steamship.experimental.package_starters.telegram_bot module#

class steamship.experimental.package_starters.telegram_bot.TelegramBot(**kwargs)[source]#

Bases: SteamshipWidgetBot, ABC

config: TelegramBotConfig#
classmethod config_cls() Type[Config][source]#

Return the Configuration class.

disconnect_webhook() InvocableResponse[str][source]#
info() dict[source]#

Endpoint returning information about this bot.

instance_init()[source]#

This instance init method is called automatically when an instance of this package is created. It registers the URL of the instance as the Telegram webhook for messages.

respond(**kwargs) InvocableResponse[str][source]#

Endpoint implementing the Telegram WebHook contract. This is a PUBLIC endpoint since Telegram cannot pass a Bearer token.

telegram_transport: TelegramTransport#
webhook_info() dict[source]#
class steamship.experimental.package_starters.telegram_bot.TelegramBotConfig(*, botToken: str)[source]#

Bases: Config

bot_token: str#

steamship.experimental.package_starters.web_agent module#

class steamship.experimental.package_starters.web_agent.SteamshipWidgetAgentService(**kwargs)[source]#

Bases: AgentService, ABC

answer(**payload) List[Block][source]#

Endpoint that implements the contract for Steamship embeddable chat widgets. This is a PUBLIC endpoint since these webhooks do not pass a token.

steamship_widget_transport: SteamshipWidgetTransport#
steamship.experimental.package_starters.web_agent.response_for_exception(e: Optional[Exception], chat_id: Optional[str] = None) Block[source]#

steamship.experimental.package_starters.web_bot module#

class steamship.experimental.package_starters.web_bot.SteamshipWidgetBot(**kwargs)[source]#

Bases: PackageService, ABC

answer(**payload) List[Block][source]#

Endpoint that implements the contract for Steamship embeddable chat widgets. This is a PUBLIC endpoint since these webhooks do not pass a token.

abstract create_response(incoming_message: Block) Optional[List[Block]][source]#
steamship_widget_transport: SteamshipWidgetTransport#
steamship.experimental.package_starters.web_bot.response_for_exception(e: Optional[Exception], chat_id: Optional[str] = None) Block[source]#