assistant2: Include the thread summary in the Markdown representation (#26693)
This PR adds the thread's summary (if it has one) as a heading in the Markdown representation. Release Notes: - N/A
This commit is contained in:
parent
2eb4d6b7eb
commit
1be3f81920
1 changed files with 4 additions and 0 deletions
|
@ -799,6 +799,10 @@ impl Thread {
|
||||||
pub fn to_markdown(&self) -> Result<String> {
|
pub fn to_markdown(&self) -> Result<String> {
|
||||||
let mut markdown = Vec::new();
|
let mut markdown = Vec::new();
|
||||||
|
|
||||||
|
if let Some(summary) = self.summary() {
|
||||||
|
writeln!(markdown, "# {summary}\n")?;
|
||||||
|
};
|
||||||
|
|
||||||
for message in self.messages() {
|
for message in self.messages() {
|
||||||
writeln!(
|
writeln!(
|
||||||
markdown,
|
markdown,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue