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
1 change: 1 addition & 0 deletions src/libs/Predibase/Generated/Predibase.Models.Adapter.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,6 @@ public Adapter(
public Adapter()
{
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}
}
1 change: 1 addition & 0 deletions src/libs/Predibase/Generated/Predibase.Models.Dataset.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,6 @@ public Dataset(
public Dataset()
{
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}
}
27 changes: 26 additions & 1 deletion src/libs/Predibase/Generated/Predibase.OptionsSupport.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,24 @@ public sealed class AutoSDKAuthorizationProviderHook : global::Predibase.AutoSDK
{
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::Predibase.AutoSDKAuthorizationValue>? Authorizations { get; set; }
}

/// <summary>
Expand Down