Dialog2Graph allows you to effortlessly create chatsky flows and scripts from dialogs using Large Language Models.
./dialog2graph - source code
./examples - usage scenarios
./experiments - test field for conducting experiments
./prompt_cache - utils for LLM output caching
./scripts - scripts for `poethepoet` automation
Supported graph types:
- chain
- single cycle
- multi-cycle graph
- complex graph with cycles
Currently unsupported graph types:
- single node cycle
Install poetry v. 1.8.4 (detailed installation guide)
pipx install poetry==1.8.4Clone this repo and install project dependencies
git clone https://github.com/deeppavlov/dialog2graph.git
cd dialog2graph
poetry installConsider installing PyGraphviz from here, if you are planning to visualize your graphs. Then add it to the poetry environment.
poetry add pygraphvizEnsure that dependencies were installed correctly by running any Python script
poetry run python <your_file_name>.pyCreate .env file to store credentials
Note: never hardcode your personal tokens and other sensitive credentials. Use the .env file to store them.
See dialog2graph usage examples:
See contribution guideline CONTRIBUTING.md