Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 764 Bytes

create-an-output-adapter.rst

File metadata and controls

17 lines (13 loc) · 764 Bytes

Creating a new output adapter

You can write your own output adapters by creating a new class that inherits from chatterbot.output.OutputAdapter and overrides the necessary methods established in the OutputAdapter class.

To create your own output adapter you must override the process_response method to return a Statement <conversation_statements> object.

Note that you may need to extend the __init__ method of your custom output adapter if you intend to save a kwarg parameter that was passed into the chat bot's constructor. (An API key might be an example of a parameter you would want to access here.)

../../chatterbot/output/output_adapter.py