Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions crates/symphony/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,13 @@ impl Format {
.map(|transition| transition.to)
}

/// Every row of the table as `(from, on, to)`, in the order the rows were added.
pub(crate) fn transitions(&self) -> impl Iterator<Item = (usize, usize, usize)> + '_ {
self.transitions
.iter()
.map(|transition| (transition.from, transition.on, transition.to))
}

/// The call syntax, for a format with an arguments state.
pub(crate) fn call_syntax(&self) -> Option<&CallSyntax> {
self.calls.as_ref()
Expand Down
2 changes: 1 addition & 1 deletion crates/symphony/src/formats/ling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub fn ling() -> Format {
.transition("content", "call_open", "call")
.transition("call", "call_close", "content")
.transition("call", "call_open", "call")
.calls(CallSyntax::Keyed(keyed::Tags::PLAIN))
.calls(CallSyntax::Keyed(keyed::Tags::LING))
.opens_turn("<role>ASSISTANT</role>")
}

Expand Down
Loading
Loading