Skip to content

Commit 3abb9e5

Browse files
committed
data model docs
1 parent 96b8fb0 commit 3abb9e5

File tree

1 file changed

+36
-7
lines changed

1 file changed

+36
-7
lines changed

pkgs/sdk/server-ai/src/DataModel/DataModel.cs

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
1-
using System;
21
using System.Collections.Generic;
3-
using System.Runtime.InteropServices;
42
using System.Text.Json.Serialization;
5-
using LaunchDarkly.Sdk.Server.Ai;
6-
using LaunchDarkly.Sdk.Server.Ai.Config;
73

8-
#pragma warning disable CS1591
94
namespace LaunchDarkly.Sdk.Server.Ai.DataModel
105
{
116
/// <summary>
@@ -27,35 +22,69 @@ public enum Role
2722
Assistant
2823
}
2924

25+
/// <summary>
26+
/// Represents the JSON serialization of the Meta field.
27+
/// </summary>
3028
public class Meta
3129
{
30+
/// <summary>
31+
/// The version key.
32+
/// </summary>
3233
[JsonPropertyName("versionKey")]
3334
public string VersionKey { get; set; }
3435

36+
/// <summary>
37+
/// If the config is enabled.
38+
/// </summary>
39+
3540
[JsonPropertyName("enabled")]
3641
public bool Enabled { get; set; }
3742
}
43+
44+
/// <summary>
45+
/// Represents the JSON serialization of a Message.
46+
/// </summary>
3847
public class Message
3948
{
49+
/// <summary>
50+
/// The content.
51+
/// </summary>
4052
[JsonPropertyName("content")]
4153
public string Content { get; set; }
4254

55+
/// <summary>
56+
/// The role.
57+
/// </summary>
4358
[JsonPropertyName("role")]
4459
[JsonConverter(typeof(JsonStringEnumConverter))]
4560
public Role Role { get; set; }
4661
}
4762

63+
64+
/// <summary>
65+
/// Represents the JSON serialization of an AiConfig.
66+
/// </summary>
67+
4868
public class AiConfig
4969
{
70+
/// <summary>
71+
/// The prompt.
72+
/// </summary>
5073
[JsonPropertyName("prompt")]
5174
public List<Message> Prompt { get; set; }
5275

76+
/// <summary>
77+
/// LaunchDarkly metadata.
78+
/// </summary>
79+
5380
[JsonPropertyName("_ldMeta")]
5481
public Meta Meta { get; set; }
5582

83+
/// <summary>
84+
/// The model params;
85+
/// </summary>
86+
5687
[JsonPropertyName("model")]
5788
public Dictionary<string, object> Model { get; set; }
5889
}
5990
}
60-
61-
#pragma warning restore CS1591

0 commit comments

Comments
 (0)