From db10c5a958e740216ab9ff1bbd11ede3c0426f8a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Sep 2025 15:24:20 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../AI21..JsonSerializerContext.g.cs | 39 +- ...egulationsVectorStoreVectorStoreIdGet.g.cs | 194 +++++ ...pToolDiscoveryStudioV1McpDiscoverPost.g.cs | 231 ++++++ ...sRegulationsUploadCheckCompliancePost.g.cs | 11 + .../AI21.Ai21Api.V1ConversationalRag.g.cs | 7 +- .../AI21.Ai21Api.V1CreateAssistant.g.cs | 256 +++++++ .../Generated/AI21.Ai21Api.V1MaestroRun.g.cs | 15 +- .../AI21.Ai21Api.V1ModifyAssistant.g.cs | 272 +++++++ .../AI21.Ai21Api.V1RunAssistant.g.cs | 262 +++++++ ...egulationsVectorStoreVectorStoreIdGet.g.cs | 18 + ...pToolDiscoveryStudioV1McpDiscoverPost.g.cs | 31 + ...sRegulationsUploadCheckCompliancePost.g.cs | 4 + .../AI21.IAi21Api.V1ConversationalRag.g.cs | 6 +- .../AI21.IAi21Api.V1CreateAssistant.g.cs | 49 ++ .../Generated/AI21.IAi21Api.V1MaestroRun.g.cs | 14 +- .../AI21.IAi21Api.V1ModifyAssistant.g.cs | 59 ++ .../AI21.IAi21Api.V1RunAssistant.g.cs | 53 ++ ...1.IJambaCompleteClient.V1ChatComplete.g.cs | 2 +- ...21.JambaCompleteClient.V1ChatComplete.g.cs | 2 +- ...=> AI21.JsonConverters.AssistantType.g.cs} | 14 +- ...JsonConverters.AssistantTypeNullable.g.cs} | 14 +- ...s => AI21.JsonConverters.BudgetLevel.g.cs} | 14 +- ...1.JsonConverters.BudgetLevelNullable.g.cs} | 14 +- ...leSearchToolResourceLabelsFilterMode.g.cs} | 14 +- ...ToolResourceLabelsFilterModeNullable.g.cs} | 14 +- ...ileSearchToolResourceResponseLanguage.g.cs | 53 ++ ...hToolResourceResponseLanguageNullable.g.cs | 60 ++ ...Converters.FileSearchToolResourceType.g.cs | 53 ++ ...rs.FileSearchToolResourceTypeNullable.g.cs | 60 ++ ...erters.HTTPToolFunctionParametersType.g.cs | 53 ++ ...TTPToolFunctionParametersTypeNullable.g.cs | 60 ++ ...1.JsonConverters.HTTPToolResourceType.g.cs | 53 ++ ...nverters.HTTPToolResourceTypeNullable.g.cs | 60 ++ ...ServerDataTypesChatToolDefinitionType.g.cs | 53 ++ ...taTypesChatToolDefinitionTypeNullable.g.cs | 60 ++ ...ataTypesExecutionEngineToolDefinition.g.cs | 99 +++ ...EngineToolDefinitionDiscriminatorType.g.cs | 53 ++ ...olDefinitionDiscriminatorTypeNullable.g.cs | 60 ++ ...21.JsonConverters.MCPToolResourceType.g.cs | 53 ++ ...onverters.MCPToolResourceTypeNullable.g.cs | 60 ++ ...s.RunAssistantRequestResponseLanguage.g.cs | 53 ++ ...istantRequestResponseLanguageNullable.g.cs | 60 ++ .../AI21.JsonConverters.RunOptimization.g.cs | 53 ++ ...sonConverters.RunOptimizationNullable.g.cs | 60 ++ .../AI21.JsonConverters.Visibility.g.cs | 53 ++ ...I21.JsonConverters.VisibilityNullable.g.cs | 60 ++ ...nConverters.WebSearchToolResourceType.g.cs | 53 ++ ...ers.WebSearchToolResourceTypeNullable.g.cs | 60 ++ .../AI21.JsonSerializerContextTypes.g.cs | 472 +++++++----- .../AI21/Generated/AI21.Models.Assistant.g.cs | 47 +- .../Generated/AI21.Models.AssistantTool2.g.cs | 6 + .../Generated/AI21.Models.AssistantType.g.cs | 57 ++ ...sRegulationsUploadCheckCompliancePost.g.cs | 13 +- ...ool2.g.cs => AI21.Models.BudgetLevel.g.cs} | 28 +- .../Generated/AI21.Models.ChatRequest.g.cs | 4 +- .../AI21.Models.ConversationalRagConfig.g.cs | 19 +- ...nversationalRagConfigResponseLanguage.g.cs | 8 +- ...versationalRagConfigRetrievalStrategy.g.cs | 63 -- ...1.Models.CreateAssistantRequest.Json.g.cs} | 22 +- .../AI21.Models.CreateAssistantRequest.g.cs | 131 ++++ ...odels.CreateAssistantRequestTool.Json.g.cs | 92 +++ ...21.Models.CreateAssistantRequestTool.g.cs} | 2 +- ...ateAssistantRequestToolResources.Json.g.cs | 92 +++ ...s.CreateAssistantRequestToolResources.g.cs | 18 + .../AI21.Models.CreateMaestroRunsPayload.g.cs | 29 +- ...ateMaestroRunsPayloadResponseLanguage.g.cs | 8 +- ...21.Models.FileSearchToolResource.Json.g.cs | 92 +++ .../AI21.Models.FileSearchToolResource.g.cs | 137 ++++ ...ileSearchToolResourceLabelsFilterMode.g.cs | 51 ++ ...ileSearchToolResourceResponseLanguage.g.cs | 99 +++ ...I21.Models.FileSearchToolResourceType.g.cs | 45 ++ ...torStoreVectorStoreIdGetResponse.Json.g.cs | 92 +++ ...nsVectorStoreVectorStoreIdGetResponse.g.cs | 18 + .../AI21.Models.HTTPToolEndpoint.Json.g.cs | 92 +++ .../AI21.Models.HTTPToolEndpoint.g.cs | 53 ++ ....Models.HTTPToolEndpointHeaders.Json.g.cs} | 22 +- ... AI21.Models.HTTPToolEndpointHeaders.g.cs} | 2 +- .../AI21.Models.HTTPToolFunction.Json.g.cs | 92 +++ .../AI21.Models.HTTPToolFunction.g.cs | 64 ++ ...HTTPToolFunctionParamProperties.Json.g.cs} | 22 +- ...odels.HTTPToolFunctionParamProperties.g.cs | 54 ++ ...odels.HTTPToolFunctionParameters.Json.g.cs | 92 +++ ...I21.Models.HTTPToolFunctionParameters.g.cs | 77 ++ ...ToolFunctionParametersProperties.Json.g.cs | 92 +++ ....HTTPToolFunctionParametersProperties.g.cs | 18 + ...Models.HTTPToolFunctionParametersType.g.cs | 45 ++ .../AI21.Models.HTTPToolResource.Json.g.cs | 92 +++ .../AI21.Models.HTTPToolResource.g.cs | 66 ++ .../AI21.Models.HTTPToolResourceType.g.cs | 45 ++ ...verDataTypesAssistantRequirement.Json.g.cs | 92 +++ ...piServerDataTypesAssistantRequirement.g.cs | 76 ++ ...erverDataTypesChatToolDefinition.Json.g.cs | 92 +++ ...ApiServerDataTypesChatToolDefinition.g.cs} | 16 +- ...ServerDataTypesChatToolDefinitionType.g.cs | 45 ++ ...aTypesExecutionEngineRequirement.Json.g.cs | 92 +++ ...rDataTypesExecutionEngineRequirement.g.cs} | 10 +- ...pesExecutionEngineToolDefinition.Json.g.cs | 92 +++ ...ataTypesExecutionEngineToolDefinition.g.cs | 334 +++++++++ ...ngineToolDefinitionDiscriminator.Json.g.cs | 92 +++ ...tionEngineToolDefinitionDiscriminator.g.cs | 44 ++ ...EngineToolDefinitionDiscriminatorType.g.cs | 63 ++ ...cs => AI21.Models.MCPDefinition.Json.g.cs} | 22 +- .../Generated/AI21.Models.MCPDefinition.g.cs | 62 ++ ...AI21.Models.MCPDefinitionHeaders.Json.g.cs | 92 +++ ... => AI21.Models.MCPDefinitionHeaders.g.cs} | 2 +- ...AI21.Models.MCPDiscoveryResponse.Json.g.cs | 92 +++ .../AI21.Models.MCPDiscoveryResponse.g.cs | 54 ++ ...son.g.cs => AI21.Models.MCPTool.Json.g.cs} | 22 +- .../AI21/Generated/AI21.Models.MCPTool.g.cs | 63 ++ .../AI21.Models.MCPToolInputSchema.Json.g.cs | 92 +++ .../AI21.Models.MCPToolInputSchema.g.cs | 18 + .../AI21.Models.MCPToolResource.Json.g.cs | 92 +++ .../AI21.Models.MCPToolResource.g.cs | 84 +++ ...21.Models.MCPToolResourceHeaders.Json.g.cs | 92 +++ .../AI21.Models.MCPToolResourceHeaders.g.cs | 18 + ...s => AI21.Models.MCPToolResourceType.g.cs} | 16 +- ...21.Models.ModifyAssistantRequest.Json.g.cs | 92 +++ .../AI21.Models.ModifyAssistantRequest.g.cs | 144 ++++ ...odels.ModifyAssistantRequestTool.Json.g.cs | 92 +++ ...I21.Models.ModifyAssistantRequestTool.g.cs | 18 + .../AI21.Models.RunAssistantRequest.Json.g.cs | 92 +++ .../AI21.Models.RunAssistantRequest.g.cs | 109 +++ ...ls.RunAssistantRequestOutputType.Json.g.cs | 92 +++ ....Models.RunAssistantRequestOutputType.g.cs | 18 + ...s.RunAssistantRequestResponseLanguage.g.cs | 99 +++ .../AI21.Models.RunOptimization.g.cs | 51 ++ ....cs => AI21.Models.ToolResource.Json.g.cs} | 22 +- ...ces.g.cs => AI21.Models.ToolResource.g.cs} | 18 +- .../Generated/AI21.Models.Visibility.g.cs | 51 ++ ...I21.Models.WebSearchToolResource.Json.g.cs | 92 +++ .../AI21.Models.WebSearchToolResource.g.cs | 64 ++ ...AI21.Models.WebSearchToolResourceType.g.cs | 45 ++ src/libs/AI21/openapi.yaml | 683 ++++++++++++++++-- 133 files changed, 8666 insertions(+), 509 deletions(-) create mode 100644 src/libs/AI21/Generated/AI21.Ai21Api.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGet.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Ai21Api.McpToolDiscoveryStudioV1McpDiscoverPost.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Ai21Api.V1CreateAssistant.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Ai21Api.V1ModifyAssistant.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Ai21Api.V1RunAssistant.g.cs create mode 100644 src/libs/AI21/Generated/AI21.IAi21Api.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGet.g.cs create mode 100644 src/libs/AI21/Generated/AI21.IAi21Api.McpToolDiscoveryStudioV1McpDiscoverPost.g.cs create mode 100644 src/libs/AI21/Generated/AI21.IAi21Api.V1CreateAssistant.g.cs create mode 100644 src/libs/AI21/Generated/AI21.IAi21Api.V1ModifyAssistant.g.cs create mode 100644 src/libs/AI21/Generated/AI21.IAi21Api.V1RunAssistant.g.cs rename src/libs/AI21/Generated/{AI21.JsonConverters.ToolDefinitionType.g.cs => AI21.JsonConverters.AssistantType.g.cs} (69%) rename src/libs/AI21/Generated/{AI21.JsonConverters.ToolDefinitionTypeNullable.g.cs => AI21.JsonConverters.AssistantTypeNullable.g.cs} (71%) rename src/libs/AI21/Generated/{AI21.JsonConverters.CreateMaestroRunsPayloadTool2.g.cs => AI21.JsonConverters.BudgetLevel.g.cs} (66%) rename src/libs/AI21/Generated/{AI21.JsonConverters.CreateMaestroRunsPayloadTool2Nullable.g.cs => AI21.JsonConverters.BudgetLevelNullable.g.cs} (68%) rename src/libs/AI21/Generated/{AI21.JsonConverters.ConversationalRagConfigRetrievalStrategy.g.cs => AI21.JsonConverters.FileSearchToolResourceLabelsFilterMode.g.cs} (64%) rename src/libs/AI21/Generated/{AI21.JsonConverters.ConversationalRagConfigRetrievalStrategyNullable.g.cs => AI21.JsonConverters.FileSearchToolResourceLabelsFilterModeNullable.g.cs} (66%) create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceResponseLanguage.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceResponseLanguageNullable.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceType.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceTypeNullable.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolFunctionParametersType.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolFunctionParametersTypeNullable.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolResourceType.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolResourceTypeNullable.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionType.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionTypeNullable.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeNullable.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.MCPToolResourceType.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.MCPToolResourceTypeNullable.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.RunAssistantRequestResponseLanguage.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.RunAssistantRequestResponseLanguageNullable.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.RunOptimization.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.RunOptimizationNullable.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.Visibility.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.VisibilityNullable.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.WebSearchToolResourceType.g.cs create mode 100644 src/libs/AI21/Generated/AI21.JsonConverters.WebSearchToolResourceTypeNullable.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.AssistantType.g.cs rename src/libs/AI21/Generated/{AI21.Models.CreateMaestroRunsPayloadTool2.g.cs => AI21.Models.BudgetLevel.g.cs} (56%) delete mode 100644 src/libs/AI21/Generated/AI21.Models.ConversationalRagConfigRetrievalStrategy.g.cs rename src/libs/AI21/Generated/{AI21.Models.ToolResourcesWebSearch.Json.g.cs => AI21.Models.CreateAssistantRequest.Json.g.cs} (87%) create mode 100644 src/libs/AI21/Generated/AI21.Models.CreateAssistantRequest.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestTool.Json.g.cs rename src/libs/AI21/Generated/{AI21.Models.CreateMaestroRunsPayloadTool.g.cs => AI21.Models.CreateAssistantRequestTool.g.cs} (88%) create mode 100644 src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestToolResources.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestToolResources.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.FileSearchToolResource.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.FileSearchToolResource.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceLabelsFilterMode.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceResponseLanguage.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceType.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolEndpoint.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolEndpoint.g.cs rename src/libs/AI21/Generated/{AI21.Models.ToolResourcesFileSearch.Json.g.cs => AI21.Models.HTTPToolEndpointHeaders.Json.g.cs} (87%) rename src/libs/AI21/Generated/{AI21.Models.ToolResourcesFileSearch.g.cs => AI21.Models.HTTPToolEndpointHeaders.g.cs} (89%) create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolFunction.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolFunction.g.cs rename src/libs/AI21/Generated/{AI21.Models.CreateMaestroRunsPayloadTool.Json.g.cs => AI21.Models.HTTPToolFunctionParamProperties.Json.g.cs} (85%) create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParamProperties.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParameters.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParameters.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersProperties.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersProperties.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersType.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolResource.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolResource.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.HTTPToolResourceType.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesAssistantRequirement.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesAssistantRequirement.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinition.Json.g.cs rename src/libs/AI21/Generated/{AI21.Models.ToolDefinition.g.cs => AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinition.g.cs} (66%) create mode 100644 src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinitionType.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineRequirement.Json.g.cs rename src/libs/AI21/Generated/{AI21.Models.Requirement.g.cs => AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineRequirement.g.cs} (79%) create mode 100644 src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.g.cs rename src/libs/AI21/Generated/{AI21.Models.ToolDefinition.Json.g.cs => AI21.Models.MCPDefinition.Json.g.cs} (88%) create mode 100644 src/libs/AI21/Generated/AI21.Models.MCPDefinition.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.MCPDefinitionHeaders.Json.g.cs rename src/libs/AI21/Generated/{AI21.Models.ToolResourcesWebSearch.g.cs => AI21.Models.MCPDefinitionHeaders.g.cs} (89%) create mode 100644 src/libs/AI21/Generated/AI21.Models.MCPDiscoveryResponse.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.MCPDiscoveryResponse.g.cs rename src/libs/AI21/Generated/{AI21.Models.Requirement.Json.g.cs => AI21.Models.MCPTool.Json.g.cs} (89%) create mode 100644 src/libs/AI21/Generated/AI21.Models.MCPTool.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.MCPToolInputSchema.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.MCPToolInputSchema.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.MCPToolResource.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.MCPToolResource.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.MCPToolResourceHeaders.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.MCPToolResourceHeaders.g.cs rename src/libs/AI21/Generated/{AI21.Models.ToolDefinitionType.g.cs => AI21.Models.MCPToolResourceType.g.cs} (66%) create mode 100644 src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequest.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequest.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequestTool.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequestTool.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.RunAssistantRequest.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.RunAssistantRequest.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.RunAssistantRequestOutputType.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.RunAssistantRequestOutputType.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.RunAssistantRequestResponseLanguage.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.RunOptimization.g.cs rename src/libs/AI21/Generated/{AI21.Models.ToolResources.Json.g.cs => AI21.Models.ToolResource.Json.g.cs} (90%) rename src/libs/AI21/Generated/{AI21.Models.ToolResources.g.cs => AI21.Models.ToolResource.g.cs} (75%) create mode 100644 src/libs/AI21/Generated/AI21.Models.Visibility.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.WebSearchToolResource.Json.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.WebSearchToolResource.g.cs create mode 100644 src/libs/AI21/Generated/AI21.Models.WebSearchToolResourceType.g.cs diff --git a/src/libs/AI21/Generated/AI21..JsonSerializerContext.g.cs b/src/libs/AI21/Generated/AI21..JsonSerializerContext.g.cs index 461cdf7..6418e15 100644 --- a/src/libs/AI21/Generated/AI21..JsonSerializerContext.g.cs +++ b/src/libs/AI21/Generated/AI21..JsonSerializerContext.g.cs @@ -15,6 +15,12 @@ namespace AI21 { typeof(global::AI21.JsonConverters.AssistantTool2JsonConverter), typeof(global::AI21.JsonConverters.AssistantTool2NullableJsonConverter), + typeof(global::AI21.JsonConverters.BudgetLevelJsonConverter), + typeof(global::AI21.JsonConverters.BudgetLevelNullableJsonConverter), + typeof(global::AI21.JsonConverters.VisibilityJsonConverter), + typeof(global::AI21.JsonConverters.VisibilityNullableJsonConverter), + typeof(global::AI21.JsonConverters.AssistantTypeJsonConverter), + typeof(global::AI21.JsonConverters.AssistantTypeNullableJsonConverter), typeof(global::AI21.JsonConverters.AssistantMessageRoleJsonConverter), typeof(global::AI21.JsonConverters.AssistantMessageRoleNullableJsonConverter), typeof(global::AI21.JsonConverters.ToolCallTypeJsonConverter), @@ -35,8 +41,8 @@ namespace AI21 typeof(global::AI21.JsonConverters.SystemMessageRoleNullableJsonConverter), typeof(global::AI21.JsonConverters.ChatRequestMessageDiscriminatorRoleJsonConverter), typeof(global::AI21.JsonConverters.ChatRequestMessageDiscriminatorRoleNullableJsonConverter), - typeof(global::AI21.JsonConverters.ToolDefinitionTypeJsonConverter), - typeof(global::AI21.JsonConverters.ToolDefinitionTypeNullableJsonConverter), + typeof(global::AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionTypeJsonConverter), + typeof(global::AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionTypeNullableJsonConverter), typeof(global::AI21.JsonConverters.ToolParametersTypeJsonConverter), typeof(global::AI21.JsonConverters.ToolParametersTypeNullableJsonConverter), typeof(global::AI21.JsonConverters.ResponseFormatTypeJsonConverter), @@ -47,12 +53,26 @@ namespace AI21 typeof(global::AI21.JsonConverters.ConnectorsWorkflowStatusNullableJsonConverter), typeof(global::AI21.JsonConverters.MessageRoleJsonConverter), typeof(global::AI21.JsonConverters.MessageRoleNullableJsonConverter), - typeof(global::AI21.JsonConverters.ConversationalRagConfigRetrievalStrategyJsonConverter), - typeof(global::AI21.JsonConverters.ConversationalRagConfigRetrievalStrategyNullableJsonConverter), + typeof(global::AI21.JsonConverters.RetrievalStrategyJsonConverter), + typeof(global::AI21.JsonConverters.RetrievalStrategyNullableJsonConverter), typeof(global::AI21.JsonConverters.ConversationalRagConfigResponseLanguageJsonConverter), typeof(global::AI21.JsonConverters.ConversationalRagConfigResponseLanguageNullableJsonConverter), - typeof(global::AI21.JsonConverters.CreateMaestroRunsPayloadTool2JsonConverter), - typeof(global::AI21.JsonConverters.CreateMaestroRunsPayloadTool2NullableJsonConverter), + typeof(global::AI21.JsonConverters.HTTPToolResourceTypeJsonConverter), + typeof(global::AI21.JsonConverters.HTTPToolResourceTypeNullableJsonConverter), + typeof(global::AI21.JsonConverters.HTTPToolFunctionParametersTypeJsonConverter), + typeof(global::AI21.JsonConverters.HTTPToolFunctionParametersTypeNullableJsonConverter), + typeof(global::AI21.JsonConverters.MCPToolResourceTypeJsonConverter), + typeof(global::AI21.JsonConverters.MCPToolResourceTypeNullableJsonConverter), + typeof(global::AI21.JsonConverters.FileSearchToolResourceTypeJsonConverter), + typeof(global::AI21.JsonConverters.FileSearchToolResourceTypeNullableJsonConverter), + typeof(global::AI21.JsonConverters.FileSearchToolResourceLabelsFilterModeJsonConverter), + typeof(global::AI21.JsonConverters.FileSearchToolResourceLabelsFilterModeNullableJsonConverter), + typeof(global::AI21.JsonConverters.FileSearchToolResourceResponseLanguageJsonConverter), + typeof(global::AI21.JsonConverters.FileSearchToolResourceResponseLanguageNullableJsonConverter), + typeof(global::AI21.JsonConverters.WebSearchToolResourceTypeJsonConverter), + typeof(global::AI21.JsonConverters.WebSearchToolResourceTypeNullableJsonConverter), + typeof(global::AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeJsonConverter), + typeof(global::AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeNullableJsonConverter), typeof(global::AI21.JsonConverters.CreateMaestroRunsPayloadBudgetJsonConverter), typeof(global::AI21.JsonConverters.CreateMaestroRunsPayloadBudgetNullableJsonConverter), typeof(global::AI21.JsonConverters.MaestroPayloadTypeJsonConverter), @@ -67,15 +87,18 @@ namespace AI21 typeof(global::AI21.JsonConverters.FileStatusNullableJsonConverter), typeof(global::AI21.JsonConverters.LibrarySearchRequestLabelsFilterModeJsonConverter), typeof(global::AI21.JsonConverters.LibrarySearchRequestLabelsFilterModeNullableJsonConverter), - typeof(global::AI21.JsonConverters.RetrievalStrategyJsonConverter), - typeof(global::AI21.JsonConverters.RetrievalStrategyNullableJsonConverter), typeof(global::AI21.JsonConverters.MaestroRunResultStatusJsonConverter), typeof(global::AI21.JsonConverters.MaestroRunResultStatusNullableJsonConverter), typeof(global::AI21.JsonConverters.ModelQuantizationJsonConverter), typeof(global::AI21.JsonConverters.ModelQuantizationNullableJsonConverter), + typeof(global::AI21.JsonConverters.RunOptimizationJsonConverter), + typeof(global::AI21.JsonConverters.RunOptimizationNullableJsonConverter), + typeof(global::AI21.JsonConverters.RunAssistantRequestResponseLanguageJsonConverter), + typeof(global::AI21.JsonConverters.RunAssistantRequestResponseLanguageNullableJsonConverter), typeof(global::AI21.JsonConverters.WebsiteConnectorPayloadTypeJsonConverter), typeof(global::AI21.JsonConverters.WebsiteConnectorPayloadTypeNullableJsonConverter), typeof(global::AI21.JsonConverters.MessagesItemJsonConverter), + typeof(global::AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionJsonConverter), typeof(global::AI21.JsonConverters.QueryFilterJsonConverter), typeof(global::AI21.JsonConverters.AnyOfJsonConverter, global::System.Collections.Generic.IList>), typeof(global::AI21.JsonConverters.AnyOfJsonConverter), diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGet.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGet.g.cs new file mode 100644 index 0000000..6e32933 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Ai21Api.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGet.g.cs @@ -0,0 +1,194 @@ + +#nullable enable + +namespace AI21 +{ + public partial class Ai21Api + { + partial void PrepareGetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetArguments( + global::System.Net.Http.HttpClient httpClient, + ref string vectorStoreId); + partial void PrepareGetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string vectorStoreId); + partial void ProcessGetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessGetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get Vector Store
+ /// Get a vector store by ID. + ///
+ /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetAsync( + string vectorStoreId, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareGetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetArguments( + httpClient: HttpClient, + vectorStoreId: ref vectorStoreId); + + var __pathBuilder = new global::AI21.PathBuilder( + path: $"/studio/v1/demos/regulations/vector-store/{vectorStoreId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareGetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + vectorStoreId: vectorStoreId); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessGetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::AI21.HTTPValidationError? __value_422 = null; + try + { + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::AI21.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessGetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return __content; + } + catch (global::System.Exception __ex) + { + throw new global::AI21.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return __content; + } + catch (global::System.Exception __ex) + { + throw new global::AI21.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.McpToolDiscoveryStudioV1McpDiscoverPost.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.McpToolDiscoveryStudioV1McpDiscoverPost.g.cs new file mode 100644 index 0000000..c4fc11f --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Ai21Api.McpToolDiscoveryStudioV1McpDiscoverPost.g.cs @@ -0,0 +1,231 @@ + +#nullable enable + +namespace AI21 +{ + public partial class Ai21Api + { + partial void PrepareMcpToolDiscoveryStudioV1McpDiscoverPostArguments( + global::System.Net.Http.HttpClient httpClient, + global::AI21.MCPDefinition request); + partial void PrepareMcpToolDiscoveryStudioV1McpDiscoverPostRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::AI21.MCPDefinition request); + partial void ProcessMcpToolDiscoveryStudioV1McpDiscoverPostResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessMcpToolDiscoveryStudioV1McpDiscoverPostResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Mcp Tool Discovery + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task McpToolDiscoveryStudioV1McpDiscoverPostAsync( + global::AI21.MCPDefinition request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareMcpToolDiscoveryStudioV1McpDiscoverPostArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::AI21.PathBuilder( + path: "/studio/v1/mcp/discover", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareMcpToolDiscoveryStudioV1McpDiscoverPostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessMcpToolDiscoveryStudioV1McpDiscoverPostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::AI21.HTTPValidationError? __value_422 = null; + try + { + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::AI21.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessMcpToolDiscoveryStudioV1McpDiscoverPostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::AI21.MCPDiscoveryResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::AI21.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::AI21.MCPDiscoveryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::AI21.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Mcp Tool Discovery + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task McpToolDiscoveryStudioV1McpDiscoverPostAsync( + string serverUrl, + string? serverLabel = default, + object? headers = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::AI21.MCPDefinition + { + ServerUrl = serverUrl, + ServerLabel = serverLabel, + Headers = headers, + }; + + return await McpToolDiscoveryStudioV1McpDiscoverPostAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs index 4c5d35b..825f1a5 100644 --- a/src/libs/AI21/Generated/AI21.Ai21Api.UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs +++ b/src/libs/AI21/Generated/AI21.Ai21Api.UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs @@ -77,6 +77,12 @@ partial void ProcessUploadCheckComplianceStudioV1DemosRegulationsUploadCheckComp __httpRequestContent.Add( content: new global::System.Net.Http.StringContent($"{request.Budget}"), name: "budget"); + } + if (request.VectorStoreId != default) + { + __httpRequestContent.Add( + content: new global::System.Net.Http.StringContent($"{request.VectorStoreId}"), + name: "vector_store_id"); } __httpRequest.Content = __httpRequestContent; @@ -214,12 +220,16 @@ partial void ProcessUploadCheckComplianceStudioV1DemosRegulationsUploadCheckComp /// /// Default Value: MEDIUM /// + /// + /// Vector store ID to use for RFI processing + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePostAsync( byte[] file, string filename, string? budget = default, + string? vectorStoreId = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::AI21.BodyUploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost @@ -227,6 +237,7 @@ partial void ProcessUploadCheckComplianceStudioV1DemosRegulationsUploadCheckComp File = file, Filename = filename, Budget = budget, + VectorStoreId = vectorStoreId, }; return await UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePostAsync( diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.V1ConversationalRag.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.V1ConversationalRag.g.cs index 17cfde6..c44af91 100644 --- a/src/libs/AI21/Generated/AI21.Ai21Api.V1ConversationalRag.g.cs +++ b/src/libs/AI21/Generated/AI21.Ai21Api.V1ConversationalRag.g.cs @@ -214,6 +214,7 @@ partial void ProcessV1ConversationalRagResponseContent( /// /// Default Value: segments /// + /// /// /// Default Value: 0 /// @@ -224,7 +225,7 @@ partial void ProcessV1ConversationalRagResponseContent( /// Default Value: 1 /// /// - /// Default Value: english + /// Default Value: unset /// /// /// Default Value: false @@ -239,7 +240,8 @@ partial void ProcessV1ConversationalRagResponseContent( string? path = default, global::System.Collections.Generic.IList? labels = default, global::System.Collections.Generic.IList? fileIds = default, - global::AI21.ConversationalRagConfigRetrievalStrategy? retrievalStrategy = default, + global::AI21.RetrievalStrategy? retrievalStrategy = default, + int? maxDocuments = default, double? retrievalSimilarityThreshold = default, int? maxNeighbors = default, double? hybridSearchAlpha = default, @@ -255,6 +257,7 @@ partial void ProcessV1ConversationalRagResponseContent( Labels = labels, FileIds = fileIds, RetrievalStrategy = retrievalStrategy, + MaxDocuments = maxDocuments, RetrievalSimilarityThreshold = retrievalSimilarityThreshold, MaxNeighbors = maxNeighbors, HybridSearchAlpha = hybridSearchAlpha, diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.V1CreateAssistant.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.V1CreateAssistant.g.cs new file mode 100644 index 0000000..41f11f0 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Ai21Api.V1CreateAssistant.g.cs @@ -0,0 +1,256 @@ + +#nullable enable + +namespace AI21 +{ + public partial class Ai21Api + { + partial void PrepareV1CreateAssistantArguments( + global::System.Net.Http.HttpClient httpClient, + global::AI21.CreateAssistantRequest request); + partial void PrepareV1CreateAssistantRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::AI21.CreateAssistantRequest request); + partial void ProcessV1CreateAssistantResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1CreateAssistantResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Create Assistant + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1CreateAssistantAsync( + global::AI21.CreateAssistantRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareV1CreateAssistantArguments( + httpClient: HttpClient, + request: request); + + var __pathBuilder = new global::AI21.PathBuilder( + path: "/studio/v1/assistants", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareV1CreateAssistantRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessV1CreateAssistantResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::AI21.HTTPValidationError? __value_422 = null; + try + { + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::AI21.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessV1CreateAssistantResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::AI21.Assistant.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::AI21.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::AI21.Assistant.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::AI21.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Create Assistant + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: medium + /// + /// + /// Default Value: default + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1CreateAssistantAsync( + string name, + string? description = default, + string? optimization = default, + string? avatar = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList>? tools = default, + object? toolResources = default, + global::System.Collections.Generic.IList? requirements = default, + global::AI21.BudgetLevel? budget = default, + global::AI21.AssistantType? assistantType = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::AI21.CreateAssistantRequest + { + Name = name, + Description = description, + Optimization = optimization, + Avatar = avatar, + Models = models, + Tools = tools, + ToolResources = toolResources, + Requirements = requirements, + Budget = budget, + AssistantType = assistantType, + }; + + return await V1CreateAssistantAsync( + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.V1MaestroRun.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.V1MaestroRun.g.cs index 0870b7c..efe2e08 100644 --- a/src/libs/AI21/Generated/AI21.Ai21Api.V1MaestroRun.g.cs +++ b/src/libs/AI21/Generated/AI21.Ai21Api.V1MaestroRun.g.cs @@ -223,30 +223,28 @@ partial void ProcessV1MaestroRunResponseContent( /// /// Default Value: false /// - /// - /// Default Value: false - /// /// /// Default Value: maestro_run /// /// - /// + /// + /// Default Value: unset + /// /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task V1MaestroRunAsync( global::AI21.AnyOf, string> input, object? outputType = default, global::System.Collections.Generic.IList? models = default, - global::System.Collections.Generic.IList>? tools = default, - global::AI21.ToolResources? toolResources = default, + global::System.Collections.Generic.IList? tools = default, + global::AI21.ToolResource? toolResources = default, object? context = default, - global::System.Collections.Generic.IList? requirements = default, + global::System.Collections.Generic.IList? requirements = default, global::AI21.CreateMaestroRunsPayloadBudget? budget = default, bool? verbose = default, global::System.Collections.Generic.IList? include = default, bool? structuredRagEnabled = default, bool? dynamicPlanningEnabled = default, - bool? toolsAllowed = default, global::AI21.MaestroPayloadType? payloadType = default, global::System.Collections.Generic.IList? customRetrievalConfigs = default, global::AI21.CreateMaestroRunsPayloadResponseLanguage? responseLanguage = default, @@ -266,7 +264,6 @@ partial void ProcessV1MaestroRunResponseContent( Include = include, StructuredRagEnabled = structuredRagEnabled, DynamicPlanningEnabled = dynamicPlanningEnabled, - ToolsAllowed = toolsAllowed, PayloadType = payloadType, CustomRetrievalConfigs = customRetrievalConfigs, ResponseLanguage = responseLanguage, diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.V1ModifyAssistant.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.V1ModifyAssistant.g.cs new file mode 100644 index 0000000..883e8d6 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Ai21Api.V1ModifyAssistant.g.cs @@ -0,0 +1,272 @@ + +#nullable enable + +namespace AI21 +{ + public partial class Ai21Api + { + partial void PrepareV1ModifyAssistantArguments( + global::System.Net.Http.HttpClient httpClient, + ref string assistantId, + global::AI21.ModifyAssistantRequest request); + partial void PrepareV1ModifyAssistantRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string assistantId, + global::AI21.ModifyAssistantRequest request); + partial void ProcessV1ModifyAssistantResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1ModifyAssistantResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Modify Assistant + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1ModifyAssistantAsync( + string assistantId, + global::AI21.ModifyAssistantRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareV1ModifyAssistantArguments( + httpClient: HttpClient, + assistantId: ref assistantId, + request: request); + + var __pathBuilder = new global::AI21.PathBuilder( + path: $"/studio/v1/assistants/{assistantId}", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: new global::System.Net.Http.HttpMethod("PATCH"), + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareV1ModifyAssistantRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + assistantId: assistantId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessV1ModifyAssistantResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::AI21.HTTPValidationError? __value_422 = null; + try + { + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::AI21.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessV1ModifyAssistantResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::AI21.Assistant.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::AI21.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::AI21.Assistant.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::AI21.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Modify Assistant + /// + /// + /// + /// + /// + /// An enumeration. + /// + /// + /// + /// Default Value: false + /// + /// + /// + /// + /// + /// + /// An enumeration. + /// + /// + /// An enumeration. + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1ModifyAssistantAsync( + string assistantId, + string? name = default, + string? description = default, + global::AI21.RunOptimization? optimization = default, + string? avatar = default, + bool? isArchived = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList>? tools = default, + global::AI21.AssistantToolResource? toolResources = default, + global::System.Collections.Generic.IList? requirements = default, + global::AI21.BudgetLevel? budget = default, + global::AI21.Visibility? visibility = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::AI21.ModifyAssistantRequest + { + Name = name, + Description = description, + Optimization = optimization, + Avatar = avatar, + IsArchived = isArchived, + Models = models, + Tools = tools, + ToolResources = toolResources, + Requirements = requirements, + Budget = budget, + Visibility = visibility, + }; + + return await V1ModifyAssistantAsync( + assistantId: assistantId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Ai21Api.V1RunAssistant.g.cs b/src/libs/AI21/Generated/AI21.Ai21Api.V1RunAssistant.g.cs new file mode 100644 index 0000000..04604f6 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Ai21Api.V1RunAssistant.g.cs @@ -0,0 +1,262 @@ + +#nullable enable + +namespace AI21 +{ + public partial class Ai21Api + { + partial void PrepareV1RunAssistantArguments( + global::System.Net.Http.HttpClient httpClient, + ref string assistantId, + global::AI21.RunAssistantRequest request); + partial void PrepareV1RunAssistantRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string assistantId, + global::AI21.RunAssistantRequest request); + partial void ProcessV1RunAssistantResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessV1RunAssistantResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Run Assistant + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1RunAssistantAsync( + string assistantId, + global::AI21.RunAssistantRequest request, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareV1RunAssistantArguments( + httpClient: HttpClient, + assistantId: ref assistantId, + request: request); + + var __pathBuilder = new global::AI21.PathBuilder( + path: $"/studio/v1/assistants/{assistantId}/run", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareV1RunAssistantRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + assistantId: assistantId, + request: request); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessV1RunAssistantResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::AI21.HTTPValidationError? __value_422 = null; + try + { + if (ReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_422 = global::AI21.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_422 = await global::AI21.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + throw new global::AI21.ApiException( + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + statusCode: __response.StatusCode) + { + ResponseBody = __content_422, + ResponseObject = __value_422, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessV1RunAssistantResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::AI21.MaestroRunResult.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::AI21.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::AI21.MaestroRunResult.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::AI21.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + + /// + /// Run Assistant + /// + /// + /// + /// + /// Default Value: false + /// + /// + /// + /// Default Value: [data_sources, requirements_result, requirements_result.metadata] + /// + /// + /// Default Value: false + /// + /// + /// Default Value: false + /// + /// + /// Default Value: unset + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task V1RunAssistantAsync( + string assistantId, + global::System.Collections.Generic.IList input, + bool? verbose = default, + object? outputType = default, + global::System.Collections.Generic.IList? include = default, + bool? structuredRagEnabled = default, + bool? dynamicPlanningEnabled = default, + global::AI21.RunAssistantRequestResponseLanguage? responseLanguage = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::AI21.RunAssistantRequest + { + Input = input, + Verbose = verbose, + OutputType = outputType, + Include = include, + StructuredRagEnabled = structuredRagEnabled, + DynamicPlanningEnabled = dynamicPlanningEnabled, + ResponseLanguage = responseLanguage, + }; + + return await V1RunAssistantAsync( + assistantId: assistantId, + request: __request, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.IAi21Api.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGet.g.cs b/src/libs/AI21/Generated/AI21.IAi21Api.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGet.g.cs new file mode 100644 index 0000000..435b6a5 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.IAi21Api.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGet.g.cs @@ -0,0 +1,18 @@ +#nullable enable + +namespace AI21 +{ + public partial interface IAi21Api + { + /// + /// Get Vector Store
+ /// Get a vector store by ID. + ///
+ /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetAsync( + string vectorStoreId, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.IAi21Api.McpToolDiscoveryStudioV1McpDiscoverPost.g.cs b/src/libs/AI21/Generated/AI21.IAi21Api.McpToolDiscoveryStudioV1McpDiscoverPost.g.cs new file mode 100644 index 0000000..5de5f29 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.IAi21Api.McpToolDiscoveryStudioV1McpDiscoverPost.g.cs @@ -0,0 +1,31 @@ +#nullable enable + +namespace AI21 +{ + public partial interface IAi21Api + { + /// + /// Mcp Tool Discovery + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task McpToolDiscoveryStudioV1McpDiscoverPostAsync( + global::AI21.MCPDefinition request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Mcp Tool Discovery + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task McpToolDiscoveryStudioV1McpDiscoverPostAsync( + string serverUrl, + string? serverLabel = default, + object? headers = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.IAi21Api.UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs b/src/libs/AI21/Generated/AI21.IAi21Api.UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs index d59535f..e468743 100644 --- a/src/libs/AI21/Generated/AI21.IAi21Api.UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs +++ b/src/libs/AI21/Generated/AI21.IAi21Api.UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs @@ -24,12 +24,16 @@ public partial interface IAi21Api /// /// Default Value: MEDIUM /// + /// + /// Vector store ID to use for RFI processing + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task UploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePostAsync( byte[] file, string filename, string? budget = default, + string? vectorStoreId = default, global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.IAi21Api.V1ConversationalRag.g.cs b/src/libs/AI21/Generated/AI21.IAi21Api.V1ConversationalRag.g.cs index 651f202..7e56cf5 100644 --- a/src/libs/AI21/Generated/AI21.IAi21Api.V1ConversationalRag.g.cs +++ b/src/libs/AI21/Generated/AI21.IAi21Api.V1ConversationalRag.g.cs @@ -26,6 +26,7 @@ public partial interface IAi21Api /// /// Default Value: segments /// + /// /// /// Default Value: 0 /// @@ -36,7 +37,7 @@ public partial interface IAi21Api /// Default Value: 1 /// /// - /// Default Value: english + /// Default Value: unset /// /// /// Default Value: false @@ -51,7 +52,8 @@ public partial interface IAi21Api string? path = default, global::System.Collections.Generic.IList? labels = default, global::System.Collections.Generic.IList? fileIds = default, - global::AI21.ConversationalRagConfigRetrievalStrategy? retrievalStrategy = default, + global::AI21.RetrievalStrategy? retrievalStrategy = default, + int? maxDocuments = default, double? retrievalSimilarityThreshold = default, int? maxNeighbors = default, double? hybridSearchAlpha = default, diff --git a/src/libs/AI21/Generated/AI21.IAi21Api.V1CreateAssistant.g.cs b/src/libs/AI21/Generated/AI21.IAi21Api.V1CreateAssistant.g.cs new file mode 100644 index 0000000..16bfb97 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.IAi21Api.V1CreateAssistant.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace AI21 +{ + public partial interface IAi21Api + { + /// + /// Create Assistant + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task V1CreateAssistantAsync( + global::AI21.CreateAssistantRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Create Assistant + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: medium + /// + /// + /// Default Value: default + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task V1CreateAssistantAsync( + string name, + string? description = default, + string? optimization = default, + string? avatar = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList>? tools = default, + object? toolResources = default, + global::System.Collections.Generic.IList? requirements = default, + global::AI21.BudgetLevel? budget = default, + global::AI21.AssistantType? assistantType = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.IAi21Api.V1MaestroRun.g.cs b/src/libs/AI21/Generated/AI21.IAi21Api.V1MaestroRun.g.cs index 21683f1..75f833a 100644 --- a/src/libs/AI21/Generated/AI21.IAi21Api.V1MaestroRun.g.cs +++ b/src/libs/AI21/Generated/AI21.IAi21Api.V1MaestroRun.g.cs @@ -35,30 +35,28 @@ public partial interface IAi21Api /// /// Default Value: false /// - /// - /// Default Value: false - /// /// /// Default Value: maestro_run /// /// - /// + /// + /// Default Value: unset + /// /// The token to cancel the operation with /// global::System.Threading.Tasks.Task V1MaestroRunAsync( global::AI21.AnyOf, string> input, object? outputType = default, global::System.Collections.Generic.IList? models = default, - global::System.Collections.Generic.IList>? tools = default, - global::AI21.ToolResources? toolResources = default, + global::System.Collections.Generic.IList? tools = default, + global::AI21.ToolResource? toolResources = default, object? context = default, - global::System.Collections.Generic.IList? requirements = default, + global::System.Collections.Generic.IList? requirements = default, global::AI21.CreateMaestroRunsPayloadBudget? budget = default, bool? verbose = default, global::System.Collections.Generic.IList? include = default, bool? structuredRagEnabled = default, bool? dynamicPlanningEnabled = default, - bool? toolsAllowed = default, global::AI21.MaestroPayloadType? payloadType = default, global::System.Collections.Generic.IList? customRetrievalConfigs = default, global::AI21.CreateMaestroRunsPayloadResponseLanguage? responseLanguage = default, diff --git a/src/libs/AI21/Generated/AI21.IAi21Api.V1ModifyAssistant.g.cs b/src/libs/AI21/Generated/AI21.IAi21Api.V1ModifyAssistant.g.cs new file mode 100644 index 0000000..2b181d6 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.IAi21Api.V1ModifyAssistant.g.cs @@ -0,0 +1,59 @@ +#nullable enable + +namespace AI21 +{ + public partial interface IAi21Api + { + /// + /// Modify Assistant + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task V1ModifyAssistantAsync( + string assistantId, + global::AI21.ModifyAssistantRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Modify Assistant + /// + /// + /// + /// + /// + /// An enumeration. + /// + /// + /// + /// Default Value: false + /// + /// + /// + /// + /// + /// + /// An enumeration. + /// + /// + /// An enumeration. + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task V1ModifyAssistantAsync( + string assistantId, + string? name = default, + string? description = default, + global::AI21.RunOptimization? optimization = default, + string? avatar = default, + bool? isArchived = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList>? tools = default, + global::AI21.AssistantToolResource? toolResources = default, + global::System.Collections.Generic.IList? requirements = default, + global::AI21.BudgetLevel? budget = default, + global::AI21.Visibility? visibility = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.IAi21Api.V1RunAssistant.g.cs b/src/libs/AI21/Generated/AI21.IAi21Api.V1RunAssistant.g.cs new file mode 100644 index 0000000..7ba5d36 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.IAi21Api.V1RunAssistant.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AI21 +{ + public partial interface IAi21Api + { + /// + /// Run Assistant + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task V1RunAssistantAsync( + string assistantId, + global::AI21.RunAssistantRequest request, + global::System.Threading.CancellationToken cancellationToken = default); + + /// + /// Run Assistant + /// + /// + /// + /// + /// Default Value: false + /// + /// + /// + /// Default Value: [data_sources, requirements_result, requirements_result.metadata] + /// + /// + /// Default Value: false + /// + /// + /// Default Value: false + /// + /// + /// Default Value: unset + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task V1RunAssistantAsync( + string assistantId, + global::System.Collections.Generic.IList input, + bool? verbose = default, + object? outputType = default, + global::System.Collections.Generic.IList? include = default, + bool? structuredRagEnabled = default, + bool? dynamicPlanningEnabled = default, + global::AI21.RunAssistantRequestResponseLanguage? responseLanguage = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.IJambaCompleteClient.V1ChatComplete.g.cs b/src/libs/AI21/Generated/AI21.IJambaCompleteClient.V1ChatComplete.g.cs index 764f1e5..5f21a02 100644 --- a/src/libs/AI21/Generated/AI21.IJambaCompleteClient.V1ChatComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.IJambaCompleteClient.V1ChatComplete.g.cs @@ -86,7 +86,7 @@ public partial interface IJambaCompleteClient global::System.Threading.Tasks.Task>> V1ChatCompleteAsync( global::AI21.ModelName model, global::System.Collections.Generic.IList messages, - global::System.Collections.Generic.IList? tools = default, + global::System.Collections.Generic.IList? tools = default, int? n = default, int? maxTokens = default, double? temperature = default, diff --git a/src/libs/AI21/Generated/AI21.JambaCompleteClient.V1ChatComplete.g.cs b/src/libs/AI21/Generated/AI21.JambaCompleteClient.V1ChatComplete.g.cs index 068ad93..83d3705 100644 --- a/src/libs/AI21/Generated/AI21.JambaCompleteClient.V1ChatComplete.g.cs +++ b/src/libs/AI21/Generated/AI21.JambaCompleteClient.V1ChatComplete.g.cs @@ -274,7 +274,7 @@ partial void ProcessV1ChatCompleteResponseContent( public async global::System.Threading.Tasks.Task>> V1ChatCompleteAsync( global::AI21.ModelName model, global::System.Collections.Generic.IList messages, - global::System.Collections.Generic.IList? tools = default, + global::System.Collections.Generic.IList? tools = default, int? n = default, int? maxTokens = default, double? temperature = default, diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.ToolDefinitionType.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.AssistantType.g.cs similarity index 69% rename from src/libs/AI21/Generated/AI21.JsonConverters.ToolDefinitionType.g.cs rename to src/libs/AI21/Generated/AI21.JsonConverters.AssistantType.g.cs index 0544cab..c1afa3a 100644 --- a/src/libs/AI21/Generated/AI21.JsonConverters.ToolDefinitionType.g.cs +++ b/src/libs/AI21/Generated/AI21.JsonConverters.AssistantType.g.cs @@ -3,10 +3,10 @@ namespace AI21.JsonConverters { /// - public sealed class ToolDefinitionTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class AssistantTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::AI21.ToolDefinitionType Read( + public override global::AI21.AssistantType Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ToolDefinitionTypeJsonConverter : global::System.Text.Json.S var stringValue = reader.GetString(); if (stringValue != null) { - return global::AI21.ToolDefinitionTypeExtensions.ToEnum(stringValue) ?? default; + return global::AI21.AssistantTypeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class ToolDefinitionTypeJsonConverter : global::System.Text.Json.S case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::AI21.ToolDefinitionType)numValue; + return (global::AI21.AssistantType)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::AI21.ToolDefinitionType); + return default(global::AI21.AssistantType); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class ToolDefinitionTypeJsonConverter : global::System.Text.Json.S /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.ToolDefinitionType value, + global::AI21.AssistantType value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::AI21.ToolDefinitionTypeExtensions.ToValueString(value)); + writer.WriteStringValue(global::AI21.AssistantTypeExtensions.ToValueString(value)); } } } diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.ToolDefinitionTypeNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.AssistantTypeNullable.g.cs similarity index 71% rename from src/libs/AI21/Generated/AI21.JsonConverters.ToolDefinitionTypeNullable.g.cs rename to src/libs/AI21/Generated/AI21.JsonConverters.AssistantTypeNullable.g.cs index 0cfb120..286e09e 100644 --- a/src/libs/AI21/Generated/AI21.JsonConverters.ToolDefinitionTypeNullable.g.cs +++ b/src/libs/AI21/Generated/AI21.JsonConverters.AssistantTypeNullable.g.cs @@ -3,10 +3,10 @@ namespace AI21.JsonConverters { /// - public sealed class ToolDefinitionTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class AssistantTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::AI21.ToolDefinitionType? Read( + public override global::AI21.AssistantType? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ToolDefinitionTypeNullableJsonConverter : global::System.Tex var stringValue = reader.GetString(); if (stringValue != null) { - return global::AI21.ToolDefinitionTypeExtensions.ToEnum(stringValue); + return global::AI21.AssistantTypeExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class ToolDefinitionTypeNullableJsonConverter : global::System.Tex case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::AI21.ToolDefinitionType)numValue; + return (global::AI21.AssistantType)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::AI21.ToolDefinitionType?); + return default(global::AI21.AssistantType?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class ToolDefinitionTypeNullableJsonConverter : global::System.Tex /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.ToolDefinitionType? value, + global::AI21.AssistantType? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::AI21.ToolDefinitionTypeExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::AI21.AssistantTypeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.CreateMaestroRunsPayloadTool2.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.BudgetLevel.g.cs similarity index 66% rename from src/libs/AI21/Generated/AI21.JsonConverters.CreateMaestroRunsPayloadTool2.g.cs rename to src/libs/AI21/Generated/AI21.JsonConverters.BudgetLevel.g.cs index df9591f..2fe0262 100644 --- a/src/libs/AI21/Generated/AI21.JsonConverters.CreateMaestroRunsPayloadTool2.g.cs +++ b/src/libs/AI21/Generated/AI21.JsonConverters.BudgetLevel.g.cs @@ -3,10 +3,10 @@ namespace AI21.JsonConverters { /// - public sealed class CreateMaestroRunsPayloadTool2JsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class BudgetLevelJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::AI21.CreateMaestroRunsPayloadTool2 Read( + public override global::AI21.BudgetLevel Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class CreateMaestroRunsPayloadTool2JsonConverter : global::System. var stringValue = reader.GetString(); if (stringValue != null) { - return global::AI21.CreateMaestroRunsPayloadTool2Extensions.ToEnum(stringValue) ?? default; + return global::AI21.BudgetLevelExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class CreateMaestroRunsPayloadTool2JsonConverter : global::System. case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::AI21.CreateMaestroRunsPayloadTool2)numValue; + return (global::AI21.BudgetLevel)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::AI21.CreateMaestroRunsPayloadTool2); + return default(global::AI21.BudgetLevel); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class CreateMaestroRunsPayloadTool2JsonConverter : global::System. /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.CreateMaestroRunsPayloadTool2 value, + global::AI21.BudgetLevel value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::AI21.CreateMaestroRunsPayloadTool2Extensions.ToValueString(value)); + writer.WriteStringValue(global::AI21.BudgetLevelExtensions.ToValueString(value)); } } } diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.CreateMaestroRunsPayloadTool2Nullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.BudgetLevelNullable.g.cs similarity index 68% rename from src/libs/AI21/Generated/AI21.JsonConverters.CreateMaestroRunsPayloadTool2Nullable.g.cs rename to src/libs/AI21/Generated/AI21.JsonConverters.BudgetLevelNullable.g.cs index d74cf99..89c6920 100644 --- a/src/libs/AI21/Generated/AI21.JsonConverters.CreateMaestroRunsPayloadTool2Nullable.g.cs +++ b/src/libs/AI21/Generated/AI21.JsonConverters.BudgetLevelNullable.g.cs @@ -3,10 +3,10 @@ namespace AI21.JsonConverters { /// - public sealed class CreateMaestroRunsPayloadTool2NullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class BudgetLevelNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::AI21.CreateMaestroRunsPayloadTool2? Read( + public override global::AI21.BudgetLevel? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class CreateMaestroRunsPayloadTool2NullableJsonConverter : global: var stringValue = reader.GetString(); if (stringValue != null) { - return global::AI21.CreateMaestroRunsPayloadTool2Extensions.ToEnum(stringValue); + return global::AI21.BudgetLevelExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class CreateMaestroRunsPayloadTool2NullableJsonConverter : global: case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::AI21.CreateMaestroRunsPayloadTool2)numValue; + return (global::AI21.BudgetLevel)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::AI21.CreateMaestroRunsPayloadTool2?); + return default(global::AI21.BudgetLevel?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class CreateMaestroRunsPayloadTool2NullableJsonConverter : global: /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.CreateMaestroRunsPayloadTool2? value, + global::AI21.BudgetLevel? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::AI21.CreateMaestroRunsPayloadTool2Extensions.ToValueString(value.Value)); + writer.WriteStringValue(global::AI21.BudgetLevelExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.ConversationalRagConfigRetrievalStrategy.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceLabelsFilterMode.g.cs similarity index 64% rename from src/libs/AI21/Generated/AI21.JsonConverters.ConversationalRagConfigRetrievalStrategy.g.cs rename to src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceLabelsFilterMode.g.cs index 2580027..e1036db 100644 --- a/src/libs/AI21/Generated/AI21.JsonConverters.ConversationalRagConfigRetrievalStrategy.g.cs +++ b/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceLabelsFilterMode.g.cs @@ -3,10 +3,10 @@ namespace AI21.JsonConverters { /// - public sealed class ConversationalRagConfigRetrievalStrategyJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class FileSearchToolResourceLabelsFilterModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::AI21.ConversationalRagConfigRetrievalStrategy Read( + public override global::AI21.FileSearchToolResourceLabelsFilterMode Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ConversationalRagConfigRetrievalStrategyJsonConverter : glob var stringValue = reader.GetString(); if (stringValue != null) { - return global::AI21.ConversationalRagConfigRetrievalStrategyExtensions.ToEnum(stringValue) ?? default; + return global::AI21.FileSearchToolResourceLabelsFilterModeExtensions.ToEnum(stringValue) ?? default; } break; @@ -26,11 +26,11 @@ public sealed class ConversationalRagConfigRetrievalStrategyJsonConverter : glob case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::AI21.ConversationalRagConfigRetrievalStrategy)numValue; + return (global::AI21.FileSearchToolResourceLabelsFilterMode)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::AI21.ConversationalRagConfigRetrievalStrategy); + return default(global::AI21.FileSearchToolResourceLabelsFilterMode); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,12 +42,12 @@ public sealed class ConversationalRagConfigRetrievalStrategyJsonConverter : glob /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.ConversationalRagConfigRetrievalStrategy value, + global::AI21.FileSearchToolResourceLabelsFilterMode value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - writer.WriteStringValue(global::AI21.ConversationalRagConfigRetrievalStrategyExtensions.ToValueString(value)); + writer.WriteStringValue(global::AI21.FileSearchToolResourceLabelsFilterModeExtensions.ToValueString(value)); } } } diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.ConversationalRagConfigRetrievalStrategyNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceLabelsFilterModeNullable.g.cs similarity index 66% rename from src/libs/AI21/Generated/AI21.JsonConverters.ConversationalRagConfigRetrievalStrategyNullable.g.cs rename to src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceLabelsFilterModeNullable.g.cs index 44ad88b..514898f 100644 --- a/src/libs/AI21/Generated/AI21.JsonConverters.ConversationalRagConfigRetrievalStrategyNullable.g.cs +++ b/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceLabelsFilterModeNullable.g.cs @@ -3,10 +3,10 @@ namespace AI21.JsonConverters { /// - public sealed class ConversationalRagConfigRetrievalStrategyNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public sealed class FileSearchToolResourceLabelsFilterModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter { /// - public override global::AI21.ConversationalRagConfigRetrievalStrategy? Read( + public override global::AI21.FileSearchToolResourceLabelsFilterMode? Read( ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) @@ -18,7 +18,7 @@ public sealed class ConversationalRagConfigRetrievalStrategyNullableJsonConverte var stringValue = reader.GetString(); if (stringValue != null) { - return global::AI21.ConversationalRagConfigRetrievalStrategyExtensions.ToEnum(stringValue); + return global::AI21.FileSearchToolResourceLabelsFilterModeExtensions.ToEnum(stringValue); } break; @@ -26,11 +26,11 @@ public sealed class ConversationalRagConfigRetrievalStrategyNullableJsonConverte case global::System.Text.Json.JsonTokenType.Number: { var numValue = reader.GetInt32(); - return (global::AI21.ConversationalRagConfigRetrievalStrategy)numValue; + return (global::AI21.FileSearchToolResourceLabelsFilterMode)numValue; } case global::System.Text.Json.JsonTokenType.Null: { - return default(global::AI21.ConversationalRagConfigRetrievalStrategy?); + return default(global::AI21.FileSearchToolResourceLabelsFilterMode?); } default: throw new global::System.ArgumentOutOfRangeException(nameof(reader)); @@ -42,7 +42,7 @@ public sealed class ConversationalRagConfigRetrievalStrategyNullableJsonConverte /// public override void Write( global::System.Text.Json.Utf8JsonWriter writer, - global::AI21.ConversationalRagConfigRetrievalStrategy? value, + global::AI21.FileSearchToolResourceLabelsFilterMode? value, global::System.Text.Json.JsonSerializerOptions options) { writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); @@ -53,7 +53,7 @@ public override void Write( } else { - writer.WriteStringValue(global::AI21.ConversationalRagConfigRetrievalStrategyExtensions.ToValueString(value.Value)); + writer.WriteStringValue(global::AI21.FileSearchToolResourceLabelsFilterModeExtensions.ToValueString(value.Value)); } } } diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceResponseLanguage.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceResponseLanguage.g.cs new file mode 100644 index 0000000..b0ad8af --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceResponseLanguage.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class FileSearchToolResourceResponseLanguageJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.FileSearchToolResourceResponseLanguage 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::AI21.FileSearchToolResourceResponseLanguageExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.FileSearchToolResourceResponseLanguage)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.FileSearchToolResourceResponseLanguage); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.FileSearchToolResourceResponseLanguage value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.FileSearchToolResourceResponseLanguageExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceResponseLanguageNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceResponseLanguageNullable.g.cs new file mode 100644 index 0000000..c9e7790 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceResponseLanguageNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class FileSearchToolResourceResponseLanguageNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.FileSearchToolResourceResponseLanguage? 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::AI21.FileSearchToolResourceResponseLanguageExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.FileSearchToolResourceResponseLanguage)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.FileSearchToolResourceResponseLanguage?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.FileSearchToolResourceResponseLanguage? 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::AI21.FileSearchToolResourceResponseLanguageExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceType.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceType.g.cs new file mode 100644 index 0000000..26e844b --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class FileSearchToolResourceTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.FileSearchToolResourceType 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::AI21.FileSearchToolResourceTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.FileSearchToolResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.FileSearchToolResourceType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.FileSearchToolResourceType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.FileSearchToolResourceTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceTypeNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceTypeNullable.g.cs new file mode 100644 index 0000000..533cf67 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.FileSearchToolResourceTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class FileSearchToolResourceTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.FileSearchToolResourceType? 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::AI21.FileSearchToolResourceTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.FileSearchToolResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.FileSearchToolResourceType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.FileSearchToolResourceType? 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::AI21.FileSearchToolResourceTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolFunctionParametersType.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolFunctionParametersType.g.cs new file mode 100644 index 0000000..5f581d4 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolFunctionParametersType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class HTTPToolFunctionParametersTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.HTTPToolFunctionParametersType 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::AI21.HTTPToolFunctionParametersTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.HTTPToolFunctionParametersType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.HTTPToolFunctionParametersType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.HTTPToolFunctionParametersType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.HTTPToolFunctionParametersTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolFunctionParametersTypeNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolFunctionParametersTypeNullable.g.cs new file mode 100644 index 0000000..429f5c9 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolFunctionParametersTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class HTTPToolFunctionParametersTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.HTTPToolFunctionParametersType? 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::AI21.HTTPToolFunctionParametersTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.HTTPToolFunctionParametersType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.HTTPToolFunctionParametersType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.HTTPToolFunctionParametersType? 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::AI21.HTTPToolFunctionParametersTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolResourceType.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolResourceType.g.cs new file mode 100644 index 0000000..a7a50ee --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolResourceType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class HTTPToolResourceTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.HTTPToolResourceType 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::AI21.HTTPToolResourceTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.HTTPToolResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.HTTPToolResourceType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.HTTPToolResourceType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.HTTPToolResourceTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolResourceTypeNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolResourceTypeNullable.g.cs new file mode 100644 index 0000000..02c8981 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.HTTPToolResourceTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class HTTPToolResourceTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.HTTPToolResourceType? 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::AI21.HTTPToolResourceTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.HTTPToolResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.HTTPToolResourceType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.HTTPToolResourceType? 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::AI21.HTTPToolResourceTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionType.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionType.g.cs new file mode 100644 index 0000000..97a5839 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class LanguageStudioApiServerDataTypesChatToolDefinitionTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionType 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::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionTypeNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionTypeNullable.g.cs new file mode 100644 index 0000000..df34fb6 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class LanguageStudioApiServerDataTypesChatToolDefinitionTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionType? 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::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionType? 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::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.g.cs new file mode 100644 index 0000000..415c2d1 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.g.cs @@ -0,0 +1,99 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace AI21.JsonConverters +{ + /// + public class LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::AI21.HTTPToolResource? http = default; + if (discriminator?.Type == global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.Http) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.HTTPToolResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::AI21.HTTPToolResource)}"); + http = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::AI21.MCPToolResource? mcp = default; + if (discriminator?.Type == global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.Mcp) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.MCPToolResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::AI21.MCPToolResource)}"); + mcp = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::AI21.FileSearchToolResource? fileSearch = default; + if (discriminator?.Type == global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.FileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.FileSearchToolResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::AI21.FileSearchToolResource)}"); + fileSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::AI21.WebSearchToolResource? webSearch = default; + if (discriminator?.Type == global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.WebSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.WebSearchToolResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::AI21.WebSearchToolResource)}"); + webSearch = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition( + discriminator?.Type, + http, + mcp, + fileSearch, + webSearch + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsHttp) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.HTTPToolResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AI21.HTTPToolResource).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Http, typeInfo); + } + else if (value.IsMcp) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.MCPToolResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AI21.MCPToolResource).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Mcp, typeInfo); + } + else if (value.IsFileSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.FileSearchToolResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AI21.FileSearchToolResource).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.FileSearch, typeInfo); + } + else if (value.IsWebSearch) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::AI21.WebSearchToolResource), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::AI21.WebSearchToolResource).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.WebSearch, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.g.cs new file mode 100644 index 0000000..8f10bce --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType 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::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeNullable.g.cs new file mode 100644 index 0000000..940a5f9 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType? 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::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType? 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::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.MCPToolResourceType.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.MCPToolResourceType.g.cs new file mode 100644 index 0000000..6b793fe --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.MCPToolResourceType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class MCPToolResourceTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.MCPToolResourceType 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::AI21.MCPToolResourceTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.MCPToolResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.MCPToolResourceType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.MCPToolResourceType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.MCPToolResourceTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.MCPToolResourceTypeNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.MCPToolResourceTypeNullable.g.cs new file mode 100644 index 0000000..426ee22 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.MCPToolResourceTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class MCPToolResourceTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.MCPToolResourceType? 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::AI21.MCPToolResourceTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.MCPToolResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.MCPToolResourceType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.MCPToolResourceType? 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::AI21.MCPToolResourceTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.RunAssistantRequestResponseLanguage.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.RunAssistantRequestResponseLanguage.g.cs new file mode 100644 index 0000000..1a0d2d9 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.RunAssistantRequestResponseLanguage.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class RunAssistantRequestResponseLanguageJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.RunAssistantRequestResponseLanguage 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::AI21.RunAssistantRequestResponseLanguageExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.RunAssistantRequestResponseLanguage)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.RunAssistantRequestResponseLanguage); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.RunAssistantRequestResponseLanguage value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.RunAssistantRequestResponseLanguageExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.RunAssistantRequestResponseLanguageNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.RunAssistantRequestResponseLanguageNullable.g.cs new file mode 100644 index 0000000..6d858ae --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.RunAssistantRequestResponseLanguageNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class RunAssistantRequestResponseLanguageNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.RunAssistantRequestResponseLanguage? 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::AI21.RunAssistantRequestResponseLanguageExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.RunAssistantRequestResponseLanguage)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.RunAssistantRequestResponseLanguage?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.RunAssistantRequestResponseLanguage? 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::AI21.RunAssistantRequestResponseLanguageExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.RunOptimization.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.RunOptimization.g.cs new file mode 100644 index 0000000..c068a88 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.RunOptimization.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class RunOptimizationJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.RunOptimization 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::AI21.RunOptimizationExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.RunOptimization)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.RunOptimization); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.RunOptimization value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.RunOptimizationExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.RunOptimizationNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.RunOptimizationNullable.g.cs new file mode 100644 index 0000000..1fd5eb7 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.RunOptimizationNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class RunOptimizationNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.RunOptimization? 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::AI21.RunOptimizationExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.RunOptimization)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.RunOptimization?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.RunOptimization? 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::AI21.RunOptimizationExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.Visibility.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.Visibility.g.cs new file mode 100644 index 0000000..9f092d0 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.Visibility.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class VisibilityJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.Visibility 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::AI21.VisibilityExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.Visibility)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.Visibility); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.Visibility value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.VisibilityExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.VisibilityNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.VisibilityNullable.g.cs new file mode 100644 index 0000000..b16eeee --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.VisibilityNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class VisibilityNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.Visibility? 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::AI21.VisibilityExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.Visibility)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.Visibility?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.Visibility? 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::AI21.VisibilityExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.WebSearchToolResourceType.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.WebSearchToolResourceType.g.cs new file mode 100644 index 0000000..68e5b14 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.WebSearchToolResourceType.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class WebSearchToolResourceTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.WebSearchToolResourceType 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::AI21.WebSearchToolResourceTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.WebSearchToolResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.WebSearchToolResourceType); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.WebSearchToolResourceType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::AI21.WebSearchToolResourceTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonConverters.WebSearchToolResourceTypeNullable.g.cs b/src/libs/AI21/Generated/AI21.JsonConverters.WebSearchToolResourceTypeNullable.g.cs new file mode 100644 index 0000000..2b1a1d9 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.JsonConverters.WebSearchToolResourceTypeNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace AI21.JsonConverters +{ + /// + public sealed class WebSearchToolResourceTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::AI21.WebSearchToolResourceType? 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::AI21.WebSearchToolResourceTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::AI21.WebSearchToolResourceType)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::AI21.WebSearchToolResourceType?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::AI21.WebSearchToolResourceType? 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::AI21.WebSearchToolResourceTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/AI21/Generated/AI21.JsonSerializerContextTypes.g.cs b/src/libs/AI21/Generated/AI21.JsonSerializerContextTypes.g.cs index 65b8b0e..f86f6ab 100644 --- a/src/libs/AI21/Generated/AI21.JsonSerializerContextTypes.g.cs +++ b/src/libs/AI21/Generated/AI21.JsonSerializerContextTypes.g.cs @@ -78,706 +78,826 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::AI21.AssistantMessage? Type13 { get; set; } + public global::System.Collections.Generic.IList? Type13 { get; set; } /// /// /// - public global::AI21.AssistantMessageRole? Type14 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesAssistantRequirement? Type14 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type15 { get; set; } + public global::AI21.BudgetLevel? Type15 { get; set; } /// /// /// - public global::AI21.ToolCall? Type16 { get; set; } + public global::AI21.Visibility? Type16 { get; set; } /// /// /// - public global::AI21.ToolCallType? Type17 { get; set; } + public global::AI21.AssistantType? Type17 { get; set; } /// /// /// - public global::AI21.ToolFunction? Type18 { get; set; } + public global::AI21.AssistantMessage? Type18 { get; set; } /// /// /// - public global::AI21.AssistantRoute? Type19 { get; set; } + public global::AI21.AssistantMessageRole? Type19 { get; set; } /// /// /// - public global::AI21.BodyConvertDocumentFileStudioV1ChatFilesConvertPost? Type20 { get; set; } + public global::System.Collections.Generic.IList? Type20 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type21 { get; set; } + public global::AI21.ToolCall? Type21 { get; set; } /// /// /// - public byte[]? Type22 { get; set; } + public global::AI21.ToolCallType? Type22 { get; set; } /// /// /// - public global::AI21.BodyParsePdfStudioV1DemosDocumentModifierParsePdfPost? Type23 { get; set; } + public global::AI21.ToolFunction? Type23 { get; set; } /// /// /// - public global::AI21.BodyProcessRfiDocumentStudioV1DemosRfiProcessRfiPost? Type24 { get; set; } + public global::AI21.AssistantRoute? Type24 { get; set; } /// /// /// - public global::AI21.BodyUploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost? Type25 { get; set; } + public global::AI21.BodyConvertDocumentFileStudioV1ChatFilesConvertPost? Type25 { get; set; } /// /// /// - public global::AI21.BodyV1LibraryUpload? Type26 { get; set; } + public global::System.Collections.Generic.IList? Type26 { get; set; } /// /// /// - public global::AI21.UploadMode? Type27 { get; set; } + public byte[]? Type27 { get; set; } /// /// /// - public global::AI21.ChatCompletion? Type28 { get; set; } + public global::AI21.BodyParsePdfStudioV1DemosDocumentModifierParsePdfPost? Type28 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type29 { get; set; } + public global::AI21.BodyProcessRfiDocumentStudioV1DemosRfiProcessRfiPost? Type29 { get; set; } /// /// /// - public global::AI21.ChatCompletionResponseChoice? Type30 { get; set; } + public global::AI21.BodyUploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost? Type30 { get; set; } /// /// /// - public int? Type31 { get; set; } + public global::AI21.BodyV1LibraryUpload? Type31 { get; set; } /// /// /// - public global::AI21.Logprobs? Type32 { get; set; } + public global::AI21.UploadMode? Type32 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type33 { get; set; } + public global::AI21.ChatCompletion? Type33 { get; set; } /// /// /// - public global::AI21.LogprobsData? Type34 { get; set; } + public global::System.Collections.Generic.IList? Type34 { get; set; } /// /// /// - public double? Type35 { get; set; } + public global::AI21.ChatCompletionResponseChoice? Type35 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type36 { get; set; } + public int? Type36 { get; set; } /// /// /// - public global::AI21.TopLogprobsData? Type37 { get; set; } + public global::AI21.Logprobs? Type37 { get; set; } /// /// /// - public global::AI21.UsageInfo? Type38 { get; set; } + public global::System.Collections.Generic.IList? Type38 { get; set; } /// /// /// - public global::AI21.ChatCompletionResponseDeltaChoice? Type39 { get; set; } + public global::AI21.LogprobsData? Type39 { get; set; } /// /// /// - public global::AI21.AnyOf? Type40 { get; set; } + public double? Type40 { get; set; } /// /// /// - public global::AI21.ChatStreamingFirstDelta? Type41 { get; set; } + public global::System.Collections.Generic.IList? Type41 { get; set; } /// /// /// - public global::AI21.ChatStreamingFirstDeltaRole? Type42 { get; set; } + public global::AI21.TopLogprobsData? Type42 { get; set; } /// /// /// - public global::AI21.ChatStreamingContentDelta? Type43 { get; set; } + public global::AI21.UsageInfo? Type43 { get; set; } /// /// /// - public global::AI21.ChatStreamingToolCallsFirstDelta? Type44 { get; set; } + public global::AI21.ChatCompletionResponseDeltaChoice? Type44 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type45 { get; set; } + public global::AI21.AnyOf? Type45 { get; set; } /// /// /// - public global::AI21.ToolCallDeltaStart? Type46 { get; set; } + public global::AI21.ChatStreamingFirstDelta? Type46 { get; set; } /// /// /// - public global::AI21.ToolCallDeltaStartType? Type47 { get; set; } + public global::AI21.ChatStreamingFirstDeltaRole? Type47 { get; set; } /// /// /// - public global::AI21.ToolFunctionDeltaStart? Type48 { get; set; } + public global::AI21.ChatStreamingContentDelta? Type48 { get; set; } /// /// /// - public global::AI21.ChatStreamingToolCallsDelta? Type49 { get; set; } + public global::AI21.ChatStreamingToolCallsFirstDelta? Type49 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type50 { get; set; } + public global::System.Collections.Generic.IList? Type50 { get; set; } /// /// /// - public global::AI21.ToolCallDelta? Type51 { get; set; } + public global::AI21.ToolCallDeltaStart? Type51 { get; set; } /// /// /// - public global::AI21.ToolFunctionDelta? Type52 { get; set; } + public global::AI21.ToolCallDeltaStartType? Type52 { get; set; } /// /// /// - public global::AI21.ChatCompletionVllmStreamingMessage? Type53 { get; set; } + public global::AI21.ToolFunctionDeltaStart? Type53 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type54 { get; set; } + public global::AI21.ChatStreamingToolCallsDelta? Type54 { get; set; } /// /// /// - public global::AI21.ChatRequest? Type55 { get; set; } + public global::System.Collections.Generic.IList? Type55 { get; set; } /// /// /// - public global::AI21.ModelName? Type56 { get; set; } + public global::AI21.ToolCallDelta? Type56 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type57 { get; set; } + public global::AI21.ToolFunctionDelta? Type57 { get; set; } /// /// /// - public global::AI21.MessagesItem? Type58 { get; set; } + public global::AI21.ChatCompletionVllmStreamingMessage? Type58 { get; set; } /// /// /// - public global::AI21.UserMessage? Type59 { get; set; } + public global::System.Collections.Generic.IList? Type59 { get; set; } /// /// /// - public global::AI21.UserMessageRole? Type60 { get; set; } + public global::AI21.ChatRequest? Type60 { get; set; } /// /// /// - public global::AI21.ToolMessage? Type61 { get; set; } + public global::AI21.ModelName? Type61 { get; set; } /// /// /// - public global::AI21.ToolMessageRole? Type62 { get; set; } + public global::System.Collections.Generic.IList? Type62 { get; set; } /// /// /// - public global::AI21.SystemMessage? Type63 { get; set; } + public global::AI21.MessagesItem? Type63 { get; set; } /// /// /// - public global::AI21.SystemMessageRole? Type64 { get; set; } + public global::AI21.UserMessage? Type64 { get; set; } /// /// /// - public global::AI21.ChatRequestMessageDiscriminator? Type65 { get; set; } + public global::AI21.UserMessageRole? Type65 { get; set; } /// /// /// - public global::AI21.ChatRequestMessageDiscriminatorRole? Type66 { get; set; } + public global::AI21.ToolMessage? Type66 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type67 { get; set; } + public global::AI21.ToolMessageRole? Type67 { get; set; } /// /// /// - public global::AI21.ToolDefinition? Type68 { get; set; } + public global::AI21.SystemMessage? Type68 { get; set; } /// /// /// - public global::AI21.ToolDefinitionType? Type69 { get; set; } + public global::AI21.SystemMessageRole? Type69 { get; set; } /// /// /// - public global::AI21.FunctionToolDefinition? Type70 { get; set; } + public global::AI21.ChatRequestMessageDiscriminator? Type70 { get; set; } /// /// /// - public global::AI21.ToolParameters? Type71 { get; set; } + public global::AI21.ChatRequestMessageDiscriminatorRole? Type71 { get; set; } /// /// /// - public global::AI21.ToolParametersType? Type72 { get; set; } + public global::System.Collections.Generic.IList? Type72 { get; set; } /// /// /// - public global::AI21.AnyOf>? Type73 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesChatToolDefinition? Type73 { get; set; } /// /// /// - public global::AI21.MockResponseConfig? Type74 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionType? Type74 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type75 { get; set; } + public global::AI21.FunctionToolDefinition? Type75 { get; set; } /// /// /// - public global::AI21.DocumentSchema? Type76 { get; set; } + public global::AI21.ToolParameters? Type76 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type77 { get; set; } + public global::AI21.ToolParametersType? Type77 { get; set; } /// /// /// - public global::AI21.ResponseFormat? Type78 { get; set; } + public global::AI21.AnyOf>? Type78 { get; set; } /// /// /// - public global::AI21.ResponseFormatType? Type79 { get; set; } + public global::AI21.MockResponseConfig? Type79 { get; set; } /// /// /// - public global::AI21.CompareTextRequest? Type80 { get; set; } + public global::System.Collections.Generic.IList? Type80 { get; set; } /// /// /// - public global::AI21.ConnectorConnectionStatus? Type81 { get; set; } + public global::AI21.DocumentSchema? Type81 { get; set; } /// /// /// - public global::AI21.ParagonSyncStatus? Type82 { get; set; } + public global::System.Collections.Generic.Dictionary? Type82 { get; set; } /// /// /// - public global::AI21.ConnectorsDataSources? Type83 { get; set; } + public global::AI21.ResponseFormat? Type83 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type84 { get; set; } + public global::AI21.ResponseFormatType? Type84 { get; set; } /// /// /// - public global::AI21.DataSourceMetadata? Type85 { get; set; } + public global::AI21.CompareTextRequest? Type85 { get; set; } /// /// /// - public global::AI21.ConnectorsStatus? Type86 { get; set; } + public global::AI21.ConnectorConnectionStatus? Type86 { get; set; } /// /// /// - public global::AI21.ConnectorsWorkflowStatus? Type87 { get; set; } + public global::AI21.ParagonSyncStatus? Type87 { get; set; } /// /// /// - public global::AI21.ConnectorsSyncParams? Type88 { get; set; } + public global::AI21.ConnectorsDataSources? Type88 { get; set; } /// /// /// - public global::AI21.ConnectorsToken? Type89 { get; set; } + public global::System.Collections.Generic.IList? Type89 { get; set; } /// /// /// - public global::AI21.ConvRagExecuteRequest? Type90 { get; set; } + public global::AI21.DataSourceMetadata? Type90 { get; set; } /// /// /// - public global::AI21.ConversationalRagConfig? Type91 { get; set; } + public global::AI21.ConnectorsStatus? Type91 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type92 { get; set; } + public global::AI21.ConnectorsWorkflowStatus? Type92 { get; set; } /// /// /// - public global::AI21.Message? Type93 { get; set; } + public global::AI21.ConnectorsSyncParams? Type93 { get; set; } /// /// /// - public global::AI21.MessageRole? Type94 { get; set; } + public global::AI21.ConnectorsToken? Type94 { get; set; } /// /// /// - public global::AI21.ConversationalRagConfigRetrievalStrategy? Type95 { get; set; } + public global::AI21.ConvRagExecuteRequest? Type95 { get; set; } /// /// /// - public global::AI21.ConversationalRagConfigResponseLanguage? Type96 { get; set; } + public global::AI21.ConversationalRagConfig? Type96 { get; set; } /// /// /// - public global::AI21.ConversationalRagResult? Type97 { get; set; } + public global::System.Collections.Generic.IList? Type97 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type98 { get; set; } + public global::AI21.Message? Type98 { get; set; } /// /// /// - public global::AI21.ConversationalRagSource? Type99 { get; set; } + public global::AI21.MessageRole? Type99 { get; set; } /// /// /// - public global::AI21.CreateMaestroRunsPayload? Type100 { get; set; } + public global::AI21.RetrievalStrategy? Type100 { get; set; } /// /// /// - public global::AI21.AnyOf, string>? Type101 { get; set; } + public global::AI21.ConversationalRagConfigResponseLanguage? Type101 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type102 { get; set; } + public global::AI21.ConversationalRagResult? Type102 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type103 { get; set; } + public global::System.Collections.Generic.IList? Type103 { get; set; } /// /// /// - public global::AI21.CreateMaestroRunsPayloadTool2? Type104 { get; set; } + public global::AI21.ConversationalRagSource? Type104 { get; set; } /// /// /// - public global::AI21.ToolResources? Type105 { get; set; } + public global::AI21.CreateAssistantRequest? Type105 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type106 { get; set; } + public global::AI21.CreateMaestroRunsPayload? Type106 { get; set; } /// /// /// - public global::AI21.Requirement? Type107 { get; set; } + public global::AI21.AnyOf, string>? Type107 { get; set; } /// /// /// - public global::AI21.CreateMaestroRunsPayloadBudget? Type108 { get; set; } + public global::System.Collections.Generic.IList? Type108 { get; set; } /// /// /// - public global::AI21.MaestroPayloadType? Type109 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition? Type109 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type110 { get; set; } + public global::AI21.HTTPToolResource? Type110 { get; set; } /// /// /// - public global::AI21.CreateMaestroRunsPayloadResponseLanguage? Type111 { get; set; } + public global::AI21.HTTPToolResourceType? Type111 { get; set; } /// /// /// - public global::AI21.CreateOrganizationSchemaRequest? Type112 { get; set; } + public global::AI21.HTTPToolFunction? Type112 { get; set; } /// /// /// - public global::AI21.CreatePlanPayload? Type113 { get; set; } + public global::AI21.HTTPToolFunctionParameters? Type113 { get; set; } /// /// /// - public global::AI21.CreateRoutePayload? Type114 { get; set; } + public global::AI21.HTTPToolFunctionParametersType? Type114 { get; set; } /// /// /// - public global::AI21.CreateSecretPayload? Type115 { get; set; } + public global::System.Collections.Generic.Dictionary? Type115 { get; set; } /// /// /// - public global::AI21.DeleteAssistantResponse? Type116 { get; set; } + public global::AI21.HTTPToolFunctionParamProperties? Type116 { get; set; } /// /// /// - public global::AI21.Demo? Type117 { get; set; } + public global::AI21.HTTPToolEndpoint? Type117 { get; set; } /// /// /// - public global::AI21.DemoVisibility? Type118 { get; set; } + public global::AI21.MCPToolResource? Type118 { get; set; } /// /// /// - public global::AI21.DemoStatus? Type119 { get; set; } + public global::AI21.MCPToolResourceType? Type119 { get; set; } /// /// /// - public global::AI21.DemoCreate? Type120 { get; set; } + public global::AI21.FileSearchToolResource? Type120 { get; set; } /// /// /// - public global::AI21.DemoUpdate? Type121 { get; set; } + public global::AI21.FileSearchToolResourceType? Type121 { get; set; } /// /// /// - public global::AI21.DetectSchemaRequest? Type122 { get; set; } + public global::AI21.FileSearchToolResourceLabelsFilterMode? Type122 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type123 { get; set; } + public global::AI21.QueryFilter? Type123 { get; set; } /// /// /// - public global::AI21.DocumentReference? Type124 { get; set; } + public global::System.Collections.Generic.Dictionary>? Type124 { get; set; } /// /// /// - public global::AI21.DetectSchemaResponse? Type125 { get; set; } + public global::System.Collections.Generic.IList? Type125 { get; set; } /// /// /// - public global::AI21.DownloadModifiedDocumentRequest? Type126 { get; set; } + public global::System.Collections.Generic.Dictionary? Type126 { get; set; } /// /// /// - public global::AI21.FileResponse? Type127 { get; set; } + public global::AI21.FileSearchToolResourceResponseLanguage? Type127 { get; set; } /// /// /// - public global::AI21.FileStatus? Type128 { get; set; } + public global::AI21.WebSearchToolResource? Type128 { get; set; } /// /// /// - public global::AI21.FilesUpdateRequest? Type129 { get; set; } + public global::AI21.WebSearchToolResourceType? Type129 { get; set; } /// /// /// - public global::AI21.HTTPValidationError? Type130 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator? Type130 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type131 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType? Type131 { get; set; } /// /// /// - public global::AI21.ValidationError? Type132 { get; set; } + public global::AI21.ToolResource? Type132 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type133 { get; set; } + public global::System.Collections.Generic.IList? Type133 { get; set; } /// /// /// - public global::AI21.AnyOf? Type134 { get; set; } + public global::AI21.LanguageStudioApiServerDataTypesExecutionEngineRequirement? Type134 { get; set; } /// /// /// - public global::AI21.IgnestionBatchStatusCount? Type135 { get; set; } + public global::AI21.CreateMaestroRunsPayloadBudget? Type135 { get; set; } /// /// /// - public global::AI21.IngestionBatchStatusResponse? Type136 { get; set; } + public global::AI21.MaestroPayloadType? Type136 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type137 { get; set; } + public global::AI21.CreateMaestroRunsPayloadResponseLanguage? Type137 { get; set; } /// /// /// - public global::AI21.JambaExecuteRequest? Type138 { get; set; } + public global::AI21.CreateOrganizationSchemaRequest? Type138 { get; set; } /// /// /// - public global::AI21.LibrarySearchRequest? Type139 { get; set; } + public global::AI21.CreatePlanPayload? Type139 { get; set; } /// /// /// - public global::AI21.QueryFilter? Type140 { get; set; } + public global::AI21.CreateRoutePayload? Type140 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary>? Type141 { get; set; } + public global::AI21.CreateSecretPayload? Type141 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type142 { get; set; } + public global::AI21.DeleteAssistantResponse? Type142 { get; set; } /// /// /// - public global::AI21.LibrarySearchRequestLabelsFilterMode? Type143 { get; set; } + public global::AI21.Demo? Type143 { get; set; } /// /// /// - public global::AI21.RetrievalStrategy? Type144 { get; set; } + public global::AI21.DemoVisibility? Type144 { get; set; } /// /// /// - public global::AI21.ListAssistantsResponse? Type145 { get; set; } + public global::AI21.DemoStatus? Type145 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type146 { get; set; } + public global::AI21.DemoCreate? Type146 { get; set; } /// /// /// - public global::AI21.ListPlansResponse? Type147 { get; set; } + public global::AI21.DemoUpdate? Type147 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type148 { get; set; } + public global::AI21.DetectSchemaRequest? Type148 { get; set; } /// /// /// - public global::AI21.Plan? Type149 { get; set; } + public global::System.Collections.Generic.IList? Type149 { get; set; } /// /// /// - public global::AI21.ListRoutesResponse? Type150 { get; set; } + public global::AI21.DocumentReference? Type150 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type151 { get; set; } + public global::AI21.DetectSchemaResponse? Type151 { get; set; } /// /// /// - public global::AI21.MaestroRunResult? Type152 { get; set; } + public global::AI21.DownloadModifiedDocumentRequest? Type152 { get; set; } /// /// /// - public global::AI21.MaestroRunResultStatus? Type153 { get; set; } + public global::AI21.FileResponse? Type153 { get; set; } /// /// /// - public global::AI21.MarkdownRequest? Type154 { get; set; } + public global::AI21.FileStatus? Type154 { get; set; } /// /// /// - public global::AI21.ModelInfo? Type155 { get; set; } + public global::AI21.FilesUpdateRequest? Type155 { get; set; } /// /// /// - public global::AI21.ModelQuantization? Type156 { get; set; } + public global::AI21.HTTPValidationError? Type156 { get; set; } /// /// /// - public global::AI21.ModelPricing? Type157 { get; set; } + public global::System.Collections.Generic.IList? Type157 { get; set; } /// /// /// - public global::AI21.ModelsInfoResponse? Type158 { get; set; } + public global::AI21.ValidationError? Type158 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type159 { get; set; } + public global::System.Collections.Generic.IList>? Type159 { get; set; } /// /// /// - public global::AI21.OrgSchema? Type160 { get; set; } + public global::AI21.AnyOf? Type160 { get; set; } /// /// /// - public global::AI21.OrgSchemas? Type161 { get; set; } + public global::AI21.IgnestionBatchStatusCount? Type161 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type162 { get; set; } + public global::AI21.IngestionBatchStatusResponse? Type162 { get; set; } /// /// /// - public global::AI21.RFIResponseSection? Type163 { get; set; } + public global::System.Collections.Generic.IList? Type163 { get; set; } /// /// /// - public global::AI21.RequirementItem? Type164 { get; set; } + public global::AI21.JambaExecuteRequest? Type164 { get; set; } /// /// /// - public global::AI21.RequirementsGenerationRequest? Type165 { get; set; } + public global::AI21.LibrarySearchRequest? Type165 { get; set; } /// /// /// - public global::AI21.RequirementsGenerationResponse? Type166 { get; set; } + public global::AI21.LibrarySearchRequestLabelsFilterMode? Type166 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type167 { get; set; } + public global::AI21.ListAssistantsResponse? Type167 { get; set; } /// /// /// - public global::AI21.SecretResponse? Type168 { get; set; } + public global::System.Collections.Generic.IList? Type168 { get; set; } /// /// /// - public global::AI21.ThreadNameGenerationRequest? Type169 { get; set; } + public global::AI21.ListPlansResponse? Type169 { get; set; } /// /// /// - public global::AI21.ThreadNameGenerationResponse? Type170 { get; set; } + public global::System.Collections.Generic.IList? Type170 { get; set; } /// /// /// - public global::AI21.UpdateRoutePayload? Type171 { get; set; } + public global::AI21.Plan? Type171 { get; set; } /// /// /// - public global::AI21.UpdateSecretPayload? Type172 { get; set; } + public global::AI21.ListRoutesResponse? Type172 { get; set; } /// /// /// - public global::AI21.ValidationResult? Type173 { get; set; } + public global::System.Collections.Generic.IList? Type173 { get; set; } /// /// /// - public global::AI21.WebsiteConnectorCreateConfigPayload? Type174 { get; set; } + public global::AI21.MCPDefinition? Type174 { get; set; } /// /// /// - public global::AI21.WebsiteConnectorIngestUrlPayload? Type175 { get; set; } + public global::AI21.MCPDiscoveryResponse? Type175 { get; set; } /// /// /// - public global::AI21.WebsiteConnectorIngestWebsitePayload? Type176 { get; set; } + public global::System.Collections.Generic.IList? Type176 { get; set; } /// /// /// - public global::AI21.WebsiteConnectorPayload? Type177 { get; set; } + public global::AI21.MCPTool? Type177 { get; set; } /// /// /// - public global::AI21.WebsiteConnectorPayloadType? Type178 { get; set; } + public global::AI21.MaestroRunResult? Type178 { get; set; } /// /// /// - public global::AI21.WebsiteConnectorRetryIngestWebsitePayload? Type179 { get; set; } + public global::AI21.MaestroRunResultStatus? Type179 { get; set; } /// /// /// - public global::AI21.WorkspaceModelResponse? Type180 { get; set; } + public global::AI21.MarkdownRequest? Type180 { get; set; } /// /// /// - public global::AI21.WorkspaceModelUpdate? Type181 { get; set; } + public global::AI21.ModelInfo? Type181 { get; set; } /// /// /// - public global::AI21.WorkspaceModelsResponse? Type182 { get; set; } + public global::AI21.ModelQuantization? Type182 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type183 { get; set; } + public global::AI21.ModelPricing? Type183 { get; set; } /// /// /// - public global::AI21.AnyOf>? Type184 { get; set; } + public global::AI21.ModelsInfoResponse? Type184 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type185 { get; set; } + public global::System.Collections.Generic.IList? Type185 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type186 { get; set; } + public global::AI21.ModifyAssistantRequest? Type186 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type187 { get; set; } + public global::AI21.RunOptimization? Type187 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type188 { get; set; } + public global::AI21.OrgSchema? Type188 { get; set; } + /// + /// + /// + public global::AI21.OrgSchemas? Type189 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type190 { get; set; } + /// + /// + /// + public global::AI21.RFIResponseSection? Type191 { get; set; } + /// + /// + /// + public global::AI21.RequirementItem? Type192 { get; set; } + /// + /// + /// + public global::AI21.RequirementsGenerationRequest? Type193 { get; set; } + /// + /// + /// + public global::AI21.RequirementsGenerationResponse? Type194 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type195 { get; set; } + /// + /// + /// + public global::AI21.RunAssistantRequest? Type196 { get; set; } + /// + /// + /// + public global::AI21.RunAssistantRequestResponseLanguage? Type197 { get; set; } + /// + /// + /// + public global::AI21.SecretResponse? Type198 { get; set; } + /// + /// + /// + public global::AI21.ThreadNameGenerationRequest? Type199 { get; set; } + /// + /// + /// + public global::AI21.ThreadNameGenerationResponse? Type200 { get; set; } + /// + /// + /// + public global::AI21.UpdateRoutePayload? Type201 { get; set; } + /// + /// + /// + public global::AI21.UpdateSecretPayload? Type202 { get; set; } + /// + /// + /// + public global::AI21.ValidationResult? Type203 { get; set; } + /// + /// + /// + public global::AI21.WebsiteConnectorCreateConfigPayload? Type204 { get; set; } + /// + /// + /// + public global::AI21.WebsiteConnectorIngestUrlPayload? Type205 { get; set; } + /// + /// + /// + public global::AI21.WebsiteConnectorIngestWebsitePayload? Type206 { get; set; } + /// + /// + /// + public global::AI21.WebsiteConnectorPayload? Type207 { get; set; } + /// + /// + /// + public global::AI21.WebsiteConnectorPayloadType? Type208 { get; set; } + /// + /// + /// + public global::AI21.WebsiteConnectorRetryIngestWebsitePayload? Type209 { get; set; } + /// + /// + /// + public global::AI21.WorkspaceModelResponse? Type210 { get; set; } + /// + /// + /// + public global::AI21.WorkspaceModelUpdate? Type211 { get; set; } + /// + /// + /// + public global::AI21.WorkspaceModelsResponse? Type212 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type213 { get; set; } + /// + /// + /// + public global::AI21.AnyOf>? Type214 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type215 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type216 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type217 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type218 { get; set; } } } \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.Assistant.g.cs b/src/libs/AI21/Generated/AI21.Models.Assistant.g.cs index 2767991..8e832ad 100644 --- a/src/libs/AI21/Generated/AI21.Models.Assistant.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.Assistant.g.cs @@ -104,6 +104,33 @@ public sealed partial class Assistant [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] public global::AI21.AssistantToolResource? ToolResources { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("requirements")] + public global::System.Collections.Generic.IList? Requirements { get; set; } + + /// + /// Default Value: medium + /// + [global::System.Text.Json.Serialization.JsonPropertyName("budget")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.BudgetLevelJsonConverter))] + public global::AI21.BudgetLevel? Budget { get; set; } + + /// + /// Default Value: public + /// + [global::System.Text.Json.Serialization.JsonPropertyName("visibility")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.VisibilityJsonConverter))] + public global::AI21.Visibility? Visibility { get; set; } + + /// + /// Default Value: default + /// + [global::System.Text.Json.Serialization.JsonPropertyName("assistant_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.AssistantTypeJsonConverter))] + public global::AI21.AssistantType? AssistantType { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -133,6 +160,16 @@ public sealed partial class Assistant /// /// /// + /// + /// + /// Default Value: medium + /// + /// + /// Default Value: public + /// + /// + /// Default Value: default + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -150,7 +187,11 @@ public Assistant( bool? isArchived, global::AI21.AnyOf, global::System.Collections.Generic.IList>? models, global::System.Collections.Generic.IList>? tools, - global::AI21.AssistantToolResource? toolResources) + global::AI21.AssistantToolResource? toolResources, + global::System.Collections.Generic.IList? requirements, + global::AI21.BudgetLevel? budget, + global::AI21.Visibility? visibility, + global::AI21.AssistantType? assistantType) { this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); this.CreatedAt = createdAt; @@ -166,6 +207,10 @@ public Assistant( this.Models = models; this.Tools = tools; this.ToolResources = toolResources; + this.Requirements = requirements; + this.Budget = budget; + this.Visibility = visibility; + this.AssistantType = assistantType; } /// diff --git a/src/libs/AI21/Generated/AI21.Models.AssistantTool2.g.cs b/src/libs/AI21/Generated/AI21.Models.AssistantTool2.g.cs index cab80b4..783bc1e 100644 --- a/src/libs/AI21/Generated/AI21.Models.AssistantTool2.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.AssistantTool2.g.cs @@ -20,6 +20,10 @@ public enum AssistantTool2 /// /// PlanApproval, + /// + /// + /// + Rag, } /// @@ -37,6 +41,7 @@ public static string ToValueString(this AssistantTool2 value) AssistantTool2.FileSearch => "file_search", AssistantTool2.WebSearch => "web_search", AssistantTool2.PlanApproval => "plan_approval", + AssistantTool2.Rag => "rag", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -50,6 +55,7 @@ public static string ToValueString(this AssistantTool2 value) "file_search" => AssistantTool2.FileSearch, "web_search" => AssistantTool2.WebSearch, "plan_approval" => AssistantTool2.PlanApproval, + "rag" => AssistantTool2.Rag, _ => null, }; } diff --git a/src/libs/AI21/Generated/AI21.Models.AssistantType.g.cs b/src/libs/AI21/Generated/AI21.Models.AssistantType.g.cs new file mode 100644 index 0000000..3f5a628 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.AssistantType.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// An enumeration. + /// + public enum AssistantType + { + /// + /// + /// + Default, + /// + /// + /// + Chat, + /// + /// + /// + Maestro, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class AssistantTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this AssistantType value) + { + return value switch + { + AssistantType.Default => "default", + AssistantType.Chat => "chat", + AssistantType.Maestro => "maestro", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static AssistantType? ToEnum(string value) + { + return value switch + { + "default" => AssistantType.Default, + "chat" => AssistantType.Chat, + "maestro" => AssistantType.Maestro, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.BodyUploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs b/src/libs/AI21/Generated/AI21.Models.BodyUploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs index f378a64..225c010 100644 --- a/src/libs/AI21/Generated/AI21.Models.BodyUploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.BodyUploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost.g.cs @@ -28,6 +28,12 @@ public sealed partial class BodyUploadCheckComplianceStudioV1DemosRegulationsUpl [global::System.Text.Json.Serialization.JsonPropertyName("budget")] public string? Budget { get; set; } + /// + /// Vector store ID to use for RFI processing + /// + [global::System.Text.Json.Serialization.JsonPropertyName("vector_store_id")] + public string? VectorStoreId { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -42,17 +48,22 @@ public sealed partial class BodyUploadCheckComplianceStudioV1DemosRegulationsUpl /// /// Default Value: MEDIUM /// + /// + /// Vector store ID to use for RFI processing + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public BodyUploadCheckComplianceStudioV1DemosRegulationsUploadCheckCompliancePost( byte[] file, string filename, - string? budget) + string? budget, + string? vectorStoreId) { this.File = file ?? throw new global::System.ArgumentNullException(nameof(file)); this.Filename = filename ?? throw new global::System.ArgumentNullException(nameof(filename)); this.Budget = budget; + this.VectorStoreId = vectorStoreId; } /// diff --git a/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadTool2.g.cs b/src/libs/AI21/Generated/AI21.Models.BudgetLevel.g.cs similarity index 56% rename from src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadTool2.g.cs rename to src/libs/AI21/Generated/AI21.Models.BudgetLevel.g.cs index c61ffd5..ac52457 100644 --- a/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadTool2.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.BudgetLevel.g.cs @@ -4,46 +4,52 @@ namespace AI21 { /// - /// + /// An enumeration. /// - public enum CreateMaestroRunsPayloadTool2 + public enum BudgetLevel { /// /// /// - FileSearch, + Low, /// /// /// - WebSearch, + Medium, + /// + /// + /// + High, } /// /// Enum extensions to do fast conversions without the reflection. /// - public static class CreateMaestroRunsPayloadTool2Extensions + public static class BudgetLevelExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this CreateMaestroRunsPayloadTool2 value) + public static string ToValueString(this BudgetLevel value) { return value switch { - CreateMaestroRunsPayloadTool2.FileSearch => "file_search", - CreateMaestroRunsPayloadTool2.WebSearch => "web_search", + BudgetLevel.Low => "low", + BudgetLevel.Medium => "medium", + BudgetLevel.High => "high", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static CreateMaestroRunsPayloadTool2? ToEnum(string value) + public static BudgetLevel? ToEnum(string value) { return value switch { - "file_search" => CreateMaestroRunsPayloadTool2.FileSearch, - "web_search" => CreateMaestroRunsPayloadTool2.WebSearch, + "low" => BudgetLevel.Low, + "medium" => BudgetLevel.Medium, + "high" => BudgetLevel.High, _ => null, }; } diff --git a/src/libs/AI21/Generated/AI21.Models.ChatRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.ChatRequest.g.cs index 5f3bd5c..5d49e80 100644 --- a/src/libs/AI21/Generated/AI21.Models.ChatRequest.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.ChatRequest.g.cs @@ -32,7 +32,7 @@ public sealed partial class ChatRequest /// /// [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList? Tools { get; set; } + public global::System.Collections.Generic.IList? Tools { get; set; } /// /// How many chat responses to generate. _Range: 1 – 16_ **Notes:**
@@ -181,7 +181,7 @@ public sealed partial class ChatRequest public ChatRequest( global::AI21.ModelName model, global::System.Collections.Generic.IList messages, - global::System.Collections.Generic.IList? tools, + global::System.Collections.Generic.IList? tools, int? n, int? maxTokens, double? temperature, diff --git a/src/libs/AI21/Generated/AI21.Models.ConversationalRagConfig.g.cs b/src/libs/AI21/Generated/AI21.Models.ConversationalRagConfig.g.cs index 0472dda..cc6c858 100644 --- a/src/libs/AI21/Generated/AI21.Models.ConversationalRagConfig.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.ConversationalRagConfig.g.cs @@ -37,8 +37,14 @@ public sealed partial class ConversationalRagConfig /// Default Value: segments ///
[global::System.Text.Json.Serialization.JsonPropertyName("retrieval_strategy")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.ConversationalRagConfigRetrievalStrategyJsonConverter))] - public global::AI21.ConversationalRagConfigRetrievalStrategy? RetrievalStrategy { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.RetrievalStrategyJsonConverter))] + public global::AI21.RetrievalStrategy? RetrievalStrategy { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_documents")] + public int? MaxDocuments { get; set; } /// /// Default Value: 0 @@ -59,7 +65,7 @@ public sealed partial class ConversationalRagConfig public double? HybridSearchAlpha { get; set; } /// - /// Default Value: english + /// Default Value: unset /// [global::System.Text.Json.Serialization.JsonPropertyName("response_language")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.ConversationalRagConfigResponseLanguageJsonConverter))] @@ -95,6 +101,7 @@ public sealed partial class ConversationalRagConfig /// /// Default Value: segments /// + /// /// /// Default Value: 0 /// @@ -105,7 +112,7 @@ public sealed partial class ConversationalRagConfig /// Default Value: 1 /// /// - /// Default Value: english + /// Default Value: unset /// /// /// Default Value: false @@ -121,7 +128,8 @@ public ConversationalRagConfig( string? path, global::System.Collections.Generic.IList? labels, global::System.Collections.Generic.IList? fileIds, - global::AI21.ConversationalRagConfigRetrievalStrategy? retrievalStrategy, + global::AI21.RetrievalStrategy? retrievalStrategy, + int? maxDocuments, double? retrievalSimilarityThreshold, int? maxNeighbors, double? hybridSearchAlpha, @@ -134,6 +142,7 @@ public ConversationalRagConfig( this.Labels = labels; this.FileIds = fileIds; this.RetrievalStrategy = retrievalStrategy; + this.MaxDocuments = maxDocuments; this.RetrievalSimilarityThreshold = retrievalSimilarityThreshold; this.MaxNeighbors = maxNeighbors; this.HybridSearchAlpha = hybridSearchAlpha; diff --git a/src/libs/AI21/Generated/AI21.Models.ConversationalRagConfigResponseLanguage.g.cs b/src/libs/AI21/Generated/AI21.Models.ConversationalRagConfigResponseLanguage.g.cs index dd4b89a..5c44ee6 100644 --- a/src/libs/AI21/Generated/AI21.Models.ConversationalRagConfigResponseLanguage.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.ConversationalRagConfigResponseLanguage.g.cs @@ -4,7 +4,7 @@ namespace AI21 { /// - /// Default Value: english + /// Default Value: unset /// public enum ConversationalRagConfigResponseLanguage { @@ -44,6 +44,10 @@ public enum ConversationalRagConfigResponseLanguage /// /// Spanish, + /// + /// + /// + Unset, } /// @@ -67,6 +71,7 @@ public static string ToValueString(this ConversationalRagConfigResponseLanguage ConversationalRagConfigResponseLanguage.Italian => "italian", ConversationalRagConfigResponseLanguage.Portuguese => "portuguese", ConversationalRagConfigResponseLanguage.Spanish => "spanish", + ConversationalRagConfigResponseLanguage.Unset => "unset", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -86,6 +91,7 @@ public static string ToValueString(this ConversationalRagConfigResponseLanguage "italian" => ConversationalRagConfigResponseLanguage.Italian, "portuguese" => ConversationalRagConfigResponseLanguage.Portuguese, "spanish" => ConversationalRagConfigResponseLanguage.Spanish, + "unset" => ConversationalRagConfigResponseLanguage.Unset, _ => null, }; } diff --git a/src/libs/AI21/Generated/AI21.Models.ConversationalRagConfigRetrievalStrategy.g.cs b/src/libs/AI21/Generated/AI21.Models.ConversationalRagConfigRetrievalStrategy.g.cs deleted file mode 100644 index b682b8a..0000000 --- a/src/libs/AI21/Generated/AI21.Models.ConversationalRagConfigRetrievalStrategy.g.cs +++ /dev/null @@ -1,63 +0,0 @@ - -#nullable enable - -namespace AI21 -{ - /// - /// Default Value: segments - /// - public enum ConversationalRagConfigRetrievalStrategy - { - /// - /// - /// - Default, - /// - /// - /// - Segments, - /// - /// - /// - AddNeighbors, - /// - /// - /// - FullDoc, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class ConversationalRagConfigRetrievalStrategyExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this ConversationalRagConfigRetrievalStrategy value) - { - return value switch - { - ConversationalRagConfigRetrievalStrategy.Default => "default", - ConversationalRagConfigRetrievalStrategy.Segments => "segments", - ConversationalRagConfigRetrievalStrategy.AddNeighbors => "add_neighbors", - ConversationalRagConfigRetrievalStrategy.FullDoc => "full_doc", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static ConversationalRagConfigRetrievalStrategy? ToEnum(string value) - { - return value switch - { - "default" => ConversationalRagConfigRetrievalStrategy.Default, - "segments" => ConversationalRagConfigRetrievalStrategy.Segments, - "add_neighbors" => ConversationalRagConfigRetrievalStrategy.AddNeighbors, - "full_doc" => ConversationalRagConfigRetrievalStrategy.FullDoc, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.ToolResourcesWebSearch.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequest.Json.g.cs similarity index 87% rename from src/libs/AI21/Generated/AI21.Models.ToolResourcesWebSearch.Json.g.cs rename to src/libs/AI21/Generated/AI21.Models.CreateAssistantRequest.Json.g.cs index 05e3ded..b7d8301 100644 --- a/src/libs/AI21/Generated/AI21.Models.ToolResourcesWebSearch.Json.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequest.Json.g.cs @@ -2,7 +2,7 @@ namespace AI21 { - public sealed partial class ToolResourcesWebSearch + public sealed partial class CreateAssistantRequest { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::AI21.ToolResourcesWebSearch? FromJson( + public static global::AI21.CreateAssistantRequest? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::AI21.ToolResourcesWebSearch), - jsonSerializerContext) as global::AI21.ToolResourcesWebSearch; + typeof(global::AI21.CreateAssistantRequest), + jsonSerializerContext) as global::AI21.CreateAssistantRequest; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::AI21.ToolResourcesWebSearch? FromJson( + public static global::AI21.CreateAssistantRequest? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::AI21.ToolResourcesWebSearch), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ToolResourcesWebSearch; + typeof(global::AI21.CreateAssistantRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.CreateAssistantRequest; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequest.g.cs new file mode 100644 index 0000000..5888d6d --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequest.g.cs @@ -0,0 +1,131 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class CreateAssistantRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("optimization")] + public string? Optimization { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("avatar")] + public string? Avatar { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("models")] + public global::System.Collections.Generic.IList? Models { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList>? Tools { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] + public object? ToolResources { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("requirements")] + public global::System.Collections.Generic.IList? Requirements { get; set; } + + /// + /// Default Value: medium + /// + [global::System.Text.Json.Serialization.JsonPropertyName("budget")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.BudgetLevelJsonConverter))] + public global::AI21.BudgetLevel? Budget { get; set; } + + /// + /// Default Value: default + /// + [global::System.Text.Json.Serialization.JsonPropertyName("assistant_type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.AssistantTypeJsonConverter))] + public global::AI21.AssistantType? AssistantType { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// Default Value: medium + /// + /// + /// Default Value: default + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public CreateAssistantRequest( + string name, + string? description, + string? optimization, + string? avatar, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList>? tools, + object? toolResources, + global::System.Collections.Generic.IList? requirements, + global::AI21.BudgetLevel? budget, + global::AI21.AssistantType? assistantType) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description; + this.Optimization = optimization; + this.Avatar = avatar; + this.Models = models; + this.Tools = tools; + this.ToolResources = toolResources; + this.Requirements = requirements; + this.Budget = budget; + this.AssistantType = assistantType; + } + + /// + /// Initializes a new instance of the class. + /// + public CreateAssistantRequest() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestTool.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestTool.Json.g.cs new file mode 100644 index 0000000..8eb46df --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestTool.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class CreateAssistantRequestTool + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.CreateAssistantRequestTool? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.CreateAssistantRequestTool), + jsonSerializerContext) as global::AI21.CreateAssistantRequestTool; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.CreateAssistantRequestTool? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.CreateAssistantRequestTool), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.CreateAssistantRequestTool; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadTool.g.cs b/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestTool.g.cs similarity index 88% rename from src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadTool.g.cs rename to src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestTool.g.cs index 12cc44f..6b21dee 100644 --- a/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadTool.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestTool.g.cs @@ -6,7 +6,7 @@ namespace AI21 /// /// /// - public sealed partial class CreateMaestroRunsPayloadTool + public sealed partial class CreateAssistantRequestTool { /// diff --git a/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestToolResources.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestToolResources.Json.g.cs new file mode 100644 index 0000000..0c1806b --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestToolResources.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class CreateAssistantRequestToolResources + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.CreateAssistantRequestToolResources? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.CreateAssistantRequestToolResources), + jsonSerializerContext) as global::AI21.CreateAssistantRequestToolResources; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.CreateAssistantRequestToolResources? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.CreateAssistantRequestToolResources), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.CreateAssistantRequestToolResources; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestToolResources.g.cs b/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestToolResources.g.cs new file mode 100644 index 0000000..201d319 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.CreateAssistantRequestToolResources.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class CreateAssistantRequestToolResources + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayload.g.cs b/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayload.g.cs index ce612fe..fdcf956 100644 --- a/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayload.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayload.g.cs @@ -34,13 +34,13 @@ public sealed partial class CreateMaestroRunsPayload /// /// [global::System.Text.Json.Serialization.JsonPropertyName("tools")] - public global::System.Collections.Generic.IList>? Tools { get; set; } + public global::System.Collections.Generic.IList? Tools { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] - public global::AI21.ToolResources? ToolResources { get; set; } + public global::AI21.ToolResource? ToolResources { get; set; } /// /// @@ -52,7 +52,7 @@ public sealed partial class CreateMaestroRunsPayload /// /// [global::System.Text.Json.Serialization.JsonPropertyName("requirements")] - public global::System.Collections.Generic.IList? Requirements { get; set; } + public global::System.Collections.Generic.IList? Requirements { get; set; } /// /// @@ -85,12 +85,6 @@ public sealed partial class CreateMaestroRunsPayload [global::System.Text.Json.Serialization.JsonPropertyName("dynamic_planning_enabled")] public bool? DynamicPlanningEnabled { get; set; } - /// - /// Default Value: false - /// - [global::System.Text.Json.Serialization.JsonPropertyName("tools_allowed")] - public bool? ToolsAllowed { get; set; } - /// /// Default Value: maestro_run /// @@ -105,7 +99,7 @@ public sealed partial class CreateMaestroRunsPayload public global::System.Collections.Generic.IList? CustomRetrievalConfigs { get; set; } /// - /// + /// Default Value: unset /// [global::System.Text.Json.Serialization.JsonPropertyName("response_language")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.CreateMaestroRunsPayloadResponseLanguageJsonConverter))] @@ -138,14 +132,13 @@ public sealed partial class CreateMaestroRunsPayload /// /// Default Value: false /// - /// - /// Default Value: false - /// /// /// Default Value: maestro_run /// /// - /// + /// + /// Default Value: unset + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -153,16 +146,15 @@ public CreateMaestroRunsPayload( global::AI21.AnyOf, string> input, object? outputType, global::System.Collections.Generic.IList? models, - global::System.Collections.Generic.IList>? tools, - global::AI21.ToolResources? toolResources, + global::System.Collections.Generic.IList? tools, + global::AI21.ToolResource? toolResources, object? context, - global::System.Collections.Generic.IList? requirements, + global::System.Collections.Generic.IList? requirements, global::AI21.CreateMaestroRunsPayloadBudget? budget, bool? verbose, global::System.Collections.Generic.IList? include, bool? structuredRagEnabled, bool? dynamicPlanningEnabled, - bool? toolsAllowed, global::AI21.MaestroPayloadType? payloadType, global::System.Collections.Generic.IList? customRetrievalConfigs, global::AI21.CreateMaestroRunsPayloadResponseLanguage? responseLanguage) @@ -179,7 +171,6 @@ public CreateMaestroRunsPayload( this.Include = include; this.StructuredRagEnabled = structuredRagEnabled; this.DynamicPlanningEnabled = dynamicPlanningEnabled; - this.ToolsAllowed = toolsAllowed; this.PayloadType = payloadType; this.CustomRetrievalConfigs = customRetrievalConfigs; this.ResponseLanguage = responseLanguage; diff --git a/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadResponseLanguage.g.cs b/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadResponseLanguage.g.cs index 8b31156..f7270b8 100644 --- a/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadResponseLanguage.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadResponseLanguage.g.cs @@ -4,7 +4,7 @@ namespace AI21 { /// - /// + /// Default Value: unset /// public enum CreateMaestroRunsPayloadResponseLanguage { @@ -44,6 +44,10 @@ public enum CreateMaestroRunsPayloadResponseLanguage /// /// Spanish, + /// + /// + /// + Unset, } /// @@ -67,6 +71,7 @@ public static string ToValueString(this CreateMaestroRunsPayloadResponseLanguage CreateMaestroRunsPayloadResponseLanguage.Italian => "italian", CreateMaestroRunsPayloadResponseLanguage.Portuguese => "portuguese", CreateMaestroRunsPayloadResponseLanguage.Spanish => "spanish", + CreateMaestroRunsPayloadResponseLanguage.Unset => "unset", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } @@ -86,6 +91,7 @@ public static string ToValueString(this CreateMaestroRunsPayloadResponseLanguage "italian" => CreateMaestroRunsPayloadResponseLanguage.Italian, "portuguese" => CreateMaestroRunsPayloadResponseLanguage.Portuguese, "spanish" => CreateMaestroRunsPayloadResponseLanguage.Spanish, + "unset" => CreateMaestroRunsPayloadResponseLanguage.Unset, _ => null, }; } diff --git a/src/libs/AI21/Generated/AI21.Models.FileSearchToolResource.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.FileSearchToolResource.Json.g.cs new file mode 100644 index 0000000..6c6c235 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.FileSearchToolResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class FileSearchToolResource + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.FileSearchToolResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.FileSearchToolResource), + jsonSerializerContext) as global::AI21.FileSearchToolResource; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.FileSearchToolResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.FileSearchToolResource), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.FileSearchToolResource; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.FileSearchToolResource.g.cs b/src/libs/AI21/Generated/AI21.Models.FileSearchToolResource.g.cs new file mode 100644 index 0000000..e0be04c --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.FileSearchToolResource.g.cs @@ -0,0 +1,137 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class FileSearchToolResource + { + /// + /// Default Value: file_search + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.FileSearchToolResourceTypeJsonConverter))] + public global::AI21.FileSearchToolResourceType? Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("retrieval_similarity_threshold")] + public double? RetrievalSimilarityThreshold { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels")] + public global::System.Collections.Generic.IList? Labels { get; set; } + + /// + /// Default Value: AND + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels_filter_mode")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.FileSearchToolResourceLabelsFilterModeJsonConverter))] + public global::AI21.FileSearchToolResourceLabelsFilterMode? LabelsFilterMode { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("labels_filter")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.QueryFilterJsonConverter))] + public global::AI21.QueryFilter? LabelsFilter { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("file_ids")] + public global::System.Collections.Generic.IList? FileIds { get; set; } + + /// + /// Default Value: segments + /// + [global::System.Text.Json.Serialization.JsonPropertyName("retrieval_strategy")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.RetrievalStrategyJsonConverter))] + public global::AI21.RetrievalStrategy? RetrievalStrategy { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("max_neighbors")] + public int? MaxNeighbors { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("path")] + public string? Path { get; set; } + + /// + /// Default Value: unset + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_language")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.FileSearchToolResourceResponseLanguageJsonConverter))] + public global::AI21.FileSearchToolResourceResponseLanguage? ResponseLanguage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: file_search + /// + /// + /// + /// + /// Default Value: AND + /// + /// + /// + /// + /// Default Value: segments + /// + /// + /// + /// + /// Default Value: unset + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FileSearchToolResource( + global::AI21.FileSearchToolResourceType? type, + double? retrievalSimilarityThreshold, + global::System.Collections.Generic.IList? labels, + global::AI21.FileSearchToolResourceLabelsFilterMode? labelsFilterMode, + global::AI21.QueryFilter? labelsFilter, + global::System.Collections.Generic.IList? fileIds, + global::AI21.RetrievalStrategy? retrievalStrategy, + int? maxNeighbors, + string? path, + global::AI21.FileSearchToolResourceResponseLanguage? responseLanguage) + { + this.Type = type; + this.RetrievalSimilarityThreshold = retrievalSimilarityThreshold; + this.Labels = labels; + this.LabelsFilterMode = labelsFilterMode; + this.LabelsFilter = labelsFilter; + this.FileIds = fileIds; + this.RetrievalStrategy = retrievalStrategy; + this.MaxNeighbors = maxNeighbors; + this.Path = path; + this.ResponseLanguage = responseLanguage; + } + + /// + /// Initializes a new instance of the class. + /// + public FileSearchToolResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceLabelsFilterMode.g.cs b/src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceLabelsFilterMode.g.cs new file mode 100644 index 0000000..8cb1b13 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceLabelsFilterMode.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// Default Value: AND + /// + public enum FileSearchToolResourceLabelsFilterMode + { + /// + /// + /// + AND, + /// + /// + /// + OR, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FileSearchToolResourceLabelsFilterModeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FileSearchToolResourceLabelsFilterMode value) + { + return value switch + { + FileSearchToolResourceLabelsFilterMode.AND => "AND", + FileSearchToolResourceLabelsFilterMode.OR => "OR", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FileSearchToolResourceLabelsFilterMode? ToEnum(string value) + { + return value switch + { + "AND" => FileSearchToolResourceLabelsFilterMode.AND, + "OR" => FileSearchToolResourceLabelsFilterMode.OR, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceResponseLanguage.g.cs b/src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceResponseLanguage.g.cs new file mode 100644 index 0000000..c80ba26 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceResponseLanguage.g.cs @@ -0,0 +1,99 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// Default Value: unset + /// + public enum FileSearchToolResourceResponseLanguage + { + /// + /// + /// + Arabic, + /// + /// + /// + Dutch, + /// + /// + /// + English, + /// + /// + /// + French, + /// + /// + /// + German, + /// + /// + /// + Hebrew, + /// + /// + /// + Italian, + /// + /// + /// + Portuguese, + /// + /// + /// + Spanish, + /// + /// + /// + Unset, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FileSearchToolResourceResponseLanguageExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FileSearchToolResourceResponseLanguage value) + { + return value switch + { + FileSearchToolResourceResponseLanguage.Arabic => "arabic", + FileSearchToolResourceResponseLanguage.Dutch => "dutch", + FileSearchToolResourceResponseLanguage.English => "english", + FileSearchToolResourceResponseLanguage.French => "french", + FileSearchToolResourceResponseLanguage.German => "german", + FileSearchToolResourceResponseLanguage.Hebrew => "hebrew", + FileSearchToolResourceResponseLanguage.Italian => "italian", + FileSearchToolResourceResponseLanguage.Portuguese => "portuguese", + FileSearchToolResourceResponseLanguage.Spanish => "spanish", + FileSearchToolResourceResponseLanguage.Unset => "unset", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FileSearchToolResourceResponseLanguage? ToEnum(string value) + { + return value switch + { + "arabic" => FileSearchToolResourceResponseLanguage.Arabic, + "dutch" => FileSearchToolResourceResponseLanguage.Dutch, + "english" => FileSearchToolResourceResponseLanguage.English, + "french" => FileSearchToolResourceResponseLanguage.French, + "german" => FileSearchToolResourceResponseLanguage.German, + "hebrew" => FileSearchToolResourceResponseLanguage.Hebrew, + "italian" => FileSearchToolResourceResponseLanguage.Italian, + "portuguese" => FileSearchToolResourceResponseLanguage.Portuguese, + "spanish" => FileSearchToolResourceResponseLanguage.Spanish, + "unset" => FileSearchToolResourceResponseLanguage.Unset, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceType.g.cs b/src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceType.g.cs new file mode 100644 index 0000000..2b7657f --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.FileSearchToolResourceType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// Default Value: file_search + /// + public enum FileSearchToolResourceType + { + /// + /// + /// + FileSearch, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class FileSearchToolResourceTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this FileSearchToolResourceType value) + { + return value switch + { + FileSearchToolResourceType.FileSearch => "file_search", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static FileSearchToolResourceType? ToEnum(string value) + { + return value switch + { + "file_search" => FileSearchToolResourceType.FileSearch, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse.Json.g.cs new file mode 100644 index 0000000..9a731d8 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse), + jsonSerializerContext) as global::AI21.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse.g.cs new file mode 100644 index 0000000..d748e0d --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class GetVectorStoreStudioV1DemosRegulationsVectorStoreVectorStoreIdGetResponse + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolEndpoint.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolEndpoint.Json.g.cs new file mode 100644 index 0000000..da58c9c --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolEndpoint.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class HTTPToolEndpoint + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.HTTPToolEndpoint? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.HTTPToolEndpoint), + jsonSerializerContext) as global::AI21.HTTPToolEndpoint; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.HTTPToolEndpoint? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.HTTPToolEndpoint), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.HTTPToolEndpoint; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolEndpoint.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolEndpoint.g.cs new file mode 100644 index 0000000..658f52c --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolEndpoint.g.cs @@ -0,0 +1,53 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class HTTPToolEndpoint + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Url { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("headers")] + public object? Headers { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public HTTPToolEndpoint( + string url, + object? headers) + { + this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url)); + this.Headers = headers; + } + + /// + /// Initializes a new instance of the class. + /// + public HTTPToolEndpoint() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.ToolResourcesFileSearch.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolEndpointHeaders.Json.g.cs similarity index 87% rename from src/libs/AI21/Generated/AI21.Models.ToolResourcesFileSearch.Json.g.cs rename to src/libs/AI21/Generated/AI21.Models.HTTPToolEndpointHeaders.Json.g.cs index d4966fd..f9f0231 100644 --- a/src/libs/AI21/Generated/AI21.Models.ToolResourcesFileSearch.Json.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolEndpointHeaders.Json.g.cs @@ -2,7 +2,7 @@ namespace AI21 { - public sealed partial class ToolResourcesFileSearch + public sealed partial class HTTPToolEndpointHeaders { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::AI21.ToolResourcesFileSearch? FromJson( + public static global::AI21.HTTPToolEndpointHeaders? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::AI21.ToolResourcesFileSearch), - jsonSerializerContext) as global::AI21.ToolResourcesFileSearch; + typeof(global::AI21.HTTPToolEndpointHeaders), + jsonSerializerContext) as global::AI21.HTTPToolEndpointHeaders; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::AI21.ToolResourcesFileSearch? FromJson( + public static global::AI21.HTTPToolEndpointHeaders? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::AI21.ToolResourcesFileSearch), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ToolResourcesFileSearch; + typeof(global::AI21.HTTPToolEndpointHeaders), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.HTTPToolEndpointHeaders; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/AI21/Generated/AI21.Models.ToolResourcesFileSearch.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolEndpointHeaders.g.cs similarity index 89% rename from src/libs/AI21/Generated/AI21.Models.ToolResourcesFileSearch.g.cs rename to src/libs/AI21/Generated/AI21.Models.HTTPToolEndpointHeaders.g.cs index eeebd45..cd18d60 100644 --- a/src/libs/AI21/Generated/AI21.Models.ToolResourcesFileSearch.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolEndpointHeaders.g.cs @@ -6,7 +6,7 @@ namespace AI21 /// /// /// - public sealed partial class ToolResourcesFileSearch + public sealed partial class HTTPToolEndpointHeaders { /// diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolFunction.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunction.Json.g.cs new file mode 100644 index 0000000..116bfab --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunction.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class HTTPToolFunction + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.HTTPToolFunction? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.HTTPToolFunction), + jsonSerializerContext) as global::AI21.HTTPToolFunction; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.HTTPToolFunction? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.HTTPToolFunction), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.HTTPToolFunction; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolFunction.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunction.g.cs new file mode 100644 index 0000000..d3ec688 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunction.g.cs @@ -0,0 +1,64 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class HTTPToolFunction + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("parameters")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::AI21.HTTPToolFunctionParameters Parameters { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public HTTPToolFunction( + string name, + string description, + global::AI21.HTTPToolFunctionParameters parameters) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.Parameters = parameters ?? throw new global::System.ArgumentNullException(nameof(parameters)); + } + + /// + /// Initializes a new instance of the class. + /// + public HTTPToolFunction() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadTool.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParamProperties.Json.g.cs similarity index 85% rename from src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadTool.Json.g.cs rename to src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParamProperties.Json.g.cs index 9aacfcd..5c1c4de 100644 --- a/src/libs/AI21/Generated/AI21.Models.CreateMaestroRunsPayloadTool.Json.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParamProperties.Json.g.cs @@ -2,7 +2,7 @@ namespace AI21 { - public sealed partial class CreateMaestroRunsPayloadTool + public sealed partial class HTTPToolFunctionParamProperties { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::AI21.CreateMaestroRunsPayloadTool? FromJson( + public static global::AI21.HTTPToolFunctionParamProperties? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::AI21.CreateMaestroRunsPayloadTool), - jsonSerializerContext) as global::AI21.CreateMaestroRunsPayloadTool; + typeof(global::AI21.HTTPToolFunctionParamProperties), + jsonSerializerContext) as global::AI21.HTTPToolFunctionParamProperties; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::AI21.CreateMaestroRunsPayloadTool? FromJson( + public static global::AI21.HTTPToolFunctionParamProperties? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::AI21.CreateMaestroRunsPayloadTool), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.CreateMaestroRunsPayloadTool; + typeof(global::AI21.HTTPToolFunctionParamProperties), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.HTTPToolFunctionParamProperties; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParamProperties.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParamProperties.g.cs new file mode 100644 index 0000000..f09ed05 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParamProperties.g.cs @@ -0,0 +1,54 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class HTTPToolFunctionParamProperties + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public HTTPToolFunctionParamProperties( + string type, + string description) + { + this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + } + + /// + /// Initializes a new instance of the class. + /// + public HTTPToolFunctionParamProperties() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParameters.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParameters.Json.g.cs new file mode 100644 index 0000000..d33dbce --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParameters.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class HTTPToolFunctionParameters + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.HTTPToolFunctionParameters? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.HTTPToolFunctionParameters), + jsonSerializerContext) as global::AI21.HTTPToolFunctionParameters; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.HTTPToolFunctionParameters? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.HTTPToolFunctionParameters), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.HTTPToolFunctionParameters; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParameters.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParameters.g.cs new file mode 100644 index 0000000..137a2da --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParameters.g.cs @@ -0,0 +1,77 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class HTTPToolFunctionParameters + { + /// + /// Default Value: object + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.HTTPToolFunctionParametersTypeJsonConverter))] + public global::AI21.HTTPToolFunctionParametersType? Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("properties")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary Properties { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("required")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Required { get; set; } + + /// + /// Default Value: false + /// + [global::System.Text.Json.Serialization.JsonPropertyName("additionalProperties")] + public bool? AdditionalProperties { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: object + /// + /// + /// + /// + /// Default Value: false + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public HTTPToolFunctionParameters( + global::System.Collections.Generic.Dictionary properties, + global::System.Collections.Generic.IList required, + global::AI21.HTTPToolFunctionParametersType? type, + bool? additionalProperties) + { + this.Properties = properties ?? throw new global::System.ArgumentNullException(nameof(properties)); + this.Required = required ?? throw new global::System.ArgumentNullException(nameof(required)); + this.Type = type; + this.AdditionalProperties = additionalProperties; + } + + /// + /// Initializes a new instance of the class. + /// + public HTTPToolFunctionParameters() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersProperties.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersProperties.Json.g.cs new file mode 100644 index 0000000..b6ce9fd --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersProperties.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class HTTPToolFunctionParametersProperties + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.HTTPToolFunctionParametersProperties? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.HTTPToolFunctionParametersProperties), + jsonSerializerContext) as global::AI21.HTTPToolFunctionParametersProperties; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.HTTPToolFunctionParametersProperties? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.HTTPToolFunctionParametersProperties), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.HTTPToolFunctionParametersProperties; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersProperties.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersProperties.g.cs new file mode 100644 index 0000000..dfcb680 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersProperties.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class HTTPToolFunctionParametersProperties + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersType.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersType.g.cs new file mode 100644 index 0000000..cf61c7a --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolFunctionParametersType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// Default Value: object + /// + public enum HTTPToolFunctionParametersType + { + /// + /// + /// + Object, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class HTTPToolFunctionParametersTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this HTTPToolFunctionParametersType value) + { + return value switch + { + HTTPToolFunctionParametersType.Object => "object", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static HTTPToolFunctionParametersType? ToEnum(string value) + { + return value switch + { + "object" => HTTPToolFunctionParametersType.Object, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolResource.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolResource.Json.g.cs new file mode 100644 index 0000000..638ea2c --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class HTTPToolResource + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.HTTPToolResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.HTTPToolResource), + jsonSerializerContext) as global::AI21.HTTPToolResource; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.HTTPToolResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.HTTPToolResource), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.HTTPToolResource; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolResource.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolResource.g.cs new file mode 100644 index 0000000..ac04d5b --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolResource.g.cs @@ -0,0 +1,66 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class HTTPToolResource + { + /// + /// Default Value: http + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.HTTPToolResourceTypeJsonConverter))] + public global::AI21.HTTPToolResourceType? Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("function")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::AI21.HTTPToolFunction Function { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("endpoint")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::AI21.HTTPToolEndpoint Endpoint { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: http + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public HTTPToolResource( + global::AI21.HTTPToolFunction function, + global::AI21.HTTPToolEndpoint endpoint, + global::AI21.HTTPToolResourceType? type) + { + this.Function = function ?? throw new global::System.ArgumentNullException(nameof(function)); + this.Endpoint = endpoint ?? throw new global::System.ArgumentNullException(nameof(endpoint)); + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public HTTPToolResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.HTTPToolResourceType.g.cs b/src/libs/AI21/Generated/AI21.Models.HTTPToolResourceType.g.cs new file mode 100644 index 0000000..62ed235 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.HTTPToolResourceType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// Default Value: http + /// + public enum HTTPToolResourceType + { + /// + /// + /// + Http, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class HTTPToolResourceTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this HTTPToolResourceType value) + { + return value switch + { + HTTPToolResourceType.Http => "http", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static HTTPToolResourceType? ToEnum(string value) + { + return value switch + { + "http" => HTTPToolResourceType.Http, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesAssistantRequirement.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesAssistantRequirement.Json.g.cs new file mode 100644 index 0000000..f3fee02 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesAssistantRequirement.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class LanguageStudioApiServerDataTypesAssistantRequirement + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.LanguageStudioApiServerDataTypesAssistantRequirement? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.LanguageStudioApiServerDataTypesAssistantRequirement), + jsonSerializerContext) as global::AI21.LanguageStudioApiServerDataTypesAssistantRequirement; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.LanguageStudioApiServerDataTypesAssistantRequirement? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.LanguageStudioApiServerDataTypesAssistantRequirement), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.LanguageStudioApiServerDataTypesAssistantRequirement; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesAssistantRequirement.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesAssistantRequirement.g.cs new file mode 100644 index 0000000..bfa204a --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesAssistantRequirement.g.cs @@ -0,0 +1,76 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class LanguageStudioApiServerDataTypesAssistantRequirement + { + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")] + public string? Id { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("title")] + public string? Title { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + public string? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// A unique ID for the request (not the message). Repeated identical requests
+ /// get different IDs. However, for a streaming response, the ID will be the same
+ /// for all responses in the stream. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LanguageStudioApiServerDataTypesAssistantRequirement( + string? id, + string? title, + string? description, + string? type) + { + this.Id = id; + this.Title = title; + this.Description = description; + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public LanguageStudioApiServerDataTypesAssistantRequirement() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinition.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinition.Json.g.cs new file mode 100644 index 0000000..238da8a --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinition.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class LanguageStudioApiServerDataTypesChatToolDefinition + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.LanguageStudioApiServerDataTypesChatToolDefinition? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.LanguageStudioApiServerDataTypesChatToolDefinition), + jsonSerializerContext) as global::AI21.LanguageStudioApiServerDataTypesChatToolDefinition; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.LanguageStudioApiServerDataTypesChatToolDefinition? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.LanguageStudioApiServerDataTypesChatToolDefinition), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.LanguageStudioApiServerDataTypesChatToolDefinition; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.ToolDefinition.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinition.g.cs similarity index 66% rename from src/libs/AI21/Generated/AI21.Models.ToolDefinition.g.cs rename to src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinition.g.cs index 61d555c..b2a12fa 100644 --- a/src/libs/AI21/Generated/AI21.Models.ToolDefinition.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinition.g.cs @@ -6,14 +6,14 @@ namespace AI21 /// /// /// - public sealed partial class ToolDefinition + public sealed partial class LanguageStudioApiServerDataTypesChatToolDefinition { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.ToolDefinitionTypeJsonConverter))] - public global::AI21.ToolDefinitionType Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.LanguageStudioApiServerDataTypesChatToolDefinitionTypeJsonConverter))] + public global::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionType Type { get; set; } /// /// @@ -29,25 +29,25 @@ public sealed partial class ToolDefinition public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public ToolDefinition( + public LanguageStudioApiServerDataTypesChatToolDefinition( global::AI21.FunctionToolDefinition function, - global::AI21.ToolDefinitionType type) + global::AI21.LanguageStudioApiServerDataTypesChatToolDefinitionType type) { this.Function = function ?? throw new global::System.ArgumentNullException(nameof(function)); this.Type = type; } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ToolDefinition() + public LanguageStudioApiServerDataTypesChatToolDefinition() { } } diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinitionType.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinitionType.g.cs new file mode 100644 index 0000000..f78bf41 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesChatToolDefinitionType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public enum LanguageStudioApiServerDataTypesChatToolDefinitionType + { + /// + /// + /// + Function, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LanguageStudioApiServerDataTypesChatToolDefinitionTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LanguageStudioApiServerDataTypesChatToolDefinitionType value) + { + return value switch + { + LanguageStudioApiServerDataTypesChatToolDefinitionType.Function => "function", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LanguageStudioApiServerDataTypesChatToolDefinitionType? ToEnum(string value) + { + return value switch + { + "function" => LanguageStudioApiServerDataTypesChatToolDefinitionType.Function, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineRequirement.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineRequirement.Json.g.cs new file mode 100644 index 0000000..d8056d7 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineRequirement.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class LanguageStudioApiServerDataTypesExecutionEngineRequirement + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.LanguageStudioApiServerDataTypesExecutionEngineRequirement? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.LanguageStudioApiServerDataTypesExecutionEngineRequirement), + jsonSerializerContext) as global::AI21.LanguageStudioApiServerDataTypesExecutionEngineRequirement; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.LanguageStudioApiServerDataTypesExecutionEngineRequirement? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.LanguageStudioApiServerDataTypesExecutionEngineRequirement), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.LanguageStudioApiServerDataTypesExecutionEngineRequirement; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.Requirement.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineRequirement.g.cs similarity index 79% rename from src/libs/AI21/Generated/AI21.Models.Requirement.g.cs rename to src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineRequirement.g.cs index dbe5c25..3ee0277 100644 --- a/src/libs/AI21/Generated/AI21.Models.Requirement.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineRequirement.g.cs @@ -6,7 +6,7 @@ namespace AI21 /// /// /// - public sealed partial class Requirement + public sealed partial class LanguageStudioApiServerDataTypesExecutionEngineRequirement { /// /// @@ -35,7 +35,7 @@ public sealed partial class Requirement public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// @@ -43,7 +43,7 @@ public sealed partial class Requirement #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public Requirement( + public LanguageStudioApiServerDataTypesExecutionEngineRequirement( string name, string description, bool? isMandatory) @@ -54,9 +54,9 @@ public Requirement( } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public Requirement() + public LanguageStudioApiServerDataTypesExecutionEngineRequirement() { } } diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.Json.g.cs new file mode 100644 index 0000000..a7cbcca --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public readonly partial struct LanguageStudioApiServerDataTypesExecutionEngineToolDefinition + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition), + jsonSerializerContext) as global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.g.cs new file mode 100644 index 0000000..c72544e --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinition.g.cs @@ -0,0 +1,334 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public readonly partial struct LanguageStudioApiServerDataTypesExecutionEngineToolDefinition : global::System.IEquatable + { + /// + /// + /// + public global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType? Type { get; } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::AI21.HTTPToolResource? Http { get; init; } +#else + public global::AI21.HTTPToolResource? Http { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Http))] +#endif + public bool IsHttp => Http != null; + + /// + /// + /// + public static implicit operator LanguageStudioApiServerDataTypesExecutionEngineToolDefinition(global::AI21.HTTPToolResource value) => new LanguageStudioApiServerDataTypesExecutionEngineToolDefinition((global::AI21.HTTPToolResource?)value); + + /// + /// + /// + public static implicit operator global::AI21.HTTPToolResource?(LanguageStudioApiServerDataTypesExecutionEngineToolDefinition @this) => @this.Http; + + /// + /// + /// + public LanguageStudioApiServerDataTypesExecutionEngineToolDefinition(global::AI21.HTTPToolResource? value) + { + Http = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::AI21.MCPToolResource? Mcp { get; init; } +#else + public global::AI21.MCPToolResource? Mcp { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Mcp))] +#endif + public bool IsMcp => Mcp != null; + + /// + /// + /// + public static implicit operator LanguageStudioApiServerDataTypesExecutionEngineToolDefinition(global::AI21.MCPToolResource value) => new LanguageStudioApiServerDataTypesExecutionEngineToolDefinition((global::AI21.MCPToolResource?)value); + + /// + /// + /// + public static implicit operator global::AI21.MCPToolResource?(LanguageStudioApiServerDataTypesExecutionEngineToolDefinition @this) => @this.Mcp; + + /// + /// + /// + public LanguageStudioApiServerDataTypesExecutionEngineToolDefinition(global::AI21.MCPToolResource? value) + { + Mcp = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::AI21.FileSearchToolResource? FileSearch { get; init; } +#else + public global::AI21.FileSearchToolResource? FileSearch { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(FileSearch))] +#endif + public bool IsFileSearch => FileSearch != null; + + /// + /// + /// + public static implicit operator LanguageStudioApiServerDataTypesExecutionEngineToolDefinition(global::AI21.FileSearchToolResource value) => new LanguageStudioApiServerDataTypesExecutionEngineToolDefinition((global::AI21.FileSearchToolResource?)value); + + /// + /// + /// + public static implicit operator global::AI21.FileSearchToolResource?(LanguageStudioApiServerDataTypesExecutionEngineToolDefinition @this) => @this.FileSearch; + + /// + /// + /// + public LanguageStudioApiServerDataTypesExecutionEngineToolDefinition(global::AI21.FileSearchToolResource? value) + { + FileSearch = value; + } + + /// + /// + /// +#if NET6_0_OR_GREATER + public global::AI21.WebSearchToolResource? WebSearch { get; init; } +#else + public global::AI21.WebSearchToolResource? WebSearch { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(WebSearch))] +#endif + public bool IsWebSearch => WebSearch != null; + + /// + /// + /// + public static implicit operator LanguageStudioApiServerDataTypesExecutionEngineToolDefinition(global::AI21.WebSearchToolResource value) => new LanguageStudioApiServerDataTypesExecutionEngineToolDefinition((global::AI21.WebSearchToolResource?)value); + + /// + /// + /// + public static implicit operator global::AI21.WebSearchToolResource?(LanguageStudioApiServerDataTypesExecutionEngineToolDefinition @this) => @this.WebSearch; + + /// + /// + /// + public LanguageStudioApiServerDataTypesExecutionEngineToolDefinition(global::AI21.WebSearchToolResource? value) + { + WebSearch = value; + } + + /// + /// + /// + public LanguageStudioApiServerDataTypesExecutionEngineToolDefinition( + global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType? type, + global::AI21.HTTPToolResource? http, + global::AI21.MCPToolResource? mcp, + global::AI21.FileSearchToolResource? fileSearch, + global::AI21.WebSearchToolResource? webSearch + ) + { + Type = type; + + Http = http; + Mcp = mcp; + FileSearch = fileSearch; + WebSearch = webSearch; + } + + /// + /// + /// + public object? Object => + WebSearch as object ?? + FileSearch as object ?? + Mcp as object ?? + Http as object + ; + + /// + /// + /// + public override string? ToString() => + Http?.ToString() ?? + Mcp?.ToString() ?? + FileSearch?.ToString() ?? + WebSearch?.ToString() + ; + + /// + /// + /// + public bool Validate() + { + return IsHttp && !IsMcp && !IsFileSearch && !IsWebSearch || !IsHttp && IsMcp && !IsFileSearch && !IsWebSearch || !IsHttp && !IsMcp && IsFileSearch && !IsWebSearch || !IsHttp && !IsMcp && !IsFileSearch && IsWebSearch; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? http = null, + global::System.Func? mcp = null, + global::System.Func? fileSearch = null, + global::System.Func? webSearch = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsHttp && http != null) + { + return http(Http!); + } + else if (IsMcp && mcp != null) + { + return mcp(Mcp!); + } + else if (IsFileSearch && fileSearch != null) + { + return fileSearch(FileSearch!); + } + else if (IsWebSearch && webSearch != null) + { + return webSearch(WebSearch!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? http = null, + global::System.Action? mcp = null, + global::System.Action? fileSearch = null, + global::System.Action? webSearch = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsHttp) + { + http?.Invoke(Http!); + } + else if (IsMcp) + { + mcp?.Invoke(Mcp!); + } + else if (IsFileSearch) + { + fileSearch?.Invoke(FileSearch!); + } + else if (IsWebSearch) + { + webSearch?.Invoke(WebSearch!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + Http, + typeof(global::AI21.HTTPToolResource), + Mcp, + typeof(global::AI21.MCPToolResource), + FileSearch, + typeof(global::AI21.FileSearchToolResource), + WebSearch, + typeof(global::AI21.WebSearchToolResource), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(LanguageStudioApiServerDataTypesExecutionEngineToolDefinition other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(Http, other.Http) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(Mcp, other.Mcp) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(FileSearch, other.FileSearch) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(WebSearch, other.WebSearch) + ; + } + + /// + /// + /// + public static bool operator ==(LanguageStudioApiServerDataTypesExecutionEngineToolDefinition obj1, LanguageStudioApiServerDataTypesExecutionEngineToolDefinition obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(LanguageStudioApiServerDataTypesExecutionEngineToolDefinition obj1, LanguageStudioApiServerDataTypesExecutionEngineToolDefinition obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is LanguageStudioApiServerDataTypesExecutionEngineToolDefinition o && Equals(o); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator.Json.g.cs new file mode 100644 index 0000000..c86cc10 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator), + jsonSerializerContext) as global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator.g.cs new file mode 100644 index 0000000..f8fdb45 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator.g.cs @@ -0,0 +1,44 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeJsonConverter))] + public global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType? Type { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator( + global::AI21.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType? type) + { + this.Type = type; + } + + /// + /// Initializes a new instance of the class. + /// + public LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.g.cs b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.g.cs new file mode 100644 index 0000000..7ac5250 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public enum LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType + { + /// + /// + /// + Http, + /// + /// + /// + Mcp, + /// + /// + /// + FileSearch, + /// + /// + /// + WebSearch, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType value) + { + return value switch + { + LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.Http => "http", + LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.Mcp => "mcp", + LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.FileSearch => "file_search", + LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.WebSearch => "web_search", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType? ToEnum(string value) + { + return value switch + { + "http" => LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.Http, + "mcp" => LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.Mcp, + "file_search" => LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.FileSearch, + "web_search" => LanguageStudioApiServerDataTypesExecutionEngineToolDefinitionDiscriminatorType.WebSearch, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.ToolDefinition.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPDefinition.Json.g.cs similarity index 88% rename from src/libs/AI21/Generated/AI21.Models.ToolDefinition.Json.g.cs rename to src/libs/AI21/Generated/AI21.Models.MCPDefinition.Json.g.cs index 0492984..3500963 100644 --- a/src/libs/AI21/Generated/AI21.Models.ToolDefinition.Json.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.MCPDefinition.Json.g.cs @@ -2,7 +2,7 @@ namespace AI21 { - public sealed partial class ToolDefinition + public sealed partial class MCPDefinition { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::AI21.ToolDefinition? FromJson( + public static global::AI21.MCPDefinition? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::AI21.ToolDefinition), - jsonSerializerContext) as global::AI21.ToolDefinition; + typeof(global::AI21.MCPDefinition), + jsonSerializerContext) as global::AI21.MCPDefinition; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::AI21.ToolDefinition? FromJson( + public static global::AI21.MCPDefinition? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::AI21.ToolDefinition), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ToolDefinition; + typeof(global::AI21.MCPDefinition), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.MCPDefinition; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/AI21/Generated/AI21.Models.MCPDefinition.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPDefinition.g.cs new file mode 100644 index 0000000..b59b38f --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.MCPDefinition.g.cs @@ -0,0 +1,62 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class MCPDefinition + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("server_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ServerUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("server_label")] + public string? ServerLabel { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("headers")] + public object? Headers { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MCPDefinition( + string serverUrl, + string? serverLabel, + object? headers) + { + this.ServerUrl = serverUrl ?? throw new global::System.ArgumentNullException(nameof(serverUrl)); + this.ServerLabel = serverLabel; + this.Headers = headers; + } + + /// + /// Initializes a new instance of the class. + /// + public MCPDefinition() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.MCPDefinitionHeaders.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPDefinitionHeaders.Json.g.cs new file mode 100644 index 0000000..a5f16de --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.MCPDefinitionHeaders.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class MCPDefinitionHeaders + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.MCPDefinitionHeaders? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.MCPDefinitionHeaders), + jsonSerializerContext) as global::AI21.MCPDefinitionHeaders; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.MCPDefinitionHeaders? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.MCPDefinitionHeaders), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.MCPDefinitionHeaders; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.ToolResourcesWebSearch.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPDefinitionHeaders.g.cs similarity index 89% rename from src/libs/AI21/Generated/AI21.Models.ToolResourcesWebSearch.g.cs rename to src/libs/AI21/Generated/AI21.Models.MCPDefinitionHeaders.g.cs index f26209f..88817a4 100644 --- a/src/libs/AI21/Generated/AI21.Models.ToolResourcesWebSearch.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.MCPDefinitionHeaders.g.cs @@ -6,7 +6,7 @@ namespace AI21 /// /// /// - public sealed partial class ToolResourcesWebSearch + public sealed partial class MCPDefinitionHeaders { /// diff --git a/src/libs/AI21/Generated/AI21.Models.MCPDiscoveryResponse.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPDiscoveryResponse.Json.g.cs new file mode 100644 index 0000000..b812890 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.MCPDiscoveryResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class MCPDiscoveryResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.MCPDiscoveryResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.MCPDiscoveryResponse), + jsonSerializerContext) as global::AI21.MCPDiscoveryResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.MCPDiscoveryResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.MCPDiscoveryResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.MCPDiscoveryResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.MCPDiscoveryResponse.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPDiscoveryResponse.g.cs new file mode 100644 index 0000000..a8a6ba2 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.MCPDiscoveryResponse.g.cs @@ -0,0 +1,54 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class MCPDiscoveryResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("mcp_definition")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::AI21.MCPDefinition McpDefinition { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Tools { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MCPDiscoveryResponse( + global::AI21.MCPDefinition mcpDefinition, + global::System.Collections.Generic.IList tools) + { + this.McpDefinition = mcpDefinition ?? throw new global::System.ArgumentNullException(nameof(mcpDefinition)); + this.Tools = tools ?? throw new global::System.ArgumentNullException(nameof(tools)); + } + + /// + /// Initializes a new instance of the class. + /// + public MCPDiscoveryResponse() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.Requirement.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPTool.Json.g.cs similarity index 89% rename from src/libs/AI21/Generated/AI21.Models.Requirement.Json.g.cs rename to src/libs/AI21/Generated/AI21.Models.MCPTool.Json.g.cs index ba0dfa9..d7cf1ef 100644 --- a/src/libs/AI21/Generated/AI21.Models.Requirement.Json.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.MCPTool.Json.g.cs @@ -2,7 +2,7 @@ namespace AI21 { - public sealed partial class Requirement + public sealed partial class MCPTool { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::AI21.Requirement? FromJson( + public static global::AI21.MCPTool? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::AI21.Requirement), - jsonSerializerContext) as global::AI21.Requirement; + typeof(global::AI21.MCPTool), + jsonSerializerContext) as global::AI21.MCPTool; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::AI21.Requirement? FromJson( + public static global::AI21.MCPTool? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::AI21.Requirement), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.Requirement; + typeof(global::AI21.MCPTool), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.MCPTool; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/AI21/Generated/AI21.Models.MCPTool.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPTool.g.cs new file mode 100644 index 0000000..5a84859 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.MCPTool.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class MCPTool + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("inputSchema")] + [global::System.Text.Json.Serialization.JsonRequired] + public required object InputSchema { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MCPTool( + string name, + object inputSchema, + string? description) + { + this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name)); + this.InputSchema = inputSchema ?? throw new global::System.ArgumentNullException(nameof(inputSchema)); + this.Description = description; + } + + /// + /// Initializes a new instance of the class. + /// + public MCPTool() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.MCPToolInputSchema.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPToolInputSchema.Json.g.cs new file mode 100644 index 0000000..f7d6bbd --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.MCPToolInputSchema.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class MCPToolInputSchema + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.MCPToolInputSchema? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.MCPToolInputSchema), + jsonSerializerContext) as global::AI21.MCPToolInputSchema; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.MCPToolInputSchema? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.MCPToolInputSchema), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.MCPToolInputSchema; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.MCPToolInputSchema.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPToolInputSchema.g.cs new file mode 100644 index 0000000..7b3813e --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.MCPToolInputSchema.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class MCPToolInputSchema + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.MCPToolResource.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPToolResource.Json.g.cs new file mode 100644 index 0000000..1471fb1 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.MCPToolResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class MCPToolResource + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.MCPToolResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.MCPToolResource), + jsonSerializerContext) as global::AI21.MCPToolResource; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.MCPToolResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.MCPToolResource), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.MCPToolResource; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.MCPToolResource.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPToolResource.g.cs new file mode 100644 index 0000000..9eb3bba --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.MCPToolResource.g.cs @@ -0,0 +1,84 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class MCPToolResource + { + /// + /// Default Value: mcp + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.MCPToolResourceTypeJsonConverter))] + public global::AI21.MCPToolResourceType? Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("server_label")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ServerLabel { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("server_url")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ServerUrl { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("headers")] + public object? Headers { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("allowed_tools")] + public global::System.Collections.Generic.IList? AllowedTools { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: mcp + /// + /// + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public MCPToolResource( + string serverLabel, + string serverUrl, + global::AI21.MCPToolResourceType? type, + object? headers, + global::System.Collections.Generic.IList? allowedTools) + { + this.ServerLabel = serverLabel ?? throw new global::System.ArgumentNullException(nameof(serverLabel)); + this.ServerUrl = serverUrl ?? throw new global::System.ArgumentNullException(nameof(serverUrl)); + this.Type = type; + this.Headers = headers; + this.AllowedTools = allowedTools; + } + + /// + /// Initializes a new instance of the class. + /// + public MCPToolResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.MCPToolResourceHeaders.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPToolResourceHeaders.Json.g.cs new file mode 100644 index 0000000..f074e49 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.MCPToolResourceHeaders.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class MCPToolResourceHeaders + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.MCPToolResourceHeaders? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.MCPToolResourceHeaders), + jsonSerializerContext) as global::AI21.MCPToolResourceHeaders; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.MCPToolResourceHeaders? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.MCPToolResourceHeaders), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.MCPToolResourceHeaders; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.MCPToolResourceHeaders.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPToolResourceHeaders.g.cs new file mode 100644 index 0000000..e405423 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.MCPToolResourceHeaders.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class MCPToolResourceHeaders + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.ToolDefinitionType.g.cs b/src/libs/AI21/Generated/AI21.Models.MCPToolResourceType.g.cs similarity index 66% rename from src/libs/AI21/Generated/AI21.Models.ToolDefinitionType.g.cs rename to src/libs/AI21/Generated/AI21.Models.MCPToolResourceType.g.cs index 05d7bb6..55eff64 100644 --- a/src/libs/AI21/Generated/AI21.Models.ToolDefinitionType.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.MCPToolResourceType.g.cs @@ -4,40 +4,40 @@ namespace AI21 { /// - /// + /// Default Value: mcp /// - public enum ToolDefinitionType + public enum MCPToolResourceType { /// /// /// - Function, + Mcp, } /// /// Enum extensions to do fast conversions without the reflection. /// - public static class ToolDefinitionTypeExtensions + public static class MCPToolResourceTypeExtensions { /// /// Converts an enum to a string. /// - public static string ToValueString(this ToolDefinitionType value) + public static string ToValueString(this MCPToolResourceType value) { return value switch { - ToolDefinitionType.Function => "function", + MCPToolResourceType.Mcp => "mcp", _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), }; } /// /// Converts an string to a enum. /// - public static ToolDefinitionType? ToEnum(string value) + public static MCPToolResourceType? ToEnum(string value) { return value switch { - "function" => ToolDefinitionType.Function, + "mcp" => MCPToolResourceType.Mcp, _ => null, }; } diff --git a/src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequest.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequest.Json.g.cs new file mode 100644 index 0000000..dfb529c --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class ModifyAssistantRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.ModifyAssistantRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.ModifyAssistantRequest), + jsonSerializerContext) as global::AI21.ModifyAssistantRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.ModifyAssistantRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.ModifyAssistantRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ModifyAssistantRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequest.g.cs new file mode 100644 index 0000000..b17874f --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequest.g.cs @@ -0,0 +1,144 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class ModifyAssistantRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("name")] + public string? Name { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + public string? Description { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("optimization")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.RunOptimizationJsonConverter))] + public global::AI21.RunOptimization? Optimization { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("avatar")] + public string? Avatar { get; set; } + + /// + /// Default Value: false + /// + [global::System.Text.Json.Serialization.JsonPropertyName("is_archived")] + public bool? IsArchived { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("models")] + public global::System.Collections.Generic.IList? Models { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tools")] + public global::System.Collections.Generic.IList>? Tools { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("tool_resources")] + public global::AI21.AssistantToolResource? ToolResources { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("requirements")] + public global::System.Collections.Generic.IList? Requirements { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("budget")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.BudgetLevelJsonConverter))] + public global::AI21.BudgetLevel? Budget { get; set; } + + /// + /// An enumeration. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("visibility")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.VisibilityJsonConverter))] + public global::AI21.Visibility? Visibility { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// An enumeration. + /// + /// + /// + /// Default Value: false + /// + /// + /// + /// + /// + /// + /// An enumeration. + /// + /// + /// An enumeration. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ModifyAssistantRequest( + string? name, + string? description, + global::AI21.RunOptimization? optimization, + string? avatar, + bool? isArchived, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList>? tools, + global::AI21.AssistantToolResource? toolResources, + global::System.Collections.Generic.IList? requirements, + global::AI21.BudgetLevel? budget, + global::AI21.Visibility? visibility) + { + this.Name = name; + this.Description = description; + this.Optimization = optimization; + this.Avatar = avatar; + this.IsArchived = isArchived; + this.Models = models; + this.Tools = tools; + this.ToolResources = toolResources; + this.Requirements = requirements; + this.Budget = budget; + this.Visibility = visibility; + } + + /// + /// Initializes a new instance of the class. + /// + public ModifyAssistantRequest() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequestTool.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequestTool.Json.g.cs new file mode 100644 index 0000000..31cf24e --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequestTool.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class ModifyAssistantRequestTool + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.ModifyAssistantRequestTool? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.ModifyAssistantRequestTool), + jsonSerializerContext) as global::AI21.ModifyAssistantRequestTool; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.ModifyAssistantRequestTool? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.ModifyAssistantRequestTool), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ModifyAssistantRequestTool; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequestTool.g.cs b/src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequestTool.g.cs new file mode 100644 index 0000000..2a3454c --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.ModifyAssistantRequestTool.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class ModifyAssistantRequestTool + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.RunAssistantRequest.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.RunAssistantRequest.Json.g.cs new file mode 100644 index 0000000..2088535 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.RunAssistantRequest.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class RunAssistantRequest + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.RunAssistantRequest? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.RunAssistantRequest), + jsonSerializerContext) as global::AI21.RunAssistantRequest; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.RunAssistantRequest? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.RunAssistantRequest), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.RunAssistantRequest; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.RunAssistantRequest.g.cs b/src/libs/AI21/Generated/AI21.Models.RunAssistantRequest.g.cs new file mode 100644 index 0000000..fa416c0 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.RunAssistantRequest.g.cs @@ -0,0 +1,109 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class RunAssistantRequest + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Input { get; set; } + + /// + /// Default Value: false + /// + [global::System.Text.Json.Serialization.JsonPropertyName("verbose")] + public bool? Verbose { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_type")] + public object? OutputType { get; set; } + + /// + /// Default Value: [data_sources, requirements_result, requirements_result.metadata] + /// + [global::System.Text.Json.Serialization.JsonPropertyName("include")] + public global::System.Collections.Generic.IList? Include { get; set; } + + /// + /// Default Value: false + /// + [global::System.Text.Json.Serialization.JsonPropertyName("structured_rag_enabled")] + public bool? StructuredRagEnabled { get; set; } + + /// + /// Default Value: false + /// + [global::System.Text.Json.Serialization.JsonPropertyName("dynamic_planning_enabled")] + public bool? DynamicPlanningEnabled { get; set; } + + /// + /// Default Value: unset + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_language")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.RunAssistantRequestResponseLanguageJsonConverter))] + public global::AI21.RunAssistantRequestResponseLanguage? ResponseLanguage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// Default Value: false + /// + /// + /// + /// Default Value: [data_sources, requirements_result, requirements_result.metadata] + /// + /// + /// Default Value: false + /// + /// + /// Default Value: false + /// + /// + /// Default Value: unset + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RunAssistantRequest( + global::System.Collections.Generic.IList input, + bool? verbose, + object? outputType, + global::System.Collections.Generic.IList? include, + bool? structuredRagEnabled, + bool? dynamicPlanningEnabled, + global::AI21.RunAssistantRequestResponseLanguage? responseLanguage) + { + this.Input = input ?? throw new global::System.ArgumentNullException(nameof(input)); + this.Verbose = verbose; + this.OutputType = outputType; + this.Include = include; + this.StructuredRagEnabled = structuredRagEnabled; + this.DynamicPlanningEnabled = dynamicPlanningEnabled; + this.ResponseLanguage = responseLanguage; + } + + /// + /// Initializes a new instance of the class. + /// + public RunAssistantRequest() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.RunAssistantRequestOutputType.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.RunAssistantRequestOutputType.Json.g.cs new file mode 100644 index 0000000..b53ab19 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.RunAssistantRequestOutputType.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class RunAssistantRequestOutputType + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.RunAssistantRequestOutputType? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.RunAssistantRequestOutputType), + jsonSerializerContext) as global::AI21.RunAssistantRequestOutputType; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.RunAssistantRequestOutputType? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.RunAssistantRequestOutputType), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.RunAssistantRequestOutputType; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.RunAssistantRequestOutputType.g.cs b/src/libs/AI21/Generated/AI21.Models.RunAssistantRequestOutputType.g.cs new file mode 100644 index 0000000..daf4d4c --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.RunAssistantRequestOutputType.g.cs @@ -0,0 +1,18 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class RunAssistantRequestOutputType + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.RunAssistantRequestResponseLanguage.g.cs b/src/libs/AI21/Generated/AI21.Models.RunAssistantRequestResponseLanguage.g.cs new file mode 100644 index 0000000..b2bfe68 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.RunAssistantRequestResponseLanguage.g.cs @@ -0,0 +1,99 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// Default Value: unset + /// + public enum RunAssistantRequestResponseLanguage + { + /// + /// + /// + Arabic, + /// + /// + /// + Dutch, + /// + /// + /// + English, + /// + /// + /// + French, + /// + /// + /// + German, + /// + /// + /// + Hebrew, + /// + /// + /// + Italian, + /// + /// + /// + Portuguese, + /// + /// + /// + Spanish, + /// + /// + /// + Unset, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RunAssistantRequestResponseLanguageExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RunAssistantRequestResponseLanguage value) + { + return value switch + { + RunAssistantRequestResponseLanguage.Arabic => "arabic", + RunAssistantRequestResponseLanguage.Dutch => "dutch", + RunAssistantRequestResponseLanguage.English => "english", + RunAssistantRequestResponseLanguage.French => "french", + RunAssistantRequestResponseLanguage.German => "german", + RunAssistantRequestResponseLanguage.Hebrew => "hebrew", + RunAssistantRequestResponseLanguage.Italian => "italian", + RunAssistantRequestResponseLanguage.Portuguese => "portuguese", + RunAssistantRequestResponseLanguage.Spanish => "spanish", + RunAssistantRequestResponseLanguage.Unset => "unset", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RunAssistantRequestResponseLanguage? ToEnum(string value) + { + return value switch + { + "arabic" => RunAssistantRequestResponseLanguage.Arabic, + "dutch" => RunAssistantRequestResponseLanguage.Dutch, + "english" => RunAssistantRequestResponseLanguage.English, + "french" => RunAssistantRequestResponseLanguage.French, + "german" => RunAssistantRequestResponseLanguage.German, + "hebrew" => RunAssistantRequestResponseLanguage.Hebrew, + "italian" => RunAssistantRequestResponseLanguage.Italian, + "portuguese" => RunAssistantRequestResponseLanguage.Portuguese, + "spanish" => RunAssistantRequestResponseLanguage.Spanish, + "unset" => RunAssistantRequestResponseLanguage.Unset, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.RunOptimization.g.cs b/src/libs/AI21/Generated/AI21.Models.RunOptimization.g.cs new file mode 100644 index 0000000..dda5994 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.RunOptimization.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// An enumeration. + /// + public enum RunOptimization + { + /// + /// + /// + Cost, + /// + /// + /// + Latency, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RunOptimizationExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RunOptimization value) + { + return value switch + { + RunOptimization.Cost => "cost", + RunOptimization.Latency => "latency", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RunOptimization? ToEnum(string value) + { + return value switch + { + "cost" => RunOptimization.Cost, + "latency" => RunOptimization.Latency, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.ToolResources.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.ToolResource.Json.g.cs similarity index 90% rename from src/libs/AI21/Generated/AI21.Models.ToolResources.Json.g.cs rename to src/libs/AI21/Generated/AI21.Models.ToolResource.Json.g.cs index afc797e..1b0103b 100644 --- a/src/libs/AI21/Generated/AI21.Models.ToolResources.Json.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.ToolResource.Json.g.cs @@ -2,7 +2,7 @@ namespace AI21 { - public sealed partial class ToolResources + public sealed partial class ToolResource { /// /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. @@ -34,14 +34,14 @@ public string ToJson( /// /// Deserializes a JSON string using the provided JsonSerializerContext. /// - public static global::AI21.ToolResources? FromJson( + public static global::AI21.ToolResource? FromJson( string json, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return global::System.Text.Json.JsonSerializer.Deserialize( json, - typeof(global::AI21.ToolResources), - jsonSerializerContext) as global::AI21.ToolResources; + typeof(global::AI21.ToolResource), + jsonSerializerContext) as global::AI21.ToolResource; } /// @@ -51,11 +51,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::AI21.ToolResources? FromJson( + public static global::AI21.ToolResource? FromJson( string json, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.Deserialize( + return global::System.Text.Json.JsonSerializer.Deserialize( json, jsonSerializerOptions); } @@ -63,14 +63,14 @@ public string ToJson( /// /// Deserializes a JSON stream using the provided JsonSerializerContext. /// - public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) { return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, - typeof(global::AI21.ToolResources), - jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ToolResources; + typeof(global::AI21.ToolResource), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.ToolResource; } /// @@ -80,11 +80,11 @@ public string ToJson( [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] #endif - public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( global::System.IO.Stream jsonStream, global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) { - return global::System.Text.Json.JsonSerializer.DeserializeAsync( + return global::System.Text.Json.JsonSerializer.DeserializeAsync( jsonStream, jsonSerializerOptions); } diff --git a/src/libs/AI21/Generated/AI21.Models.ToolResources.g.cs b/src/libs/AI21/Generated/AI21.Models.ToolResource.g.cs similarity index 75% rename from src/libs/AI21/Generated/AI21.Models.ToolResources.g.cs rename to src/libs/AI21/Generated/AI21.Models.ToolResource.g.cs index 13af582..55c88e1 100644 --- a/src/libs/AI21/Generated/AI21.Models.ToolResources.g.cs +++ b/src/libs/AI21/Generated/AI21.Models.ToolResource.g.cs @@ -6,19 +6,19 @@ namespace AI21 /// /// /// - public sealed partial class ToolResources + public sealed partial class ToolResource { /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("file_search")] - public object? FileSearch { get; set; } + public global::AI21.FileSearchToolResource? FileSearch { get; set; } /// /// /// [global::System.Text.Json.Serialization.JsonPropertyName("web_search")] - public object? WebSearch { get; set; } + public global::AI21.WebSearchToolResource? WebSearch { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -27,25 +27,25 @@ public sealed partial class ToolResources public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif - public ToolResources( - object? fileSearch, - object? webSearch) + public ToolResource( + global::AI21.FileSearchToolResource? fileSearch, + global::AI21.WebSearchToolResource? webSearch) { this.FileSearch = fileSearch; this.WebSearch = webSearch; } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - public ToolResources() + public ToolResource() { } } diff --git a/src/libs/AI21/Generated/AI21.Models.Visibility.g.cs b/src/libs/AI21/Generated/AI21.Models.Visibility.g.cs new file mode 100644 index 0000000..89eeb66 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.Visibility.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// An enumeration. + /// + public enum Visibility + { + /// + /// + /// + Public, + /// + /// + /// + Private, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class VisibilityExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this Visibility value) + { + return value switch + { + Visibility.Public => "public", + Visibility.Private => "private", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static Visibility? ToEnum(string value) + { + return value switch + { + "public" => Visibility.Public, + "private" => Visibility.Private, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.WebSearchToolResource.Json.g.cs b/src/libs/AI21/Generated/AI21.Models.WebSearchToolResource.Json.g.cs new file mode 100644 index 0000000..b93e4b0 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.WebSearchToolResource.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace AI21 +{ + public sealed partial class WebSearchToolResource + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::AI21.WebSearchToolResource? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::AI21.WebSearchToolResource), + jsonSerializerContext) as global::AI21.WebSearchToolResource; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::AI21.WebSearchToolResource? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::AI21.WebSearchToolResource), + jsonSerializerContext).ConfigureAwait(false)) as global::AI21.WebSearchToolResource; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/AI21/Generated/AI21.Models.WebSearchToolResource.g.cs b/src/libs/AI21/Generated/AI21.Models.WebSearchToolResource.g.cs new file mode 100644 index 0000000..34710ce --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.WebSearchToolResource.g.cs @@ -0,0 +1,64 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// + /// + public sealed partial class WebSearchToolResource + { + /// + /// Default Value: web_search + /// + [global::System.Text.Json.Serialization.JsonPropertyName("type")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::AI21.JsonConverters.WebSearchToolResourceTypeJsonConverter))] + public global::AI21.WebSearchToolResourceType? Type { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("urls")] + public global::System.Collections.Generic.IList? Urls { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("fallback_to_web")] + public bool? FallbackToWeb { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Default Value: web_search + /// + /// + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public WebSearchToolResource( + global::AI21.WebSearchToolResourceType? type, + global::System.Collections.Generic.IList? urls, + bool? fallbackToWeb) + { + this.Type = type; + this.Urls = urls; + this.FallbackToWeb = fallbackToWeb; + } + + /// + /// Initializes a new instance of the class. + /// + public WebSearchToolResource() + { + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/Generated/AI21.Models.WebSearchToolResourceType.g.cs b/src/libs/AI21/Generated/AI21.Models.WebSearchToolResourceType.g.cs new file mode 100644 index 0000000..fcb97c6 --- /dev/null +++ b/src/libs/AI21/Generated/AI21.Models.WebSearchToolResourceType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace AI21 +{ + /// + /// Default Value: web_search + /// + public enum WebSearchToolResourceType + { + /// + /// + /// + WebSearch, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class WebSearchToolResourceTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this WebSearchToolResourceType value) + { + return value switch + { + WebSearchToolResourceType.WebSearch => "web_search", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static WebSearchToolResourceType? ToEnum(string value) + { + return value switch + { + "web_search" => WebSearchToolResourceType.WebSearch, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/AI21/openapi.yaml b/src/libs/AI21/openapi.yaml index 2dd0c74..ae8bc4c 100644 --- a/src/libs/AI21/openapi.yaml +++ b/src/libs/AI21/openapi.yaml @@ -1015,6 +1015,32 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/demos/regulations/vector-store/{vector_store_id}': + get: + summary: Get Vector Store + description: Get a vector store by ID. + operationId: get_vector_store_studio_v1_demos_regulations_vector_store__vector_store_id__get + parameters: + - name: vector_store_id + in: path + required: true + schema: + title: Vector Store Id + type: string + responses: + '200': + description: Successful Response + content: + application/json: + schema: + title: Response Get Vector Store Studio V1 Demos Regulations Vector Store Vector Store Id Get + type: object + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' /studio/v1/demos/rfi/generate-response-pdf: post: summary: Combine section answers ➜ styled PDF for download @@ -1491,6 +1517,28 @@ paths: application/json: schema: $ref: '#/components/schemas/ListAssistantsResponse' + post: + summary: Create Assistant + operationId: v1_create_assistant + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAssistantRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/Assistant' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' '/studio/v1/assistants/{assistant_id}': get: summary: Get Assistant @@ -1538,6 +1586,65 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' + patch: + summary: Modify Assistant + operationId: v1_modify_assistant + parameters: + - name: assistant_id + in: path + required: true + schema: + title: Assistant Id + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ModifyAssistantRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/Assistant' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' + '/studio/v1/assistants/{assistant_id}/run': + post: + summary: Run Assistant + operationId: v1_run_assistant + parameters: + - name: assistant_id + in: path + required: true + schema: + title: Assistant Id + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunAssistantRequest' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/MaestroRunResult' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' '/studio/v1/assistants/{assistant_id}/plans': get: summary: List Plans @@ -1837,6 +1944,29 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' + /studio/v1/mcp/discover: + post: + summary: Mcp Tool Discovery + operationId: mcp_tool_discovery_studio_v1_mcp_discover_post + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MCPDefinition' + required: true + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/MCPDiscoveryResponse' + '422': + description: Validation Error + content: + application/json: + schema: + $ref: '#/components/schemas/HTTPValidationError' /studio/v1/settings/models: get: summary: Get Workspace Models By Organization Endpoint @@ -2004,6 +2134,23 @@ components: $ref: '#/components/schemas/AssistantTool' tool_resources: $ref: '#/components/schemas/AssistantToolResource' + requirements: + title: Requirements + type: array + items: + $ref: '#/components/schemas/language_studio_api_server__data_types__assistant__Requirement' + budget: + allOf: + - $ref: '#/components/schemas/BudgetLevel' + default: medium + visibility: + allOf: + - $ref: '#/components/schemas/Visibility' + default: public + assistant_type: + allOf: + - $ref: '#/components/schemas/AssistantType' + default: default AssistantMessage: title: AssistantMessage type: object @@ -2071,6 +2218,7 @@ components: - file_search - web_search - plan_approval + - rag type: string description: An enumeration. AssistantToolResource: @@ -2086,6 +2234,13 @@ components: plan_approval: title: Plan Approval type: object + AssistantType: + title: AssistantType + enum: + - default + - chat + - maestro + description: An enumeration. Body_convert_document_file_studio_v1_chat_files_convert_post: title: Body_convert_document_file_studio_v1_chat_files_convert_post required: @@ -2142,6 +2297,10 @@ components: title: Budget type: string default: MEDIUM + vector_store_id: + title: Vector Store Id + type: string + description: Vector store ID to use for RFI processing Body_v1_library_upload: title: Body_v1_library_upload required: @@ -2177,6 +2336,13 @@ components: data_source: title: Data Source type: string + BudgetLevel: + title: BudgetLevel + enum: + - low + - medium + - high + description: An enumeration. ChatCompletion: title: ChatCompletion required: @@ -2299,7 +2465,7 @@ components: title: Tools type: array items: - $ref: '#/components/schemas/ToolDefinition' + $ref: '#/components/schemas/language_studio_api_server__data_types__chat__ToolDefinition' n: title: N type: integer @@ -2550,14 +2716,12 @@ components: items: type: string retrieval_strategy: - title: Retrieval Strategy - enum: - - default - - segments - - add_neighbors - - full_doc - type: string + allOf: + - $ref: '#/components/schemas/RetrievalStrategy' default: segments + max_documents: + title: Max Documents + type: integer retrieval_similarity_threshold: title: Retrieval Similarity Threshold type: number @@ -2582,8 +2746,9 @@ components: - italian - portuguese - spanish + - unset type: string - default: english + default: unset verbose: title: Verbose type: boolean @@ -2657,6 +2822,52 @@ components: type: array items: type: string + CreateAssistantRequest: + title: CreateAssistantRequest + required: + - name + type: object + properties: + name: + title: Name + type: string + description: + title: Description + type: string + optimization: + title: Optimization + type: string + avatar: + title: Avatar + type: string + models: + title: Models + type: array + items: + type: string + tools: + title: Tools + type: array + items: + type: object + additionalProperties: + $ref: '#/components/schemas/AssistantTool' + tool_resources: + title: Tool Resources + type: object + requirements: + title: Requirements + type: array + items: + $ref: '#/components/schemas/language_studio_api_server__data_types__assistant__Requirement' + budget: + allOf: + - $ref: '#/components/schemas/BudgetLevel' + default: medium + assistant_type: + allOf: + - $ref: '#/components/schemas/AssistantType' + default: default CreateMaestroRunsPayload: title: CreateMaestroRunsPayload required: @@ -2682,14 +2893,9 @@ components: title: Tools type: array items: - type: object - additionalProperties: - enum: - - file_search - - web_search - type: string + $ref: '#/components/schemas/language_studio_api_server__data_types__execution_engine__ToolDefinition' tool_resources: - $ref: '#/components/schemas/ToolResources' + $ref: '#/components/schemas/ToolResource' context: title: Context type: object @@ -2697,7 +2903,7 @@ components: title: Requirements type: array items: - $ref: '#/components/schemas/Requirement' + $ref: '#/components/schemas/language_studio_api_server__data_types__execution_engine__Requirement' budget: title: Budget enum: @@ -2722,10 +2928,6 @@ components: title: Dynamic Planning Enabled type: boolean default: false - tools_allowed: - title: Tools Allowed - type: boolean - default: false payload_type: allOf: - $ref: '#/components/schemas/MaestroPayloadType' @@ -2747,7 +2949,9 @@ components: - italian - portuguese - spanish + - unset type: string + default: unset CreateOrganizationSchemaRequest: title: CreateOrganizationSchemaRequest required: @@ -3097,6 +3301,63 @@ components: dataSource: title: Datasource type: string + FileSearchToolResource: + title: FileSearchToolResource + type: object + properties: + type: + title: Type + enum: + - file_search + type: string + default: file_search + retrieval_similarity_threshold: + title: Retrieval Similarity Threshold + type: number + labels: + title: Labels + type: array + items: + type: string + labels_filter_mode: + title: Labels Filter Mode + enum: + - AND + - OR + type: string + default: AND + labels_filter: + $ref: '#/components/schemas/QueryFilter' + file_ids: + title: File Ids + type: array + items: + type: string + retrieval_strategy: + allOf: + - $ref: '#/components/schemas/RetrievalStrategy' + default: segments + max_neighbors: + title: Max Neighbors + type: integer + path: + title: Path + type: string + response_language: + title: Response Language + enum: + - arabic + - dutch + - english + - french + - german + - hebrew + - italian + - portuguese + - spanish + - unset + type: string + default: unset FileStatus: title: FileStatus enum: @@ -3135,6 +3396,91 @@ components: type: string parameters: $ref: '#/components/schemas/ToolParameters' + HTTPToolEndpoint: + title: HTTPToolEndpoint + required: + - url + type: object + properties: + url: + title: Url + type: string + headers: + title: Headers + type: object + HTTPToolFunction: + title: HTTPToolFunction + required: + - name + - description + - parameters + type: object + properties: + name: + title: Name + type: string + description: + title: Description + type: string + parameters: + $ref: '#/components/schemas/HTTPToolFunctionParameters' + HTTPToolFunctionParamProperties: + title: HTTPToolFunctionParamProperties + required: + - type + - description + type: object + properties: + type: + title: Type + type: string + description: + title: Description + type: string + HTTPToolFunctionParameters: + title: HTTPToolFunctionParameters + required: + - properties + - required + type: object + properties: + type: + title: Type + enum: + - object + type: string + default: object + properties: + title: Properties + type: object + additionalProperties: + $ref: '#/components/schemas/HTTPToolFunctionParamProperties' + required: + title: Required + type: array + items: + type: string + additionalProperties: + title: Additionalproperties + type: boolean + default: false + HTTPToolResource: + title: HTTPToolResource + required: + - function + - endpoint + type: object + properties: + type: + title: Type + enum: + - http + type: string + default: http + function: + $ref: '#/components/schemas/HTTPToolFunction' + endpoint: + $ref: '#/components/schemas/HTTPToolEndpoint' HTTPValidationError: title: HTTPValidationError type: object @@ -3322,6 +3668,78 @@ components: type: array items: $ref: '#/components/schemas/TopLogprobsData' + MCPDefinition: + title: MCPDefinition + required: + - server_url + type: object + properties: + server_url: + title: Server Url + type: string + server_label: + title: Server Label + type: string + headers: + title: Headers + type: object + MCPDiscoveryResponse: + title: MCPDiscoveryResponse + required: + - mcp_definition + - tools + type: object + properties: + mcp_definition: + $ref: '#/components/schemas/MCPDefinition' + tools: + title: Tools + type: array + items: + $ref: '#/components/schemas/MCPTool' + MCPTool: + title: MCPTool + required: + - name + - inputSchema + type: object + properties: + name: + title: Name + type: string + description: + title: Description + type: string + inputSchema: + title: Inputschema + type: object + MCPToolResource: + title: MCPToolResource + required: + - server_label + - server_url + type: object + properties: + type: + title: Type + enum: + - mcp + type: string + default: mcp + server_label: + title: Server Label + type: string + server_url: + title: Server Url + type: string + headers: + title: Headers + type: object + allowed_tools: + title: Allowed Tools + type: array + items: + type: string MaestroPayloadType: title: MaestroPayloadType enum: @@ -3472,6 +3890,48 @@ components: type: array items: $ref: '#/components/schemas/ModelInfo' + ModifyAssistantRequest: + title: ModifyAssistantRequest + type: object + properties: + name: + title: Name + type: string + description: + title: Description + type: string + optimization: + $ref: '#/components/schemas/RunOptimization' + avatar: + title: Avatar + type: string + is_archived: + title: Is Archived + type: boolean + default: false + models: + title: Models + type: array + items: + type: string + tools: + title: Tools + type: array + items: + type: object + additionalProperties: + $ref: '#/components/schemas/AssistantTool' + tool_resources: + $ref: '#/components/schemas/AssistantToolResource' + requirements: + title: Requirements + type: array + items: + $ref: '#/components/schemas/language_studio_api_server__data_types__assistant__Requirement' + budget: + $ref: '#/components/schemas/BudgetLevel' + visibility: + $ref: '#/components/schemas/Visibility' OrgSchema: title: OrgSchema required: @@ -3575,22 +4035,6 @@ components: type: string description: Generated content for this section based on company files description: Model for a single RFI response section. - Requirement: - title: Requirement - required: - - name - - description - type: object - properties: - name: - title: Name - type: string - description: - title: Description - type: string - is_mandatory: - title: Is Mandatory - type: boolean RequirementItem: title: RequirementItem required: @@ -3645,6 +4089,62 @@ components: - full_doc type: string description: An enumeration. + RunAssistantRequest: + title: RunAssistantRequest + required: + - input + type: object + properties: + input: + title: Input + type: array + items: + $ref: '#/components/schemas/Message' + verbose: + title: Verbose + type: boolean + default: false + output_type: + title: Output Type + type: object + include: + title: Include + type: array + items: + type: string + default: + - data_sources + - requirements_result + - requirements_result.metadata + structured_rag_enabled: + title: Structured Rag Enabled + type: boolean + default: false + dynamic_planning_enabled: + title: Dynamic Planning Enabled + type: boolean + default: false + response_language: + title: Response Language + enum: + - arabic + - dutch + - english + - french + - german + - hebrew + - italian + - portuguese + - spanish + - unset + type: string + default: unset + RunOptimization: + title: RunOptimization + enum: + - cost + - latency + description: An enumeration. SecretResponse: title: SecretResponse required: @@ -3746,20 +4246,6 @@ components: type: string function: $ref: '#/components/schemas/ToolFunctionDeltaStart' - ToolDefinition: - title: ToolDefinition - required: - - type - - function - type: object - properties: - type: - title: Type - enum: - - function - type: string - function: - $ref: '#/components/schemas/FunctionToolDefinition' ToolFunction: title: ToolFunction required: @@ -3833,16 +4319,14 @@ components: items: type: string description: List of required properties - ToolResources: - title: ToolResources + ToolResource: + title: ToolResource type: object properties: file_search: - title: File Search - type: object + $ref: '#/components/schemas/FileSearchToolResource' web_search: - title: Web Search - type: object + $ref: '#/components/schemas/WebSearchToolResource' TopLogprobsData: title: TopLogprobsData required: @@ -3959,6 +4443,30 @@ components: details: title: Details type: string + Visibility: + title: Visibility + enum: + - public + - private + description: An enumeration. + WebSearchToolResource: + title: WebSearchToolResource + type: object + properties: + type: + title: Type + enum: + - web_search + type: string + default: web_search + urls: + title: Urls + type: array + items: + type: string + fallback_to_web: + title: Fallback To Web + type: boolean WebsiteConnectorCreateConfigPayload: title: WebsiteConnectorCreateConfigPayload required: @@ -4101,6 +4609,67 @@ components: type: array items: $ref: '#/components/schemas/WorkspaceModelResponse' + language_studio_api_server__data_types__assistant__Requirement: + title: Requirement + type: object + properties: + id: + title: Id + type: string + description: "A unique ID for the request (not the message). Repeated identical requests\nget different IDs. However, for a streaming response, the ID will be the same\nfor all responses in the stream.\n" + title: + title: Title + type: string + description: + title: Description + type: string + type: + title: Type + type: string + language_studio_api_server__data_types__chat__ToolDefinition: + title: ToolDefinition + required: + - type + - function + type: object + properties: + type: + title: Type + enum: + - function + type: string + function: + $ref: '#/components/schemas/FunctionToolDefinition' + language_studio_api_server__data_types__execution_engine__Requirement: + title: Requirement + required: + - name + - description + type: object + properties: + name: + title: Name + type: string + description: + title: Description + type: string + is_mandatory: + title: Is Mandatory + type: boolean + language_studio_api_server__data_types__execution_engine__ToolDefinition: + title: ToolDefinition + oneOf: + - $ref: '#/components/schemas/HTTPToolResource' + - $ref: '#/components/schemas/MCPToolResource' + - $ref: '#/components/schemas/FileSearchToolResource' + - $ref: '#/components/schemas/WebSearchToolResource' + discriminator: + propertyName: type + mapping: + http: '#/components/schemas/HTTPToolResource' + mcp: '#/components/schemas/MCPToolResource' + file_search: '#/components/schemas/FileSearchToolResource' + web_search: '#/components/schemas/WebSearchToolResource' securitySchemes: Bearer: type: http