using official version of discord.net

upped version to 5.1.5
removed nuget.config as we are no longer using our fork of discord.net
Fixed some build warnings
This commit is contained in:
Toastie 2024-08-02 00:06:28 +12:00
parent 67224663cd
commit 0397ea09b0
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
9 changed files with 114 additions and 64 deletions
src/EllieBot/Modules/Games/ChatterBot/_common

View file

@ -1,10 +1,9 @@
#nullable disable
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
namespace EllieBot.Modules.Games.Common.ChatterBot;
public class Choice
{
[JsonPropertyName("message")]
public Message Message { get; init; }
public required Message Message { get; init; }
}

View file

@ -1,10 +1,9 @@
#nullable disable
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
namespace EllieBot.Modules.Games.Common.ChatterBot;
public class Message
{
[JsonPropertyName("content")]
public string Content { get; init; }
public required string Content { get; init; }
}

View file

@ -1,16 +1,15 @@
#nullable disable
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
namespace EllieBot.Modules.Games.Common.ChatterBot;
public class OpenAiApiMessage
{
[JsonPropertyName("role")]
public string Role { get; init; }
public required string Role { get; init; }
[JsonPropertyName("content")]
public string Content { get; init; }
public required string Content { get; init; }
[JsonPropertyName("name")]
public string Name { get; init; }
public required string Name { get; init; }
}

View file

@ -1,19 +1,18 @@
#nullable disable
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
namespace EllieBot.Modules.Games.Common.ChatterBot;
public class OpenAiApiRequest
{
[JsonPropertyName("model")]
public string Model { get; init; }
public required string Model { get; init; }
[JsonPropertyName("messages")]
public List<OpenAiApiMessage> Messages { get; init; }
public required List<OpenAiApiMessage> Messages { get; init; }
[JsonPropertyName("temperature")]
public int Temperature { get; init; }
public required int Temperature { get; init; }
[JsonPropertyName("max_tokens")]
public int MaxTokens { get; init; }
public required int MaxTokens { get; init; }
}