Skip to content

Commit

Permalink
switch to SpongeLLM.Core v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dclipca committed Jan 31, 2025
1 parent d2d6837 commit 5259f29
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<TargetFrameworks>net8.0;net6.0;net7.0</TargetFrameworks>
<Version>0.3.8.5</Version>
<Version>0.3.9.1</Version>
</PropertyGroup>

<ItemGroup>
Expand All @@ -15,7 +15,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="WireMock.Net" Version="1.7.0" />
<PackageReference Include="WireMock.Net" Version="1.7.1" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
8 changes: 4 additions & 4 deletions SpongeEngine.LMStudioSharp/LMStudioSharpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.Extensions.Logging;
using SpongeEngine.LLMSharp.Core.Exceptions;
using SpongeEngine.LMStudioSharp.Models.Completion;
using SpongeEngine.LMStudioSharp.Models.Model;
using SpongeEngine.SpongeLLM.Core;
using SpongeEngine.SpongeLLM.Core.Exceptions;
using SpongeEngine.SpongeLLM.Core.Interfaces;
using SpongeEngine.SpongeLLM.Core.Models;
using ChatRequest = SpongeEngine.LMStudioSharp.Models.Chat.ChatRequest;
Expand Down Expand Up @@ -156,7 +156,7 @@ private async Task HandleResponseError(HttpResponseMessage response, string erro
var content = await response.Content.ReadAsStringAsync();
Options.Logger?.LogError("Response error: Status={Status}, Content={Content}", response.StatusCode, content);

throw new LlmSharpException(
throw new SpongeLLMException(
errorMessage,
(int)response.StatusCode,
content);
Expand All @@ -171,7 +171,7 @@ private async Task<T> DeserializeResponse<T>(HttpResponseMessage response)
var result = JsonSerializer.Deserialize<T>(content, Options.JsonSerializerOptions);
if (result == null)
{
throw new LlmSharpException(
throw new SpongeLLMException(
"Null response after deserialization",
null,
content);
Expand All @@ -181,7 +181,7 @@ private async Task<T> DeserializeResponse<T>(HttpResponseMessage response)
catch (JsonException ex)
{
Options.Logger?.LogError(ex, "Failed to deserialize response: {Content}", content);
throw new LlmSharpException(
throw new SpongeLLMException(
"Failed to deserialize response",
null,
$"Content: {content}, Error: {ex.Message}");
Expand Down
4 changes: 2 additions & 2 deletions SpongeEngine.LMStudioSharp/SpongeEngine.LMStudioSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- Package Info -->
<PackageId>SpongeEngine.LMStudioSharp</PackageId>
<Title>LMStudioSharp</Title>
<Version>0.3.8.5</Version>
<Version>0.3.9.1</Version>
<Authors>Dan Clipca</Authors>
<Company>Sponge Engine</Company>
<Description>C# client for LM Studio native API.</Description>
Expand Down Expand Up @@ -41,7 +41,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.1" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.1" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Polly" Version="8.5.1" />
<PackageReference Include="SpongeEngine.SpongeLLM.Core" Version="0.0.3" />
<PackageReference Include="SpongeEngine.SpongeLLM.Core" Version="0.1.0" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>

Expand Down

0 comments on commit 5259f29

Please sign in to comment.