Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,6 @@ public ChatCompletionRequest(
public ChatCompletionRequest()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@ public ChatCompletionResponse(
public ChatCompletionResponse()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ public Choice(
public Choice()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ public ContentPart(
public ContentPart()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public sealed partial class ContentPartFile
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public sealed partial class ContentPartImageUrl
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ public FunctionCall(
public FunctionCall()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ public FunctionDefinition(
public FunctionDefinition()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public sealed partial class FunctionDefinitionParameters
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@ public Message(
public Message()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ public ResponseFormat(
public ResponseFormat()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ public Tool(
public Tool()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,6 @@ public ToolCall(
public ToolCall()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@ public Usage(
public Usage()
{
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public sealed partial class UsageCompletionTokensDetails
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public sealed partial class UsagePromptTokensDetails
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

}
}
14 changes: 14 additions & 0 deletions src/libs/TencentTokenHub/Generated/TencentTokenHub.OneOf.2.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ public bool TryPickValue1(
return IsValue1;
}

/// <summary>
///
/// </summary>
public T1 PickValue1() => IsValue1
? Value1!
: throw new global::System.InvalidOperationException($"Expected union variant 'Value1' but the value was {ToString()}.");

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -67,6 +74,13 @@ public bool TryPickValue2(
value = Value2;
return IsValue2;
}

/// <summary>
///
/// </summary>
public T2 PickValue2() => IsValue2
? Value2!
: throw new global::System.InvalidOperationException($"Expected union variant 'Value2' but the value was {ToString()}.");
/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,24 @@ public sealed class AutoSDKAuthorizationProviderHook : global::TencentTokenHub.A
{
context = context ?? throw new global::System.ArgumentNullException(nameof(context));

if (context.Request == null)
{
return;
}

var perRequest = context.RequestOptions?.Authorizations;
if (perRequest != null && perRequest.Count > 0)
{
for (var index = 0; index < perRequest.Count; index++)
{
ApplyAuthorization(context.Request, perRequest[index]);
}

return;
}

var provider = context.ClientOptions?.AuthorizationProvider;
if (provider == null || context.Request == null)
if (provider == null)
{
return;
}
Expand Down Expand Up @@ -237,6 +253,15 @@ public sealed class AutoSDKRequestOptions
/// Overrides response buffering for this request when set.
/// </summary>
public bool? ReadResponseAsString { get; set; }

/// <summary>
/// Optional per-request authorization values. When non-empty, the built-in
/// <see cref="AutoSDKAuthorizationProviderHook"/> applies these instead of consulting
/// <see cref="AutoSDKClientOptions.AuthorizationProvider"/> for this request only.
/// Useful for multi-tenant routing or "act-as" admin tooling that needs a different
/// credential per call without mutating shared client state.
/// </summary>
public global::System.Collections.Generic.IReadOnlyList<global::TencentTokenHub.AutoSDKAuthorizationValue>? Authorizations { get; set; }
}

/// <summary>
Expand Down