Skip to content

Commit a2bea8f

Browse files
update branch
1 parent c2b0512 commit a2bea8f

File tree

299 files changed

+6615553
-5036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

299 files changed

+6615553
-5036
lines changed

.github/workflows/build_and_publish_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ jobs:
9090

9191
- name: print link to the documentation
9292
run: |
93-
echo "https://deeppavlov.github.io/chatsky-llm-autoconfig/${{ github.head_ref || github.ref_name }}"
93+
echo "https://deeppavlov.github.io/dialog2graph/${{ github.head_ref || github.ref_name }}"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: build_and_publish_release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
if: github.ref == 'refs/heads/main'
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.11"
18+
19+
- name: Install Poetry
20+
uses: snok/install-poetry@v1
21+
with:
22+
virtualenvs-create: false
23+
24+
- name: Configure Poetry
25+
run: |
26+
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
27+
poetry config http-basic.pypi __token__ ${{ secrets.PYPI_API_TOKEN }}
28+
29+
- name: Build and publish
30+
run: |
31+
poetry build
32+
poetry publish
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: check_metrics
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- dev
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: ${{ github.ref != 'refs/heads/dev' && github.ref != 'refs/heads/master' }}
12+
13+
jobs:
14+
test_cov_ubuntu_latest:
15+
runs-on: ubuntu-latest
16+
env:
17+
SQLALCHEMY_DATABASE_URI: ${{ secrets.SQLALCHEMY_DATABASE_URI }}
18+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
19+
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
20+
HUGGINGFACE_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: set up python '3.11'
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.11'
28+
29+
- name: setup poetry and install dependencies
30+
run: |
31+
python -m pip install --upgrade pip poetry
32+
python -m poetry install --with tests --no-ansi --no-interaction
33+
34+
- name: run check_metrics
35+
env:
36+
SQLALCHEMY_DATABASE_URI: ${{ secrets.SQLALCHEMY_DATABASE_URI }}
37+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
38+
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
39+
HUGGINGFACE_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}
40+
run: |
41+
python -m poetry run poe check_metrics || exit 1

.github/workflows/test_release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: test_release
2+
3+
on:
4+
push:
5+
branches: '**'
6+
pull_request:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ github.ref != 'refs/heads/dev' && github.ref != 'refs/heads/main' }}
14+
15+
jobs:
16+
test_full:
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version: ["3.10", "3.11", "3.12"]
21+
os: [macOS-latest, windows-latest, ubuntu-latest]
22+
runs-on: ${{ matrix.os }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: set up python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: setup poetry and install dependencies
32+
run: |
33+
python -m pip install --upgrade pip poetry==1.8.4
34+
35+
- name: build release
36+
run: |
37+
python -m poetry build
38+
39+
- name: install and test installed package
40+
shell: bash
41+
run: |
42+
python -m venv test_env
43+
. ${GITHUB_WORKSPACE}/test_env/bin/activate || . ${GITHUB_WORKSPACE}/test_env/Scripts/activate
44+
pip install ./dist/*.whl
45+
pip install pytest
46+
# Debug information
47+
echo "Current directory: $(pwd)"
48+
echo "Directory contents:"
49+
ls -la
50+
# Actually run the tests with explicit path
51+
python -m pytest tests/ -v

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ test.ipynb
1414
docs/build
1515
.ruff_cache
1616
.coverage
17-
htmlcov
17+
htmlcov
18+
dist

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Contributing to Dialogue2Graph
1+
# Contributing to Dialog2Graph
22

3-
Thank you for your interest in contributing to the Dialogue2Graph project! We welcome contributions from the community to help improve and expand Dialogue2Graph tool.
3+
Thank you for your interest in contributing to the Dialog2Graph project! We welcome contributions from the community to help improve and expand Dialog2Graph tool.
44

55
## Getting Started
66

@@ -33,7 +33,7 @@ poetry update
3333

3434
## How to Contribute
3535

36-
1. Experiment with the graphs (see the following section for a detail) or add new features to Dialogue2Graph tool
36+
1. Experiment with the graphs (see the following section for a detail) or add new features to Dialog2Graph tool
3737

3838
2. Check linting and try to reformat your code running
3939

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Dialogue2Graph
1+
# Dialog2Graph
22

3-
Dialogue2Graph allows you to effortlessly create *chatsky flows* and scripts from dialogues using Large Language Models.
3+
Dialog2Graph allows you to effortlessly create *chatsky flows* and scripts from dialogs using Large Language Models.
44

55
## Contents
66

77
```
8-
./dialogue2graph - source code
8+
./dialog2graph - source code
99
./examples - usage scenarios
1010
./experiments - test field for conducting experiments
1111
./prompt_cache - utils for LLM output caching
@@ -36,8 +36,8 @@ pipx install poetry==1.8.4
3636
Clone this repo and install project dependencies
3737

3838
```bash
39-
git clone https://github.com/deeppavlov/dialogue2graph.git
40-
cd dialogue2graph
39+
git clone https://github.com/deeppavlov/dialog2graph.git
40+
cd dialog2graph
4141
poetry install
4242
```
4343

@@ -61,11 +61,11 @@ Create `.env` file to store credentials
6161

6262
### Generate synthetic graph on certain topic
6363

64-
Choose LLMs for generating and validating dialogue graph and invoke graph generation
64+
Choose LLMs for generating and validating dialog graph and invoke graph generation
6565

6666
```python
67-
from dialogue2graph.datasets.complex_dialogues.generation import LoopedGraphGenerator
68-
from langchain_openai import ChatOpenAI
67+
from dialog2graph.datasets.complex_dialogs.generation import LoopedGraphGenerator
68+
from langchain_community.chat_models import ChatOpenAI
6969

7070

7171
gen_model = ChatOpenAI(
@@ -88,20 +88,20 @@ pipeline = LoopedGraphGenerator(
8888
generated_graph = pipeline.invoke(topic="restaurant reservation")
8989
```
9090

91-
### Sample dialogues from existing dialogue graph
91+
### Sample dialogs from existing dialog graph
9292

93-
Create graph instance and invoke sampler to get dialogue list
93+
Create graph instance and invoke sampler to get dialog list
9494

9595
```python
96-
from dialogue2graph.pipelines.core.dialogue_sampling import RecursiveDialogueSampler
97-
from dialogue2graph.pipelines.core.graph import Graph
96+
from dialog2graph.pipelines.core.dialog_sampling import RecursiveDialogSampler
97+
from dialog2graph.pipelines.core.graph import Graph
9898

9999
G = Graph(graph_dict={...})
100100

101-
sampler = RecursiveDialogueSampler()
102-
sampler.invoke(graph=G) #-> list of Dialogue objects
101+
sampler = RecursiveDialogSampler()
102+
sampler.invoke(graph=G) #-> list of Dialog objects
103103
```
104104

105105
## How to Contribute
106106

107-
See contribution guideline [CONTRIBUTING.md](https://github.com/deeppavlov/dialogue2graph/blob/dev/CONTRIBUTING.md)
107+
See contribution guideline [CONTRIBUTING.md](https://github.com/deeppavlov/dialog2graph/blob/dev/CONTRIBUTING.md)
File renamed without changes.

dialog2graph/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from dialog2graph.pipelines.core.dialog import Dialog
2+
from dialog2graph.pipelines.core.graph import Graph
3+
4+
__all__ = ["Dialog", "Graph"]

0 commit comments

Comments
 (0)