Skip to content

Conversation

@mattt
Copy link
Owner

@mattt mattt commented Dec 11, 2025

Resolves #52

@mattt mattt force-pushed the mattt/system-transcript branch from 8f91c7e to 79e7d3a Compare December 11, 2025 13:27
@mattt mattt requested a review from Copilot December 11, 2025 13:27
@mattt mattt marked this pull request as ready for review December 11, 2025 13:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the SystemLanguageModel integration with Apple's FoundationModels framework by passing entire conversation transcripts instead of just instructions. This enables multi-turn conversations and richer context to be preserved when interacting with Apple Intelligence models.

Key changes:

  • Changed ToolDefinition.parameters access level from private to internal to support conversion to FoundationModels format
  • Updated SystemLanguageModel to pass full transcripts to FoundationModels sessions in respond() and streamResponse() methods
  • Added comprehensive conversion logic to transform AnyLanguageModel transcript entries (instructions, prompts, responses, tool calls, tool outputs) to FoundationModels format

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
Sources/AnyLanguageModel/Transcript.swift Made ToolDefinition.parameters internal to allow access for FoundationModels conversion
Sources/AnyLanguageModel/Models/SystemLanguageModel.swift Replaced instructions-only parameter with full transcript conversion in session creation; added conversion extensions for Transcript, Segment arrays, and ToolDefinition arrays

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mattt mattt merged commit c2ce310 into main Dec 17, 2025
9 checks passed
@mattt mattt deleted the mattt/system-transcript branch December 17, 2025 11:04
@mattt
Copy link
Owner Author

mattt commented Dec 17, 2025

This is now in 0.5.1

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.

Session transcript not used as conversation context - model has no memory of previous turns

2 participants