Skip to content

Commit d33a301

Browse files
committed
Bug fixes
1 parent dd4c992 commit d33a301

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

OfficeAddInSetup/OfficeAddInSetup.vdproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2471,7 +2471,7 @@
24712471
"Name" = "8:Microsoft Visual Studio"
24722472
"ProductName" = "8:TextCraft"
24732473
"ProductCode" = "8:{42DA3A94-FC29-41F2-A4F9-9D960D340B5A}"
2474-
"PackageCode" = "8:{59749625-27E7-4194-AF35-981CEE5DCAC4}"
2474+
"PackageCode" = "8:{63C0EAE8-B8C7-4F70-A3EA-B5AD3D43F0C6}"
24752475
"UpgradeCode" = "8:{E36CBC33-F0C8-472A-99B5-D882A25CC883}"
24762476
"AspNetVersion" = "8:"
24772477
"RestartWWWService" = "11:FALSE"

Ollama.cs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,17 @@ public async Task<Dictionary<string, object>> Show(string modelName, bool verbos
3434
// Create a StringContent object to send the payload
3535
var content = new StringContent(jsonPayload, Encoding.UTF8, "application/json");
3636

37-
try
38-
{
39-
// Send the POST request
40-
var response = await CommonUtils.client.PostAsync(fullUri.OriginalString, content);
41-
response.EnsureSuccessStatusCode();
37+
// Send the POST request
38+
var response = await CommonUtils.client.PostAsync(fullUri.OriginalString, content);
39+
response.EnsureSuccessStatusCode();
4240

43-
// Read the response content as a string
44-
var responseString = await response.Content.ReadAsStringAsync();
41+
// Read the response content as a string
42+
var responseString = await response.Content.ReadAsStringAsync();
4543

46-
// Deserialize the JSON response into a Dictionary
47-
var responseData = JsonSerializer.Deserialize<Dictionary<string, object>>(responseString);
44+
// Deserialize the JSON response into a Dictionary
45+
var responseData = JsonSerializer.Deserialize<Dictionary<string, object>>(responseString);
4846

49-
return responseData;
50-
}
51-
catch (Exception ex)
52-
{
53-
Console.WriteLine($"Error: {ex.Message}");
54-
return null;
55-
}
47+
return responseData;
5648
}
5749
}
5850
}

0 commit comments

Comments
 (0)