You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-36Lines changed: 9 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ cd dialog2graph
41
41
poetry install
42
42
```
43
43
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.
45
45
46
46
```bash
47
47
poetry add pygraphviz
@@ -59,48 +59,21 @@ Create `.env` file to store credentials
59
59
60
60
## How to Use
61
61
62
-
### Generate synthetic graph on certain topic
62
+
See `dialog2graph` usage examples:
63
63
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)
65
65
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)
69
67
68
+
3.[Generate dialog graph using LLMs](https://github.com/deeppavlov/dialog2graph/blob/dev/examples/data_generation/LoopedGraphGenerator_example.ipynb)
70
69
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)
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)
94
75
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)
0 commit comments