Skip to content

Conversation

aaudin90
Copy link

1. Introduction of ChatCompletionResponseData:
A new class, ChatCompletionResponseData, has been created to encapsulate the content and reasoning content of chat completions. This provides a structured way to handle the data returned from the OpenAI API.

2. Refactoring of Completion Event Listeners:
The CompletionEventListener generic type has been updated from String to ChatCompletionResponseData in the AzureClient, CodeGPTClient, OllamaClient, and OpenAIClient. This change ensures that the listeners now receive a well-defined object instead of a raw string, enhancing type safety and clarity.

3. Modifications in Event Source Listeners:
The OpenAIChatCompletionEventSourceListener has been modified to handle ChatCompletionResponseData, allowing it to extract and return structured data from the API responses.

Copy link
Owner

Choose a reason for hiding this comment

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

Can we create a new overloaded method instead? This is a breaking change and would require other apps to rewrite their code as well.

@carlrobertoh carlrobertoh force-pushed the master branch 2 times, most recently from 0cb1e40 to 8a2bf0a Compare July 21, 2025 10:02
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