mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 11:07:21 +00:00
Generated the JSON contracts of the stored data at compile time (#1148)
This commit is contained in:
1 parent
fc7399e81b
commit
e954881fda
75 files changed
+5437
-298
No files matched your search
@@ -0,0 +1,17 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
using ERIContentType = AIStudio.Tools.ERIClient.DataModel.ContentType;
|
||||
|
||||
namespace AIStudio.Chat;
|
||||
|
||||
/// <summary>
|
||||
/// The contracts with which System.Text.Json reads and writes chats, built at compile time.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Two types with the same name need a name of their own for their contract, else the generator builds
|
||||
/// only the first of them and warns with SYSLIB1031.
|
||||
/// </remarks>
|
||||
[JsonSourceGenerationOptions(GenerationMode = JsonSourceGenerationMode.Metadata)]
|
||||
[JsonSerializable(typeof(ChatThread))]
|
||||
[JsonSerializable(typeof(ERIContentType), TypeInfoPropertyName = "ERIContentType")]
|
||||
internal sealed partial class ChatJsonContext : JsonSerializerContext;
|
||||
Reference in new issue
Block a user