Metadata-Version: 2.1
Name: micropython-eliza
Version: 0.1.0
Summary: ELIZA chatbot for MicroPython. Based on 'ELIZA' by Joseph Weizenbaum, 1966.
Project-URL: GitHub, https://github.com/denise-pl/micropython-ELIZA
Author-email: Szymon Jessa <szymon.coding@gmail.com>
License-File: LICENSE
Keywords: ELIZA,ai,chatbot,micropython,nlp
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: Implementation :: MicroPython
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# ELIZA for MicroPython

ELIZA is a retro chatbot that simulates a psychotherapist, based on the original 'ELIZA' script created by Joseph Weizenbaum in 1966. The detailed output provides insights into the workings of this iconic dialogue system and supports learning basic natural language processing concepts.

## How to install

```
python -m pip install --upgrade micropython_eliza
```

## How to run

Start chat in the console:
```
python -m micropython_eliza.chat
```

See an example conversation:
```
python -m micropython_eliza.demo
```

## How to use

```
import sys
from micropython_eliza import eliza

USERNAME_IN_CHAT = "YOU"

agent = eliza.create()
print("\n<press enter with no message to exit>")
print(f"{agent.name()}: {agent('')}")
print(f"{USERNAME_IN_CHAT}: ")
msg = sys.stdin.readline().strip()
while msg:
    print(f"{agent.name()}: {agent(msg)}")
    print(f"{USERNAME_IN_CHAT}: ")
    msg = sys.stdin.readline().strip()
```

To enable printing info and debug messages, provide log handlers, e.g.:
```
agent = eliza.create(log_info=print, log_debug=print)
```
