Skip to content

Conversation

@Norne9
Copy link
Owner

@Norne9 Norne9 commented Apr 29, 2024

This pull request introduces an optional parameter, IHistoryTransform? transform, to the InitializeSessionFromHistoryAsync method in the ChatSession class. This change accommodates models that require specific formatting of the chat history.

Some language models may require the chat history to be formatted in a specific way before being passed to the model for generating a response. The addition of the IHistoryTransform parameter allows for the flexibility to apply custom transformations to the chat history when initializing a new session.

This change maintains backward compatibility with existing code that does not provide a custom history transform by making the transform parameter optional and defaulting it to null.

ChatSession.InitializeSessionFromHistoryAsync now accepts IHistoryTransform as an optional parameter.
@Norne9 Norne9 merged commit 5c60e6d into master Apr 29, 2024
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