2024-08-27 15:42:48 +00:00
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.Abstraction.Instructs.Models;
|
|
|
|
|
|
|
|
|
|
public class InstructBaseRequest
|
|
|
|
|
{
|
|
|
|
|
[JsonPropertyName("provider")]
|
|
|
|
|
public virtual string? Provider { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("model")]
|
|
|
|
|
public virtual string? Model { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("model_id")]
|
|
|
|
|
public virtual string? ModelId { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("states")]
|
|
|
|
|
public List<MessageState> States { get; set; } = new();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class MultiModalRequest : InstructBaseRequest
|
|
|
|
|
{
|
|
|
|
|
[JsonPropertyName("text")]
|
|
|
|
|
public string Text { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("files")]
|
2024-08-27 17:12:17 +00:00
|
|
|
public List<InstructFileModel> Files { get; set; } = new();
|
2024-08-27 15:42:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ImageGenerationRequest : InstructBaseRequest
|
|
|
|
|
{
|
|
|
|
|
[JsonPropertyName("text")]
|
|
|
|
|
public string Text { get; set; } = string.Empty;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ImageVariationRequest : InstructBaseRequest
|
|
|
|
|
{
|
|
|
|
|
[JsonPropertyName("file")]
|
2024-08-27 17:12:17 +00:00
|
|
|
public InstructFileModel File { get; set; }
|
2024-08-27 15:42:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ImageEditRequest : InstructBaseRequest
|
|
|
|
|
{
|
|
|
|
|
[JsonPropertyName("text")]
|
|
|
|
|
public string Text { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("file")]
|
2024-08-27 17:12:17 +00:00
|
|
|
public InstructFileModel File { get; set; }
|
2024-08-27 15:42:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ImageMaskEditRequest : InstructBaseRequest
|
|
|
|
|
{
|
|
|
|
|
[JsonPropertyName("text")]
|
|
|
|
|
public string Text { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("file")]
|
2024-08-27 17:12:17 +00:00
|
|
|
public InstructFileModel File { get; set; }
|
2024-08-27 15:42:48 +00:00
|
|
|
|
|
|
|
|
[JsonPropertyName("mask")]
|
2024-08-27 17:12:17 +00:00
|
|
|
public InstructFileModel Mask { get; set; }
|
2024-08-27 15:42:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class AudioCompletionRequest : InstructBaseRequest
|
|
|
|
|
{
|
|
|
|
|
[JsonPropertyName("file")]
|
2024-08-27 17:12:17 +00:00
|
|
|
public InstructFileModel File { get; set; }
|
2024-08-27 15:42:48 +00:00
|
|
|
}
|