Skip to content

Chatbot

Sayad Uddin Tahsin edited this page Apr 9, 2023 · 1 revision

get_response(key: str, prompt: str)

Get response from Chatbot!

Parameters

  • text (str): Access Key (at least tier 1)
  • prompt (str): The message
Returns
  • str: Chatbot Response

Exceptions

  • APITimeout: Raised when the API takes too long to respond.
  • APIError: Raised when the API returns an error.

Example

from sra import chatbot

# Get the Response
response = chatbot.get_response("Hi There!")
Clone this wiki locally