Skip to content

Commit 89fac53

Browse files
authored
Merge pull request #605 from betalgo/dev
8.5.1
2 parents d22864e + 9009a1d commit 89fac53

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

OpenAI.SDK/ObjectModels/ResponseModels/BaseResponse.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public record BaseResponse: ObjectBaseResponse
1414
{
1515
[JsonPropertyName("StreamEvent")]
1616
public string? StreamEvent { get; set; }
17+
public bool IsDelta => StreamEvent?.EndsWith("delta") ?? false;
18+
1719
public bool Successful => Error == null;
1820

1921
[JsonPropertyName("error")]

OpenAI.SDK/OpenAI.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageIcon>OpenAI-Betalgo.png</PackageIcon>
1111
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
1212
<Title>OpenAI SDK by Betalgo</Title>
13-
<Version>8.5.0</Version>
13+
<Version>8.5.1</Version>
1414
<Authors>Tolga Kayhan, Betalgo</Authors>
1515
<Company>Betalgo Up Ltd.</Company>
1616
<Product>OpenAI ChatGPT, Whisper, GPT-4 and DALL·E dotnet SDK</Product>

Readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ Due to time constraints, not all methods have been thoroughly tested or fully do
116116
Needless to say, I cannot accept responsibility for any damage caused by using the library.
117117

118118
## Changelog
119+
### 8.5.1
120+
- Introduced `IsDelta` into BaseResponseModel, which can help to determine if incoming data is part of the delta.
121+
-
119122
### 8.5.0
120123
- Assistant Stream now returns the `BaseResponse` type, but they can be cast to the appropriate types(`RunStepResponse`,`RunResponse`,`MessageResponse`). The reason for this change is that we realized the stream API returns multiple different object types rather than returning a single object type.
121124
- The Base Response now has a `StreamEvent` field, which can be used to determine the type of event while streaming.

0 commit comments

Comments
 (0)