diff --git a/src/libs/Anthropic/Generated/Anthropic.Models.BlockDelta.g.cs b/src/libs/Anthropic/Generated/Anthropic.Models.BlockDelta.g.cs
index 265d52a..05d9bec 100644
--- a/src/libs/Anthropic/Generated/Anthropic.Models.BlockDelta.g.cs
+++ b/src/libs/Anthropic/Generated/Anthropic.Models.BlockDelta.g.cs
@@ -19,18 +19,18 @@ namespace Anthropic
/// A delta in a streaming text block.
///
#if NET6_0_OR_GREATER
- public global::Anthropic.TextBlockDelta? Text { get; init; }
+ public global::Anthropic.TextBlockDelta? TextDelta { get; init; }
#else
- public global::Anthropic.TextBlockDelta? Text { get; }
+ public global::Anthropic.TextBlockDelta? TextDelta { get; }
#endif
///
///
///
#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Text))]
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(TextDelta))]
#endif
- public bool IsText => Text != null;
+ public bool IsTextDelta => TextDelta != null;
///
///
@@ -40,32 +40,32 @@ namespace Anthropic
///
///
///
- public static implicit operator global::Anthropic.TextBlockDelta?(BlockDelta @this) => @this.Text;
+ public static implicit operator global::Anthropic.TextBlockDelta?(BlockDelta @this) => @this.TextDelta;
///
///
///
public BlockDelta(global::Anthropic.TextBlockDelta? value)
{
- Text = value;
+ TextDelta = value;
}
///
/// A delta in a streaming input JSON.
///
#if NET6_0_OR_GREATER
- public global::Anthropic.InputJsonBlockDelta? InputJson { get; init; }
+ public global::Anthropic.InputJsonBlockDelta? InputJsonDelta { get; init; }
#else
- public global::Anthropic.InputJsonBlockDelta? InputJson { get; }
+ public global::Anthropic.InputJsonBlockDelta? InputJsonDelta { get; }
#endif
///
///
///
#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputJson))]
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(InputJsonDelta))]
#endif
- public bool IsInputJson => InputJson != null;
+ public bool IsInputJsonDelta => InputJsonDelta != null;
///
///
@@ -75,14 +75,14 @@ public BlockDelta(global::Anthropic.TextBlockDelta? value)
///
///
///
- public static implicit operator global::Anthropic.InputJsonBlockDelta?(BlockDelta @this) => @this.InputJson;
+ public static implicit operator global::Anthropic.InputJsonBlockDelta?(BlockDelta @this) => @this.InputJsonDelta;
///
///
///
public BlockDelta(global::Anthropic.InputJsonBlockDelta? value)
{
- InputJson = value;
+ InputJsonDelta = value;
}
///
@@ -90,22 +90,22 @@ public BlockDelta(global::Anthropic.InputJsonBlockDelta? value)
///
public BlockDelta(
global::Anthropic.BlockDeltaDiscriminatorType? type,
- global::Anthropic.TextBlockDelta? text,
- global::Anthropic.InputJsonBlockDelta? inputJson
+ global::Anthropic.TextBlockDelta? textDelta,
+ global::Anthropic.InputJsonBlockDelta? inputJsonDelta
)
{
Type = type;
- Text = text;
- InputJson = inputJson;
+ TextDelta = textDelta;
+ InputJsonDelta = inputJsonDelta;
}
///
///
///
public object? Object =>
- InputJson as object ??
- Text as object
+ InputJsonDelta as object ??
+ TextDelta as object
;
///
@@ -113,15 +113,15 @@ Text as object
///
public bool Validate()
{
- return IsText && !IsInputJson || !IsText && IsInputJson;
+ return IsTextDelta && !IsInputJsonDelta || !IsTextDelta && IsInputJsonDelta;
}
///
///
///
public TResult? Match(
- global::System.Func? text = null,
- global::System.Func? inputJson = null,
+ global::System.Func? textDelta = null,
+ global::System.Func? inputJsonDelta = null,
bool validate = true)
{
if (validate)
@@ -129,13 +129,13 @@ public bool Validate()
Validate();
}
- if (IsText && text != null)
+ if (IsTextDelta && textDelta != null)
{
- return text(Text!);
+ return textDelta(TextDelta!);
}
- else if (IsInputJson && inputJson != null)
+ else if (IsInputJsonDelta && inputJsonDelta != null)
{
- return inputJson(InputJson!);
+ return inputJsonDelta(InputJsonDelta!);
}
return default(TResult);
@@ -145,8 +145,8 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? text = null,
- global::System.Action? inputJson = null,
+ global::System.Action? textDelta = null,
+ global::System.Action? inputJsonDelta = null,
bool validate = true)
{
if (validate)
@@ -154,13 +154,13 @@ public void Match(
Validate();
}
- if (IsText)
+ if (IsTextDelta)
{
- text?.Invoke(Text!);
+ textDelta?.Invoke(TextDelta!);
}
- else if (IsInputJson)
+ else if (IsInputJsonDelta)
{
- inputJson?.Invoke(InputJson!);
+ inputJsonDelta?.Invoke(InputJsonDelta!);
}
}
@@ -171,9 +171,9 @@ public override int GetHashCode()
{
var fields = new object?[]
{
- Text,
+ TextDelta,
typeof(global::Anthropic.TextBlockDelta),
- InputJson,
+ InputJsonDelta,
typeof(global::Anthropic.InputJsonBlockDelta),
};
const int offset = unchecked((int)2166136261);
@@ -190,8 +190,8 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null
public bool Equals(BlockDelta other)
{
return
- global::System.Collections.Generic.EqualityComparer.Default.Equals(Text, other.Text) &&
- global::System.Collections.Generic.EqualityComparer.Default.Equals(InputJson, other.InputJson)
+ global::System.Collections.Generic.EqualityComparer.Default.Equals(TextDelta, other.TextDelta) &&
+ global::System.Collections.Generic.EqualityComparer.Default.Equals(InputJsonDelta, other.InputJsonDelta)
;
}
diff --git a/src/libs/Anthropic/Generated/Anthropic.Models.MessageStreamEvent.g.cs b/src/libs/Anthropic/Generated/Anthropic.Models.MessageStreamEvent.g.cs
index 18172f2..69dc704 100644
--- a/src/libs/Anthropic/Generated/Anthropic.Models.MessageStreamEvent.g.cs
+++ b/src/libs/Anthropic/Generated/Anthropic.Models.MessageStreamEvent.g.cs
@@ -19,18 +19,18 @@ namespace Anthropic
/// A start event in a streaming conversation.
///
#if NET6_0_OR_GREATER
- public global::Anthropic.MessageStartEvent? Start { get; init; }
+ public global::Anthropic.MessageStartEvent? MessageStart { get; init; }
#else
- public global::Anthropic.MessageStartEvent? Start { get; }
+ public global::Anthropic.MessageStartEvent? MessageStart { get; }
#endif
///
///
///
#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Start))]
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageStart))]
#endif
- public bool IsStart => Start != null;
+ public bool IsMessageStart => MessageStart != null;
///
///
@@ -40,32 +40,32 @@ namespace Anthropic
///
///
///
- public static implicit operator global::Anthropic.MessageStartEvent?(MessageStreamEvent @this) => @this.Start;
+ public static implicit operator global::Anthropic.MessageStartEvent?(MessageStreamEvent @this) => @this.MessageStart;
///
///
///
public MessageStreamEvent(global::Anthropic.MessageStartEvent? value)
{
- Start = value;
+ MessageStart = value;
}
///
/// A delta event in a streaming conversation.
///
#if NET6_0_OR_GREATER
- public global::Anthropic.MessageDeltaEvent? Delta { get; init; }
+ public global::Anthropic.MessageDeltaEvent? MessageDelta { get; init; }
#else
- public global::Anthropic.MessageDeltaEvent? Delta { get; }
+ public global::Anthropic.MessageDeltaEvent? MessageDelta { get; }
#endif
///
///
///
#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Delta))]
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageDelta))]
#endif
- public bool IsDelta => Delta != null;
+ public bool IsMessageDelta => MessageDelta != null;
///
///
@@ -75,32 +75,32 @@ public MessageStreamEvent(global::Anthropic.MessageStartEvent? value)
///
///
///
- public static implicit operator global::Anthropic.MessageDeltaEvent?(MessageStreamEvent @this) => @this.Delta;
+ public static implicit operator global::Anthropic.MessageDeltaEvent?(MessageStreamEvent @this) => @this.MessageDelta;
///
///
///
public MessageStreamEvent(global::Anthropic.MessageDeltaEvent? value)
{
- Delta = value;
+ MessageDelta = value;
}
///
/// A stop event in a streaming conversation.
///
#if NET6_0_OR_GREATER
- public global::Anthropic.MessageStopEvent? Stop { get; init; }
+ public global::Anthropic.MessageStopEvent? MessageStop { get; init; }
#else
- public global::Anthropic.MessageStopEvent? Stop { get; }
+ public global::Anthropic.MessageStopEvent? MessageStop { get; }
#endif
///
///
///
#if NET6_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Stop))]
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(MessageStop))]
#endif
- public bool IsStop => Stop != null;
+ public bool IsMessageStop => MessageStop != null;
///
///
@@ -110,14 +110,14 @@ public MessageStreamEvent(global::Anthropic.MessageDeltaEvent? value)
///
///
///
- public static implicit operator global::Anthropic.MessageStopEvent?(MessageStreamEvent @this) => @this.Stop;
+ public static implicit operator global::Anthropic.MessageStopEvent?(MessageStreamEvent @this) => @this.MessageStop;
///
///
///
public MessageStreamEvent(global::Anthropic.MessageStopEvent? value)
{
- Stop = value;
+ MessageStop = value;
}
///
@@ -300,9 +300,9 @@ public MessageStreamEvent(global::Anthropic.ErrorEvent? value)
///
public MessageStreamEvent(
global::Anthropic.MessageStreamEventDiscriminatorType? type,
- global::Anthropic.MessageStartEvent? start,
- global::Anthropic.MessageDeltaEvent? delta,
- global::Anthropic.MessageStopEvent? stop,
+ global::Anthropic.MessageStartEvent? messageStart,
+ global::Anthropic.MessageDeltaEvent? messageDelta,
+ global::Anthropic.MessageStopEvent? messageStop,
global::Anthropic.ContentBlockStartEvent? contentBlockStart,
global::Anthropic.ContentBlockDeltaEvent? contentBlockDelta,
global::Anthropic.ContentBlockStopEvent? contentBlockStop,
@@ -312,9 +312,9 @@ public MessageStreamEvent(
{
Type = type;
- Start = start;
- Delta = delta;
- Stop = stop;
+ MessageStart = messageStart;
+ MessageDelta = messageDelta;
+ MessageStop = messageStop;
ContentBlockStart = contentBlockStart;
ContentBlockDelta = contentBlockDelta;
ContentBlockStop = contentBlockStop;
@@ -331,9 +331,9 @@ Ping as object ??
ContentBlockStop as object ??
ContentBlockDelta as object ??
ContentBlockStart as object ??
- Stop as object ??
- Delta as object ??
- Start as object
+ MessageStop as object ??
+ MessageDelta as object ??
+ MessageStart as object
;
///
@@ -341,16 +341,16 @@ Start as object
///
public bool Validate()
{
- return IsStart && !IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && !IsStop && IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && !IsStop && !IsContentBlockStart && IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && IsContentBlockStop && !IsPing && !IsError || !IsStart && !IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && IsPing && !IsError || !IsStart && !IsDelta && !IsStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && IsError;
+ return IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && IsContentBlockDelta && !IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && IsContentBlockStop && !IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && IsPing && !IsError || !IsMessageStart && !IsMessageDelta && !IsMessageStop && !IsContentBlockStart && !IsContentBlockDelta && !IsContentBlockStop && !IsPing && IsError;
}
///
///
///
public TResult? Match(
- global::System.Func? start = null,
- global::System.Func? delta = null,
- global::System.Func? stop = null,
+ global::System.Func? messageStart = null,
+ global::System.Func? messageDelta = null,
+ global::System.Func? messageStop = null,
global::System.Func? contentBlockStart = null,
global::System.Func? contentBlockDelta = null,
global::System.Func? contentBlockStop = null,
@@ -363,17 +363,17 @@ public bool Validate()
Validate();
}
- if (IsStart && start != null)
+ if (IsMessageStart && messageStart != null)
{
- return start(Start!);
+ return messageStart(MessageStart!);
}
- else if (IsDelta && delta != null)
+ else if (IsMessageDelta && messageDelta != null)
{
- return delta(Delta!);
+ return messageDelta(MessageDelta!);
}
- else if (IsStop && stop != null)
+ else if (IsMessageStop && messageStop != null)
{
- return stop(Stop!);
+ return messageStop(MessageStop!);
}
else if (IsContentBlockStart && contentBlockStart != null)
{
@@ -403,9 +403,9 @@ public bool Validate()
///
///
public void Match(
- global::System.Action? start = null,
- global::System.Action? delta = null,
- global::System.Action? stop = null,
+ global::System.Action? messageStart = null,
+ global::System.Action? messageDelta = null,
+ global::System.Action? messageStop = null,
global::System.Action? contentBlockStart = null,
global::System.Action? contentBlockDelta = null,
global::System.Action? contentBlockStop = null,
@@ -418,17 +418,17 @@ public void Match(
Validate();
}
- if (IsStart)
+ if (IsMessageStart)
{
- start?.Invoke(Start!);
+ messageStart?.Invoke(MessageStart!);
}
- else if (IsDelta)
+ else if (IsMessageDelta)
{
- delta?.Invoke(Delta!);
+ messageDelta?.Invoke(MessageDelta!);
}
- else if (IsStop)
+ else if (IsMessageStop)
{
- stop?.Invoke(Stop!);
+ messageStop?.Invoke(MessageStop!);
}
else if (IsContentBlockStart)
{
@@ -459,11 +459,11 @@ public override int GetHashCode()
{
var fields = new object?[]
{
- Start,
+ MessageStart,
typeof(global::Anthropic.MessageStartEvent),
- Delta,
+ MessageDelta,
typeof(global::Anthropic.MessageDeltaEvent),
- Stop,
+ MessageStop,
typeof(global::Anthropic.MessageStopEvent),
ContentBlockStart,
typeof(global::Anthropic.ContentBlockStartEvent),
@@ -490,9 +490,9 @@ static int HashCodeAggregator(int hashCode, object? value) => value == null
public bool Equals(MessageStreamEvent other)
{
return
- global::System.Collections.Generic.EqualityComparer.Default.Equals(Start, other.Start) &&
- global::System.Collections.Generic.EqualityComparer.Default.Equals(Delta, other.Delta) &&
- global::System.Collections.Generic.EqualityComparer.Default.Equals(Stop, other.Stop) &&
+ global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageStart, other.MessageStart) &&
+ global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageDelta, other.MessageDelta) &&
+ global::System.Collections.Generic.EqualityComparer.Default.Equals(MessageStop, other.MessageStop) &&
global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentBlockStart, other.ContentBlockStart) &&
global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentBlockDelta, other.ContentBlockDelta) &&
global::System.Collections.Generic.EqualityComparer.Default.Equals(ContentBlockStop, other.ContentBlockStop) &&
diff --git a/src/libs/Anthropic/Generated/JsonConverters.BlockDelta.g.cs b/src/libs/Anthropic/Generated/JsonConverters.BlockDelta.g.cs
index fef20d2..45e0b2b 100644
--- a/src/libs/Anthropic/Generated/JsonConverters.BlockDelta.g.cs
+++ b/src/libs/Anthropic/Generated/JsonConverters.BlockDelta.g.cs
@@ -21,25 +21,25 @@ public class BlockDeltaJsonConverter : global::System.Text.Json.Serialization.Js
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Anthropic.BlockDeltaDiscriminator)}");
var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
- global::Anthropic.TextBlockDelta? text = default;
+ global::Anthropic.TextBlockDelta? textDelta = default;
if (discriminator?.Type == global::Anthropic.BlockDeltaDiscriminatorType.TextDelta)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Anthropic.TextBlockDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Anthropic.TextBlockDelta)}");
- text = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ textDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
- global::Anthropic.InputJsonBlockDelta? inputJson = default;
+ global::Anthropic.InputJsonBlockDelta? inputJsonDelta = default;
if (discriminator?.Type == global::Anthropic.BlockDeltaDiscriminatorType.InputJsonDelta)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Anthropic.InputJsonBlockDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Anthropic.InputJsonBlockDelta)}");
- inputJson = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ inputJsonDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
var result = new global::Anthropic.BlockDelta(
discriminator?.Type,
- text,
- inputJson
+ textDelta,
+ inputJsonDelta
);
return result;
@@ -54,17 +54,17 @@ public override void Write(
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
- if (value.IsText)
+ if (value.IsTextDelta)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Anthropic.TextBlockDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Anthropic.TextBlockDelta).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Text, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.TextDelta, typeInfo);
}
- else if (value.IsInputJson)
+ else if (value.IsInputJsonDelta)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Anthropic.InputJsonBlockDelta), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Anthropic.InputJsonBlockDelta).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputJson, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.InputJsonDelta, typeInfo);
}
}
}
diff --git a/src/libs/Anthropic/Generated/JsonConverters.MessageStreamEvent.g.cs b/src/libs/Anthropic/Generated/JsonConverters.MessageStreamEvent.g.cs
index f37b9f5..31b3c23 100644
--- a/src/libs/Anthropic/Generated/JsonConverters.MessageStreamEvent.g.cs
+++ b/src/libs/Anthropic/Generated/JsonConverters.MessageStreamEvent.g.cs
@@ -21,26 +21,26 @@ public class MessageStreamEventJsonConverter : global::System.Text.Json.Serializ
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Anthropic.MessageStreamEventDiscriminator)}");
var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo);
- global::Anthropic.MessageStartEvent? start = default;
+ global::Anthropic.MessageStartEvent? messageStart = default;
if (discriminator?.Type == global::Anthropic.MessageStreamEventDiscriminatorType.MessageStart)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Anthropic.MessageStartEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Anthropic.MessageStartEvent)}");
- start = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ messageStart = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
- global::Anthropic.MessageDeltaEvent? delta = default;
+ global::Anthropic.MessageDeltaEvent? messageDelta = default;
if (discriminator?.Type == global::Anthropic.MessageStreamEventDiscriminatorType.MessageDelta)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Anthropic.MessageDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Anthropic.MessageDeltaEvent)}");
- delta = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ messageDelta = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
- global::Anthropic.MessageStopEvent? stop = default;
+ global::Anthropic.MessageStopEvent? messageStop = default;
if (discriminator?.Type == global::Anthropic.MessageStreamEventDiscriminatorType.MessageStop)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Anthropic.MessageStopEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Anthropic.MessageStopEvent)}");
- stop = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
+ messageStop = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Anthropic.ContentBlockStartEvent? contentBlockStart = default;
if (discriminator?.Type == global::Anthropic.MessageStreamEventDiscriminatorType.ContentBlockStart)
@@ -80,9 +80,9 @@ public class MessageStreamEventJsonConverter : global::System.Text.Json.Serializ
var result = new global::Anthropic.MessageStreamEvent(
discriminator?.Type,
- start,
- delta,
- stop,
+ messageStart,
+ messageDelta,
+ messageStop,
contentBlockStart,
contentBlockDelta,
contentBlockStop,
@@ -102,23 +102,23 @@ public override void Write(
options = options ?? throw new global::System.ArgumentNullException(nameof(options));
var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
- if (value.IsStart)
+ if (value.IsMessageStart)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Anthropic.MessageStartEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Anthropic.MessageStartEvent).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Start, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageStart, typeInfo);
}
- else if (value.IsDelta)
+ else if (value.IsMessageDelta)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Anthropic.MessageDeltaEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Anthropic.MessageDeltaEvent).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Delta, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageDelta, typeInfo);
}
- else if (value.IsStop)
+ else if (value.IsMessageStop)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Anthropic.MessageStopEvent), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Anthropic.MessageStopEvent).Name}");
- global::System.Text.Json.JsonSerializer.Serialize(writer, value.Stop, typeInfo);
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.MessageStop, typeInfo);
}
else if (value.IsContentBlockStart)
{