Skip to content

Commit

Permalink
fix bug causing v3 failed
Browse files Browse the repository at this point in the history
  • Loading branch information
sdcb committed Oct 26, 2023
1 parent 4d5bfb4 commit a7c3507
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sdcb.SparkDesk.Tests/UnitTest1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public async Task ChatAsStreamV3Test()
{
SparkDeskClient c = CreateSparkDeskClient();
StringBuilder sb = new();
TokensUsage usage = await c.ChatAsStreamAsync(ModelVersion.V2, new ChatMessage[]
TokensUsage usage = await c.ChatAsStreamAsync(ModelVersion.V3, new ChatMessage[]
{
ChatMessage.FromUser("1+1=?"),
ChatMessage.FromAssistant("1+1=3"),
Expand Down
1 change: 1 addition & 0 deletions Sdcb.SparkDesk/ChatRequestParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public ChatRequestParametersInternal(ModelVersion version, ChatRequestParameters
{
ModelVersion.V1_5 => "general",
ModelVersion.V2 => "generalv2",
ModelVersion.V3 => "generalv3",
_ => throw new ArgumentOutOfRangeException(nameof(version), version, null),
};
}
Expand Down
2 changes: 1 addition & 1 deletion build/00-common.linq
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ static void DotNetRun(string args) => Run("dotnet", args, Encoding.GetEncoding("
static void Run(string exe, string args, Encoding encoding) => Util.Cmd(exe, args, encoding);
static ProjectVersion[] Projects = new[]
{
new ProjectVersion("Sdcb.SparkDesk", "2.1"),
new ProjectVersion("Sdcb.SparkDesk", "2.2"),
};

static async Task DownloadFile(Uri uri, string localFile, CancellationToken cancellationToken = default)
Expand Down

0 comments on commit a7c3507

Please sign in to comment.