Skip to content

Commit b47dcd2

Browse files
Release v0.3.0
1 parent 28f69e5 commit b47dcd2

File tree

5 files changed

+103
-46
lines changed

5 files changed

+103
-46
lines changed

CHANGELOG.md

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,53 @@
22

33
All notable changes to SDialog will be documented here.
44

5-
## [0.1.0] 2025-08-05
5+
---
6+
7+
## [0.3.0] 2025-09-03 🚀
8+
9+
### Added
10+
- **sdialog**:
11+
- `Context`: new class class to explicitly model the common/shared context of conversations (#73)
12+
- `Dialog`: merge functionality - Added option to merge consecutive turns of the same speaker when loading a dialog (#77)
13+
- `Dialog`: built-in string support - Added support to built-in str functions for `Dialog` class (#83)
14+
- **sdialog.agents**: Added new `sdialog.agents` module and moved `Agent` class inside (#81)
15+
- `Agent`: thinking capabilities - Agents can now handle internal thinking processes (#95)
16+
- `Agent`: tools support - Added tools capabilities to Agents (e.g. RAG or any other function) (#84)
17+
- New tutorial for agents with tools and thoughts.
18+
- **sdialog.generators**:
19+
- `ContextGenerator`: new class added to explicitly model the common/shared context of conversations (#73)
20+
- `Paraphraser`: new class class to paraphrase dialogues (#76)
21+
- **sdialog.evaluation**:
22+
- `LinguisticFeatureScore`: new class added to compute Flesch reading ease, Gunning fog, Hesitation rate, and/or Mean turn length (#63)
23+
- **sdialog.personas**:
24+
- `Customer` and `SupportAgent`: new personas added for customer service dialogues (#85)
25+
- `Persona`: Added static method to get the list of all attributes in `Persona` class (#79)
26+
27+
28+
### Changed
29+
- **sdialog**: Improved metadata handling (#66)
30+
- **sdialog.interpretability**: Improved and simplified the way inspection targets are defined in `interpretability` submodule (#78)
31+
- **sdialog.evaluation.base**:
32+
- `LLMJudgeYesNoOutput`: Renamed attribute `yes` to `positive` (#86)
33+
- `LLMJudgeScoreOutput`: Renamed attribute `feedback` to `reason` (#86)
34+
35+
### Fixed
36+
- **sdialog.generators**: Fixed potential bug in `PersonaDialogGenerator` class (#67)
37+
38+
39+
### Enhanced
40+
- **sdialog.agents**: Added `base_model` attribute to `Agent` to direclty access the LLM's underlying model (#74)
41+
- **sdialog.config**: Added `clear_cache()` method to config (#75)
42+
43+
### Documentation
44+
- API Documentation: Refactored/cleaned all components and added docstrings with examples (#82, #88)
45+
- Updated all tutorials to work with new code and added "Open in Colab" badges
46+
- Completed API documentation for initial official release (#87)
47+
- Automatic generation of `llm.txt` from API documentation (24f6ee6)
48+
49+
---
50+
51+
## [0.1.0] 2025-08-05 🌱
652

753
### Added
854
- Multi-backend support (Hugging Face, Ollama, OpenAI, AWS)
@@ -20,7 +66,7 @@ All notable changes to SDialog will be documented here.
2066
- Audio module (`sdialog.audio`) integration
2167
- Documentation updates
2268

23-
## [0.0.2] 2025-06-03
69+
## [0.0.2] 2025-06-03 🔧
2470

2571
### Added
2672
- `language` attribute to `Persona` class
@@ -41,7 +87,8 @@ All notable changes to SDialog will be documented here.
4187
- Python 2 and 3 compatibility problem with scikit-learn (using version 0.20.1 from now on)
4288
- PyPi: setup.py: `long_description_content_type` set to `'text/markdown'`
4389

90+
---
4491

45-
## [0.0.1] 2025-05-22
92+
## [0.0.1] 2025-05-22 🎉
4693

4794
_(initial release)_

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,14 @@ ReadTheDocs latest build list: https://app.readthedocs.org/projects/sdialog/
4646

4747
## Release (PyPI)
4848

49-
1. Bump version in `src/sdialog/util.py` (follow semver)
49+
1. Update version in `src/sdialog/util.py` (follow semver)
5050
2. Update CHANGELOG (if present)
5151
3. Tag & push
52+
```bash
53+
git commit -m "Release v0.x.x"
54+
git tag v0.x.x
55+
git push origin main --tags
56+
```
5257
4. Build & upload:
5358
```bash
5459
python -m build

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SDialog is a modular Python toolkit for synthetic dialog generation, evaluation,
1414
Quick links: [Docs](https://sdialog.readthedocs.io)[API](https://sdialog.readthedocs.io/en/latest/api/sdialog.html)[Demo (Colab)](https://colab.research.google.com/github/idiap/sdialog/blob/main/tutorials/0.demo.ipynb)[Tutorials](https://github.com/idiap/sdialog/tree/main/tutorials)[Issues](https://github.com/idiap/sdialog/issues)
1515

1616
## ✨ Key features
17-
- Standard Dialog schema with JSON import/export _(aiming to help standardize dialog datasets with community support)_
17+
- Standard [Dialog](https://sdialog.readthedocs.io/en/latest/sdialog/index.html#dialog) schema with JSON import/export _(aiming to help standardize dialog datasets with community support)_
1818
- Persona‑driven multi‑agent simulation with contexts, tools, and thoughts
1919
- Composable orchestration for precise control over behavior and flow
2020
- Built‑in evaluation (metrics + LLM‑as‑judge) for comparison and iteration

docs/sdialog/index.rst

Lines changed: 45 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -48,52 +48,19 @@ A :class:`~sdialog.Dialog` object contains an ordered list of :class:`~sdialog.T
4848
- **Turn**: Has ``speaker`` and ``text`` fields.
4949
- **Event**: Generic action record (utterance, instruction, tool invocation, etc.).
5050
- **Metadata**: Provenance for reproducibility (version, timestamp, id, parentId, seed, model, etc.).
51-
- **Methods**: Text transforms (:meth:`~sdialog.Dialog.lower`, :meth:`~sdialog.Dialog.upper`, :meth:`~sdialog.Dialog.replace`, :meth:`~sdialog.Dialog.re_sub`, etc.), utilities (:meth:`~sdialog.Dialog.prompt`, :meth:`~sdialog.Dialog.rename_speaker`, :meth:`~sdialog.Dialog.filter`, :meth:`~sdialog.Dialog.get_speakers`, etc.), serialization (:meth:`~sdialog.Dialog.to_file`, :meth:`~sdialog.Dialog.from_file`), cloning with lineage (:meth:`~sdialog.Dialog.clone`), and :meth:`~sdialog.Dialog.length` estimation (words / turns / minutes).
51+
- **Methods**: Text transforms at dialog level (:meth:`~sdialog.Dialog.lower`, :meth:`~sdialog.Dialog.upper`, :meth:`~sdialog.Dialog.replace`, :meth:`~sdialog.Dialog.re_sub`, etc.), utilities (:meth:`~sdialog.Dialog.prompt`, :meth:`~sdialog.Dialog.rename_speaker`, :meth:`~sdialog.Dialog.filter`, :meth:`~sdialog.Dialog.get_speakers`, etc.), serialization (:meth:`~sdialog.Dialog.to_file`, :meth:`~sdialog.Dialog.from_file`), cloning with lineage (:meth:`~sdialog.Dialog.clone`), and :meth:`~sdialog.Dialog.length` estimation (words / turns / minutes).
5252

53-
**Operations Example**:
54-
55-
.. code-block:: python
56-
57-
from sdialog import Dialog, Turn
58-
59-
# Create a sample dialog
60-
dialog = Dialog(turns=[
61-
Turn(speaker="Alice", text="Hello there! How are you doing today?"),
62-
Turn(speaker="Bob", text="I'm doing great, thanks for asking."),
63-
Turn(speaker="Alice", text="That's wonderful to hear!"),
64-
Turn(speaker="Bob", text="What about you? How's YOUR DAY going?")
65-
])
66-
67-
# Slicing creates new Dialog with fresh ID and parentId linkage
68-
first_half = dialog[:2] # First 2 turns → new Dialog with dialog.id as parentId
69-
print(f"Original ID: {dialog.id}")
70-
print(f"Slice ID: {first_half.id}, Parent: {first_half.parentId}")
71-
72-
# Text transformations examples
73-
normalized = dialog.lower().replace("!", ".") # Chain operations
74-
filtered_alice = dialog.filter("Alice") # Only Alice's turns
75-
dialog_alicia = dialog.rename_speaker("Alice", "Alicia") # Rename speaker
76-
77-
# Print some information
78-
print(f"Length: {len(dialog)} turns") # len(dialog) == dialog.length('turns')
79-
print(f"Length: {dialog.length('words')} words, approx. {dialog.length('time')} minutes")
80-
print(f"Speakers: {dialog.get_speakers()}")
81-
82-
# Iterate over dialog turns
83-
for ix, turn in enumerate(dialog_alicia):
84-
print(f"Turn {ix+1}: {turn.speaker} - {turn.text}")
53+
**Creating Dialog from Text**:
8554

86-
Instead of creating the Dialog object programmatically as above, you can also load it from text files or strings using a simple template format with :meth:`~sdialog.Dialog.from_file` or :meth:`~sdialog.Dialog.from_str` methods, respectively.
55+
Dialog objects can be created programmatically or you can simply created from plain text, either a string or txt file, using :meth:`~sdialog.Dialog.from_str` or :meth:`~sdialog.Dialog.from_file` methods, respectively.
8756
Both methods accept the same arguments and ``Dialog.from_str(text)`` is equivalent to ``Dialog.from_file("file.txt")`` when the file contains plain text.
88-
The most common cases are shown below with three examples:
89-
90-
**Creating Dialog from Text**:
57+
Below it is shown examples of three typical use cases:
9158

9259
.. code-block:: python
9360
9461
from sdialog import Dialog, Turn
9562
96-
# Basic usage - Text in default "{speaker}: {text}" format
63+
# 1) Basic usage - Text in default "{speaker}: {text}" format
9764
dialog_text = """Alice: Hello there! How are you today?
9865
Bob: I'm doing great, thanks for asking.
9966
Alice: That's wonderful to hear!
@@ -102,7 +69,7 @@ The most common cases are shown below with three examples:
10269
dialog = Dialog.from_str(dialog_text)
10370
dialog.print()
10471
105-
# Text in custom format
72+
# 2) Text in custom format
10673
chat_log = """[2024-01-15 14:30] @user123: Hey everyone!
10774
[2024-01-15 14:31] @moderator: Welcome to the chat
10875
[2024-01-15 14:32] @user123: Thanks, excited to be here!
@@ -115,7 +82,7 @@ The most common cases are shown below with three examples:
11582
)
11683
dialog_from_chat.print()
11784
118-
# Text with no speaker tags
85+
# 3) Text with no speaker tags
11986
simple_conversation = """Hello there!
12087
Hi, how are you?
12188
I'm doing well, thanks!
@@ -129,6 +96,44 @@ The most common cases are shown below with three examples:
12996
)
13097
dialog_with_defaults.print()
13198
99+
**Operations Example**:
100+
101+
Below is a compact walkthrough demonstrating common Dialog manipulations—creating a dialog programmatically, slicing (which preserves lineage), chaining text transformations, selective speaker filtering, speaker renaming, length/statistics queries, and safe iteration over derived copies.
102+
103+
.. code-block:: python
104+
105+
from sdialog import Dialog, Turn
106+
107+
# Let's first create a sample dialog programatically
108+
dialog = Dialog(turns=[
109+
Turn(speaker="Alice", text="Hello there! How are you doing today?"),
110+
Turn(speaker="Bob", text="I'm doing great, thanks for asking."),
111+
Turn(speaker="Alice", text="That's wonderful to hear!"),
112+
Turn(speaker="Bob", text="What about you? How's YOUR DAY going?")
113+
])
114+
115+
# Slicing creates new Dialog with fresh ID and parentId linkage
116+
first_half = dialog[:2] # First 2 turns → new Dialog with dialog.id as parentId
117+
print(f"Original ID: {dialog.id}")
118+
print(f"Slice ID: {first_half.id}, Parent: {first_half.parentId}")
119+
120+
# Text transformations examples
121+
normalized = dialog.lower().replace("!", ".") # Chain operations
122+
filtered_alice = dialog.filter("Alice") # Only Alice's turns
123+
dialog_alicia = dialog.rename_speaker("Alice", "Alicia") # Rename speaker
124+
125+
# Print some information
126+
print(f"Length: {len(dialog)} turns") # len(dialog) == dialog.length('turns')
127+
print(f"Length: {dialog.length('words')} words, approx. {dialog.length('time')} minutes")
128+
print(f"Speakers: {dialog.get_speakers()}")
129+
130+
# Iterate over dialog turns
131+
for ix, turn in enumerate(dialog_alicia):
132+
print(f"Turn {ix+1}: {turn.speaker} - {turn.text}")
133+
134+
# Save to JSON with metadata
135+
dialog_alicia.to_file("dialog_alicia.json")
136+
132137
133138
Personas & Context
134139
------------------

src/sdialog/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
logger = logging.getLogger(__name__)
3737

38-
__version__ = "0.1.0"
38+
__version__ = "0.3.0"
3939

4040

4141
def _get_dynamic_version() -> str:

0 commit comments

Comments
 (0)