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 @@ -558,6 +558,10 @@ partial void ProcessCreateResponseContent(
/// <param name="default">
/// Indicates if this prompt is the default prompt used with the LLM.
/// </param>
/// <param name="ownership">
/// Indicates whether the generation preset is provided by the platform or created by the customer. Platform presets are pre-configured and cannot be modified or deleted. Customer presets are created and managed by the customer.<br/>
/// Example: platform
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand All @@ -577,6 +581,7 @@ partial void ProcessCreateResponseContent(
object? additionalModelParams = default,
bool? enabled = default,
bool? @default = default,
global::Vectara.GenerationPresetOwnership? ownership = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand All @@ -596,6 +601,7 @@ partial void ProcessCreateResponseContent(
AdditionalModelParams = additionalModelParams,
Enabled = enabled,
Default = @default,
Ownership = ownership,
});

return await CreateAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ partial void PrepareListArguments(
ref int? requestTimeout,
ref int? requestTimeoutMillis,
ref string? llmName,
ref string? filter,
ref int? limit,
ref string? pageKey);
partial void PrepareListRequest(
Expand All @@ -54,6 +55,7 @@ partial void PrepareListRequest(
int? requestTimeout,
int? requestTimeoutMillis,
string? llmName,
string? filter,
int? limit,
string? pageKey);
partial void ProcessListResponse(
Expand All @@ -79,6 +81,9 @@ partial void ProcessListResponseContent(
/// <param name="llmName">
/// Example: mockingbird-2.0
/// </param>
/// <param name="filter">
/// Example: mockingbird.*
/// </param>
/// <param name="limit">
/// Default Value: 10
/// </param>
Expand All @@ -90,6 +95,7 @@ partial void ProcessListResponseContent(
int? requestTimeout = default,
int? requestTimeoutMillis = default,
string? llmName = default,
string? filter = default,
int? limit = default,
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
Expand All @@ -102,6 +108,7 @@ partial void ProcessListResponseContent(
requestTimeout: ref requestTimeout,
requestTimeoutMillis: ref requestTimeoutMillis,
llmName: ref llmName,
filter: ref filter,
limit: ref limit,
pageKey: ref pageKey);

Expand Down Expand Up @@ -132,6 +139,7 @@ partial void ProcessListResponseContent(
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("llm_name", llmName)
.AddOptionalParameter("filter", filter)
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("page_key", pageKey)
;
Expand Down Expand Up @@ -188,6 +196,7 @@ partial void ProcessListResponseContent(
requestTimeout: requestTimeout,
requestTimeoutMillis: requestTimeoutMillis,
llmName: llmName,
filter: filter,
limit: limit,
pageKey: pageKey);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,10 @@ partial void ProcessReplaceResponseContent(
/// <param name="default">
/// Indicates if this prompt is the default prompt used with the LLM.
/// </param>
/// <param name="ownership">
/// Indicates whether the generation preset is provided by the platform or created by the customer. Platform presets are pre-configured and cannot be modified or deleted. Customer presets are created and managed by the customer.<br/>
/// Example: platform
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand All @@ -623,6 +627,7 @@ partial void ProcessReplaceResponseContent(
object? additionalModelParams = default,
bool? enabled = default,
bool? @default = default,
global::Vectara.GenerationPresetOwnership? ownership = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
Expand All @@ -642,6 +647,7 @@ partial void ProcessReplaceResponseContent(
AdditionalModelParams = additionalModelParams,
Enabled = enabled,
Default = @default,
Ownership = ownership,
});

return await ReplaceAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public partial interface IGenerationPresetsClient
/// <param name="default">
/// Indicates if this prompt is the default prompt used with the LLM.
/// </param>
/// <param name="ownership">
/// Indicates whether the generation preset is provided by the platform or created by the customer. Platform presets are pre-configured and cannot be modified or deleted. Customer presets are created and managed by the customer.<br/>
/// Example: platform
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand All @@ -96,6 +100,7 @@ public partial interface IGenerationPresetsClient
object? additionalModelParams = default,
bool? enabled = default,
bool? @default = default,
global::Vectara.GenerationPresetOwnership? ownership = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public partial interface IGenerationPresetsClient
/// <param name="llmName">
/// Example: mockingbird-2.0
/// </param>
/// <param name="filter">
/// Example: mockingbird.*
/// </param>
/// <param name="limit">
/// Default Value: 10
/// </param>
Expand All @@ -29,6 +32,7 @@ public partial interface IGenerationPresetsClient
int? requestTimeout = default,
int? requestTimeoutMillis = default,
string? llmName = default,
string? filter = default,
int? limit = default,
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ public partial interface IGenerationPresetsClient
/// <param name="default">
/// Indicates if this prompt is the default prompt used with the LLM.
/// </param>
/// <param name="ownership">
/// Indicates whether the generation preset is provided by the platform or created by the customer. Platform presets are pre-configured and cannot be modified or deleted. Customer presets are created and managed by the customer.<br/>
/// Example: platform
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
Expand All @@ -100,6 +104,7 @@ public partial interface IGenerationPresetsClient
object? additionalModelParams = default,
bool? enabled = default,
bool? @default = default,
global::Vectara.GenerationPresetOwnership? ownership = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,6 @@ public class AgentToolConfigurationJsonConverter : global::System.Text.Json.Seri
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.InlineArtifactGrepToolConfiguration)}");
artifactGrep = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Vectara.InlineArtifactCreateToolConfiguration? artifactCreate = default;
if (discriminator?.Type == global::Vectara.AgentToolConfigurationDiscriminatorType.ArtifactCreate)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactCreateToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.InlineArtifactCreateToolConfiguration> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::Vectara.InlineArtifactCreateToolConfiguration)}");
artifactCreate = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
}
global::Vectara.InlineImageReadToolConfiguration? imageRead = default;
if (discriminator?.Type == global::Vectara.AgentToolConfigurationDiscriminatorType.ImageRead)
{
Expand Down Expand Up @@ -133,8 +126,6 @@ public class AgentToolConfigurationJsonConverter : global::System.Text.Json.Seri

artifactGrep,

artifactCreate,

imageRead,

documentConversion,
Expand Down Expand Up @@ -208,12 +199,6 @@ public override void Write(
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactGrepToolConfiguration).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.ArtifactGrep!, typeInfo);
}
else if (value.IsArtifactCreate)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineArtifactCreateToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.InlineArtifactCreateToolConfiguration?> ??
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Vectara.InlineArtifactCreateToolConfiguration).Name}");
global::System.Text.Json.JsonSerializer.Serialize(writer, value.ArtifactCreate!, typeInfo);
}
else if (value.IsImageRead)
{
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Vectara.InlineImageReadToolConfiguration), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Vectara.InlineImageReadToolConfiguration?> ??
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class CreateGenerationPresetRequestJsonConverter : global::System.Text.Js
if (__jsonProps.Contains("max_tokens")) __score0++;
if (__jsonProps.Contains("max_used_search_results")) __score0++;
if (__jsonProps.Contains("name")) __score0++;
if (__jsonProps.Contains("ownership")) __score0++;
if (__jsonProps.Contains("presence_penalty")) __score0++;
if (__jsonProps.Contains("prompt_template")) __score0++;
if (__jsonProps.Contains("temperature")) __score0++;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace Vectara.JsonConverters
{
/// <inheritdoc />
public sealed class GenerationPresetOwnershipJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vectara.GenerationPresetOwnership>
{
/// <inheritdoc />
public override global::Vectara.GenerationPresetOwnership Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Vectara.GenerationPresetOwnershipExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Vectara.GenerationPresetOwnership)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Vectara.GenerationPresetOwnership);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vectara.GenerationPresetOwnership value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::Vectara.GenerationPresetOwnershipExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace Vectara.JsonConverters
{
/// <inheritdoc />
public sealed class GenerationPresetOwnershipNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::Vectara.GenerationPresetOwnership?>
{
/// <inheritdoc />
public override global::Vectara.GenerationPresetOwnership? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::Vectara.GenerationPresetOwnershipExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::Vectara.GenerationPresetOwnership)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::Vectara.GenerationPresetOwnership?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::Vectara.GenerationPresetOwnership? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::Vectara.GenerationPresetOwnershipExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ namespace Vectara

typeof(global::Vectara.JsonConverters.CreateChatCompletionStreamResponseObjectNullableJsonConverter),

typeof(global::Vectara.JsonConverters.GenerationPresetOwnershipJsonConverter),

typeof(global::Vectara.JsonConverters.GenerationPresetOwnershipNullableJsonConverter),

typeof(global::Vectara.JsonConverters.CreateEncoderRequestDiscriminatorTypeJsonConverter),

typeof(global::Vectara.JsonConverters.CreateEncoderRequestDiscriminatorTypeNullableJsonConverter),
Expand Down Expand Up @@ -795,6 +799,7 @@ namespace Vectara
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateChatCompletionStreamResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.CreateChatCompletionStreamResponseObject), TypeInfoPropertyName = "CreateChatCompletionStreamResponseObject2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Vectara.ChatCompletionStreamResponseChoice>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GenerationPresetOwnership), TypeInfoPropertyName = "GenerationPresetOwnership2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.GenerationPreset))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ListGenerationPresetsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Vectara.GenerationPreset>))]
Expand Down Expand Up @@ -981,7 +986,6 @@ namespace Vectara
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactReadToolConfiguration))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ArtifactGrepToolParameters))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactGrepToolConfiguration))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineArtifactCreateToolConfiguration))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ImageReadToolParameters))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.ImageReadToolParametersDetail), TypeInfoPropertyName = "ImageReadToolParametersDetail2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Vectara.InlineImageReadToolConfiguration))]
Expand Down
Loading
Loading