Skip to content

Commit 42cc314

Browse files
committed
Update example info in README
1 parent 998fd21 commit 42cc314

File tree

1 file changed

+9
-36
lines changed

1 file changed

+9
-36
lines changed

README.md

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ cd dialog2graph
4141
poetry install
4242
```
4343

44-
If you are planning to visualize your graphs consider installing **PyGraphviz** from [here](https://pygraphviz.github.io/) and also add it to the poetry environment.
44+
Consider installing **PyGraphviz** from [here](https://pygraphviz.github.io/), if you are planning to visualize your graphs. Then add it to the poetry environment.
4545

4646
```bash
4747
poetry add pygraphviz
@@ -59,48 +59,21 @@ Create `.env` file to store credentials
5959

6060
## How to Use
6161

62-
### Generate synthetic graph on certain topic
62+
See `dialog2graph` usage examples:
6363

64-
Choose LLMs for generating and validating dialog graph and invoke graph generation
64+
1. [Learn base classes usage](https://github.com/deeppavlov/dialog2graph/blob/dev/examples/basics/base_classes_usage.ipynb)
6565

66-
```python
67-
from dialog2graph.datasets.complex_dialogs.generation import LoopedGraphGenerator
68-
from langchain_community.chat_models import ChatOpenAI
66+
2. [Learn dialog2graph pipelines and model configuration](https://github.com/deeppavlov/dialog2graph/blob/dev/examples/pipeline_usage/pipeline_example.ipynb)
6967

68+
3. [Generate dialog graph using LLMs](https://github.com/deeppavlov/dialog2graph/blob/dev/examples/data_generation/LoopedGraphGenerator_example.ipynb)
7069

71-
gen_model = ChatOpenAI(
72-
model='gpt-4o',
73-
api_key=os.getenv("OPENAI_API_KEY"),
74-
base_url=os.getenv("OPENAI_BASE_URL"),
75-
)
76-
val_model = ChatOpenAI(
77-
model='gpt-3.5-turbo',
78-
api_key=os.getenv("OPENAI_API_KEY"),
79-
base_url=os.getenv("OPENAI_BASE_URL"),
80-
temperature=0,
81-
)
70+
4. [Evaluate graph and dialogs](https://github.com/deeppavlov/dialog2graph/blob/dev/examples/evaluation/examples_of_metrics_usage.ipynb)
8271

83-
pipeline = LoopedGraphGenerator(
84-
generation_model=gen_model,
85-
validation_model=val_model,
86-
)
72+
5. [Learn CLI interface](https://github.com/deeppavlov/dialog2graph/blob/dev/examples/cli_usage/main.ipynb)
8773

88-
generated_graph = pipeline.invoke(topic="restaurant reservation")
89-
```
90-
91-
### Sample dialogs from existing dialog graph
92-
93-
Create graph instance and invoke sampler to get dialog list
74+
6. [Augment dialogs on dialog graph](https://github.com/deeppavlov/dialog2graph/blob/dev/examples/dialog_augmentation/dialogue_augmentation_example.ipynb)
9475

95-
```python
96-
from dialog2graph.pipelines.core.dialog_sampling import RecursiveDialogSampler
97-
from dialog2graph.pipelines.core.graph import Graph
98-
99-
G = Graph(graph_dict={...})
100-
101-
sampler = RecursiveDialogSampler()
102-
sampler.invoke(graph=G) #-> list of Dialog objects
103-
```
76+
7. [Extend a dialog graph](https://github.com/deeppavlov/dialog2graph/blob/dev/examples/dialog_extension/dialog_extender_example.ipynb)
10477

10578
## How to Contribute
10679

0 commit comments

Comments
 (0)