forked from EllieBotDevs/elliebot
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:
parent
67224663cd
commit
0397ea09b0
9 changed files with 114 additions and 64 deletions
src/EllieBot/Modules/Games/ChatterBot/_common
|
@ -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; }
|
||||
}
|
|
@ -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; }
|
||||
}
|
|
@ -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; }
|
||||
}
|
|
@ -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; }
|
||||
}
|
Reference in a new issue