Skip to content

Commit

Permalink
Add details about directory structure of custom logic adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
gunthercox committed Nov 30, 2016
1 parent 2e9c6c8 commit 568bab9
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/logic/create-a-logic-adapter.rst
Expand Up @@ -38,6 +38,32 @@ Example logic adapter
return confidence, selected_statement
Directory structure
===================

If you create your own logic adapter you will need to have it in a seperate file from your chat bot.
Your directory setup should look something like the following:

.. code-block:: text
project_directory
├── cool_chatbot.py
└── cool_adapter.py
Then assuming that you have a class named :code:`MyLogicAdapter` in your *cool_chatbot.py* file,
you should be able to specify the following when you initialize your chat bot.

.. code-block:: python
ChatBot(
# ...
logic_adapters=[
{
'import_path': 'cool_chatbot.MyLogicAdapter'
}
]
)
Responding to specific input
============================

Expand Down

0 comments on commit 568bab9

Please sign in to comment.