Skip to content

Commit

Permalink
No Message
Browse files Browse the repository at this point in the history
  • Loading branch information
GeeksAmin committed Nov 10, 2024
1 parent 8b450c6 commit 4650f9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions Olive.Gpt/Api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,7 @@ public async IAsyncEnumerable<string> GetResponseStream(ChatMessage[] messages,
if (line.StartsWith("data: ")) line = line.Substring("data: ".Length);
if (line == "[DONE]") break;
if (!line.HasValue()) continue;

var token = JsonConvert.DeserializeObject<ChatResponse>(line)?.ToString();
if (!token.HasValue()) continue;

yield return token;
yield return line;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Olive.Gpt/Olive.Gpt.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>1.1.0</Version>
<Version>1.1.1</Version>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>

Expand Down

0 comments on commit 4650f9d

Please sign in to comment.