Skip to content

Restore instructions from transcript#156

Merged
pcuenca merged 1 commit into
huggingface:mainfrom
finnvoor:restore-instructions-from-transcript
Jul 2, 2026
Merged

Restore instructions from transcript#156
pcuenca merged 1 commit into
huggingface:mainfrom
finnvoor:restore-instructions-from-transcript

Conversation

@finnvoor

@finnvoor finnvoor commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

in order to 100% restore a session from a transcript (necessary to maintain cache for some models), the system instructions should be loaded from the transcript. Right now they are nil when using the transcript init of LangaugeModelSession.

  • Restore session-level instructions when constructing a LanguageModelSession from a transcript with a leading instructions entry
  • Recover the instruction text directly from the single text segment emitted by LanguageModelSession, preserving it byte-for-byte
  • Add one focused regression test for transcript-based instruction restoration

@finnvoor finnvoor marked this pull request as draft April 26, 2026 13:47
@finnvoor finnvoor force-pushed the restore-instructions-from-transcript branch 2 times, most recently from ba7395f to 3892da1 Compare April 26, 2026 13:49
@finnvoor finnvoor force-pushed the restore-instructions-from-transcript branch from 3892da1 to deab898 Compare April 26, 2026 13:56
@finnvoor finnvoor changed the title Restore session instructions from transcripts Restore instructions from transcript Apr 26, 2026
@finnvoor finnvoor marked this pull request as ready for review April 26, 2026 14:03

@pcuenca pcuenca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @finnvoor, looks good to me.

@pcuenca pcuenca merged commit f22b78e into huggingface:main Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants