From 4680d5ee2da182a593623075e0bebbf5b194daf0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 5 May 2026 16:22:05 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...yAGI.Humanloop.AgentsClient.CallAgent.g.cs | 65 ++++- ...GI.Humanloop.AgentsClient.DeleteAgent.g.cs | 53 +++- ...ryAGI.Humanloop.AgentsClient.GetAgent.g.cs | 70 +++++- ...anloop.AgentsClient.ListAgentVersions.g.cs | 63 ++++- ...AGI.Humanloop.AgentsClient.ListAgents.g.cs | 79 +++++- ...ryAGI.Humanloop.AgentsClient.LogAgent.g.cs | 65 ++++- ...yAGI.Humanloop.AgentsClient.MoveAgent.g.cs | 68 +++++- ...op.AgentsClient.RemoveAgentDeployment.g.cs | 56 ++++- ...nloop.AgentsClient.SetAgentDeployment.g.cs | 71 +++++- ...op.AgentsClient.UpdateAgentMonitoring.g.cs | 68 +++++- ...GI.Humanloop.AgentsClient.UpsertAgent.g.cs | 65 ++++- .../tryAGI.Humanloop.AgentsClient.g.cs | 8 +- .../tryAGI.Humanloop.AutoSDKHttpResponse.g.cs | 121 +++++++++ ...umanloop.DatasetsClient.DeleteDataset.g.cs | 53 +++- ...I.Humanloop.DatasetsClient.GetDataset.g.cs | 73 +++++- ...op.DatasetsClient.ListDatasetVersions.g.cs | 63 ++++- ...Humanloop.DatasetsClient.ListDatasets.g.cs | 79 +++++- ....Humanloop.DatasetsClient.MoveDataset.g.cs | 68 +++++- ...atasetsClient.RemoveDatasetDeployment.g.cs | 56 ++++- ...p.DatasetsClient.SetDatasetDeployment.g.cs | 71 +++++- ...umanloop.DatasetsClient.UpsertDataset.g.cs | 65 ++++- .../tryAGI.Humanloop.DatasetsClient.g.cs | 8 +- ...oop.DirectoriesClient.CreateDirectory.g.cs | 65 ++++- ...oop.DirectoriesClient.DeleteDirectory.g.cs | 53 +++- ...anloop.DirectoriesClient.GetDirectory.g.cs | 63 ++++- ...oop.DirectoriesClient.ListDirectories.g.cs | 60 ++++- ...oop.DirectoriesClient.UpdateDirectory.g.cs | 68 +++++- .../tryAGI.Humanloop.DirectoriesClient.g.cs | 8 +- ...op.EvaluationsClient.CreateEvaluation.g.cs | 65 ++++- ...nloop.EvaluationsClient.GetEvaluation.g.cs | 63 ++++- ....EvaluationsClient.ListEvaluationLogs.g.cs | 73 +++++- ....EvaluationsClient.ListEvaluationRuns.g.cs | 63 ++++- ...oop.EvaluationsClient.ListEvaluations.g.cs | 73 +++++- ...op.EvaluationsClient.UpdateEvaluation.g.cs | 68 +++++- .../tryAGI.Humanloop.EvaluationsClient.g.cs | 8 +- ...loop.EvaluatorsClient.DeleteEvaluator.g.cs | 53 +++- ...manloop.EvaluatorsClient.GetEvaluator.g.cs | 70 +++++- ...valuatorsClient.ListEvaluatorVersions.g.cs | 63 ++++- ...nloop.EvaluatorsClient.ListEvaluators.g.cs | 79 +++++- ...manloop.EvaluatorsClient.LogEvaluator.g.cs | 65 ++++- ...anloop.EvaluatorsClient.MoveEvaluator.g.cs | 68 +++++- ...atorsClient.RemoveEvaluatorDeployment.g.cs | 56 ++++- ...aluatorsClient.SetEvaluatorDeployment.g.cs | 71 +++++- ...atorsClient.UpdateEvaluatorMonitoring.g.cs | 68 +++++- ...loop.EvaluatorsClient.UpsertEvaluator.g.cs | 65 ++++- .../tryAGI.Humanloop.EvaluatorsClient.g.cs | 8 +- ...I.Humanloop.FilesClient.GetFileByPath.g.cs | 67 ++++- ...ryAGI.Humanloop.FilesClient.ListFiles.g.cs | 82 ++++++- .../tryAGI.Humanloop.FilesClient.g.cs | 8 +- ...yAGI.Humanloop.FlowsClient.DeleteFlow.g.cs | 53 +++- .../tryAGI.Humanloop.FlowsClient.GetFlow.g.cs | 70 +++++- ...umanloop.FlowsClient.ListFlowVersions.g.cs | 63 ++++- ...ryAGI.Humanloop.FlowsClient.ListFlows.g.cs | 79 +++++- .../tryAGI.Humanloop.FlowsClient.LogFlow.g.cs | 65 ++++- ...tryAGI.Humanloop.FlowsClient.MoveFlow.g.cs | 68 +++++- ...loop.FlowsClient.RemoveFlowDeployment.g.cs | 56 ++++- ...manloop.FlowsClient.SetFlowDeployment.g.cs | 71 +++++- ...loop.FlowsClient.UpdateFlowMonitoring.g.cs | 68 +++++- ...yAGI.Humanloop.FlowsClient.UpsertFlow.g.cs | 65 ++++- .../tryAGI.Humanloop.FlowsClient.g.cs | 8 +- .../tryAGI.Humanloop.HumanloopClient.g.cs | 28 +-- ...AGI.Humanloop.IAgentsClient.CallAgent.g.cs | 12 + ...I.Humanloop.IAgentsClient.DeleteAgent.g.cs | 11 + ...yAGI.Humanloop.IAgentsClient.GetAgent.g.cs | 13 + ...nloop.IAgentsClient.ListAgentVersions.g.cs | 11 + ...GI.Humanloop.IAgentsClient.ListAgents.g.cs | 19 ++ ...yAGI.Humanloop.IAgentsClient.LogAgent.g.cs | 12 + ...AGI.Humanloop.IAgentsClient.MoveAgent.g.cs | 14 ++ ...p.IAgentsClient.RemoveAgentDeployment.g.cs | 13 + ...loop.IAgentsClient.SetAgentDeployment.g.cs | 16 ++ ...p.IAgentsClient.UpdateAgentMonitoring.g.cs | 14 ++ ...I.Humanloop.IAgentsClient.UpsertAgent.g.cs | 12 + ...manloop.IDatasetsClient.DeleteDataset.g.cs | 11 + ....Humanloop.IDatasetsClient.GetDataset.g.cs | 15 ++ ...p.IDatasetsClient.ListDatasetVersions.g.cs | 11 + ...umanloop.IDatasetsClient.ListDatasets.g.cs | 19 ++ ...Humanloop.IDatasetsClient.MoveDataset.g.cs | 14 ++ ...atasetsClient.RemoveDatasetDeployment.g.cs | 13 + ....IDatasetsClient.SetDatasetDeployment.g.cs | 16 ++ ...manloop.IDatasetsClient.UpsertDataset.g.cs | 12 + ...op.IDirectoriesClient.CreateDirectory.g.cs | 12 + ...op.IDirectoriesClient.DeleteDirectory.g.cs | 11 + ...nloop.IDirectoriesClient.GetDirectory.g.cs | 11 + ...op.IDirectoriesClient.ListDirectories.g.cs | 9 + ...op.IDirectoriesClient.UpdateDirectory.g.cs | 14 ++ ...p.IEvaluationsClient.CreateEvaluation.g.cs | 12 + ...loop.IEvaluationsClient.GetEvaluation.g.cs | 11 + ...IEvaluationsClient.ListEvaluationLogs.g.cs | 15 ++ ...IEvaluationsClient.ListEvaluationRuns.g.cs | 11 + ...op.IEvaluationsClient.ListEvaluations.g.cs | 15 ++ ...p.IEvaluationsClient.UpdateEvaluation.g.cs | 14 ++ ...oop.IEvaluatorsClient.DeleteEvaluator.g.cs | 11 + ...anloop.IEvaluatorsClient.GetEvaluator.g.cs | 13 + ...valuatorsClient.ListEvaluatorVersions.g.cs | 11 + ...loop.IEvaluatorsClient.ListEvaluators.g.cs | 19 ++ ...anloop.IEvaluatorsClient.LogEvaluator.g.cs | 12 + ...nloop.IEvaluatorsClient.MoveEvaluator.g.cs | 14 ++ ...atorsClient.RemoveEvaluatorDeployment.g.cs | 13 + ...aluatorsClient.SetEvaluatorDeployment.g.cs | 16 ++ ...atorsClient.UpdateEvaluatorMonitoring.g.cs | 14 ++ ...oop.IEvaluatorsClient.UpsertEvaluator.g.cs | 12 + ....Humanloop.IFilesClient.GetFileByPath.g.cs | 11 + ...yAGI.Humanloop.IFilesClient.ListFiles.g.cs | 21 ++ ...AGI.Humanloop.IFlowsClient.DeleteFlow.g.cs | 11 + ...tryAGI.Humanloop.IFlowsClient.GetFlow.g.cs | 13 + ...manloop.IFlowsClient.ListFlowVersions.g.cs | 11 + ...yAGI.Humanloop.IFlowsClient.ListFlows.g.cs | 19 ++ ...tryAGI.Humanloop.IFlowsClient.LogFlow.g.cs | 12 + ...ryAGI.Humanloop.IFlowsClient.MoveFlow.g.cs | 14 ++ ...oop.IFlowsClient.RemoveFlowDeployment.g.cs | 13 + ...anloop.IFlowsClient.SetFlowDeployment.g.cs | 16 ++ ...oop.IFlowsClient.UpdateFlowMonitoring.g.cs | 14 ++ ...AGI.Humanloop.IFlowsClient.UpsertFlow.g.cs | 12 + ...ryAGI.Humanloop.ILogsClient.DeleteLog.g.cs | 11 + .../tryAGI.Humanloop.ILogsClient.GetLog.g.cs | 11 + ...tryAGI.Humanloop.ILogsClient.ListLogs.g.cs | 19 ++ ...I.Humanloop.IPromptsClient.CallPrompt.g.cs | 13 + ...Humanloop.IPromptsClient.DeletePrompt.g.cs | 11 + ...op.IPromptsClient.DeletePromptVersion.g.cs | 13 + ...loop.IPromptsClient.DeserializePrompt.g.cs | 12 + ...GI.Humanloop.IPromptsClient.GetPrompt.g.cs | 15 ++ ...IPromptsClient.ListPromptEnvironments.g.cs | 11 + ...oop.IPromptsClient.ListPromptVersions.g.cs | 13 + ....Humanloop.IPromptsClient.ListPrompts.g.cs | 22 ++ ...GI.Humanloop.IPromptsClient.LogPrompt.g.cs | 12 + ...I.Humanloop.IPromptsClient.MovePrompt.g.cs | 14 ++ ...manloop.IPromptsClient.PopulatePrompt.g.cs | 14 ++ ...IPromptsClient.RemovePromptDeployment.g.cs | 13 + ...anloop.IPromptsClient.SerializePrompt.g.cs | 15 ++ ...op.IPromptsClient.SetPromptDeployment.g.cs | 16 ++ ...anloop.IPromptsClient.UpdatePromptLog.g.cs | 16 ++ ...IPromptsClient.UpdatePromptMonitoring.g.cs | 14 ++ ...op.IPromptsClient.UpdatePromptVersion.g.cs | 16 ++ ...Humanloop.IPromptsClient.UpsertPrompt.g.cs | 13 + ...ryAGI.Humanloop.IToolsClient.CallTool.g.cs | 12 + ...AGI.Humanloop.IToolsClient.DeleteTool.g.cs | 11 + ...tryAGI.Humanloop.IToolsClient.GetTool.g.cs | 13 + ...manloop.IToolsClient.ListToolVersions.g.cs | 11 + ...yAGI.Humanloop.IToolsClient.ListTools.g.cs | 19 ++ ...tryAGI.Humanloop.IToolsClient.LogTool.g.cs | 12 + ...ryAGI.Humanloop.IToolsClient.MoveTool.g.cs | 14 ++ ...oop.IToolsClient.RemoveToolDeployment.g.cs | 13 + ...anloop.IToolsClient.SetToolDeployment.g.cs | 16 ++ ...oop.IToolsClient.UpdateToolMonitoring.g.cs | 14 ++ ...AGI.Humanloop.IToolsClient.UpsertTool.g.cs | 12 + ...tryAGI.Humanloop.LogsClient.DeleteLog.g.cs | 53 +++- .../tryAGI.Humanloop.LogsClient.GetLog.g.cs | 63 ++++- .../tryAGI.Humanloop.LogsClient.ListLogs.g.cs | 79 +++++- .../tryAGI.Humanloop.LogsClient.g.cs | 8 +- .../tryAGI.Humanloop.OptionsSupport.g.cs | 231 +++++++++++++++++- ...GI.Humanloop.PromptsClient.CallPrompt.g.cs | 66 ++++- ....Humanloop.PromptsClient.DeletePrompt.g.cs | 53 +++- ...oop.PromptsClient.DeletePromptVersion.g.cs | 56 ++++- ...nloop.PromptsClient.DeserializePrompt.g.cs | 65 ++++- ...AGI.Humanloop.PromptsClient.GetPrompt.g.cs | 73 +++++- ....PromptsClient.ListPromptEnvironments.g.cs | 63 ++++- ...loop.PromptsClient.ListPromptVersions.g.cs | 70 +++++- ...I.Humanloop.PromptsClient.ListPrompts.g.cs | 83 ++++++- ...AGI.Humanloop.PromptsClient.LogPrompt.g.cs | 65 ++++- ...GI.Humanloop.PromptsClient.MovePrompt.g.cs | 68 +++++- ...umanloop.PromptsClient.PopulatePrompt.g.cs | 68 +++++- ....PromptsClient.RemovePromptDeployment.g.cs | 56 ++++- ...manloop.PromptsClient.SerializePrompt.g.cs | 69 +++++- ...oop.PromptsClient.SetPromptDeployment.g.cs | 71 +++++- ...manloop.PromptsClient.UpdatePromptLog.g.cs | 71 +++++- ....PromptsClient.UpdatePromptMonitoring.g.cs | 68 +++++- ...oop.PromptsClient.UpdatePromptVersion.g.cs | 71 +++++- ....Humanloop.PromptsClient.UpsertPrompt.g.cs | 66 ++++- .../tryAGI.Humanloop.PromptsClient.g.cs | 8 +- ...tryAGI.Humanloop.ToolsClient.CallTool.g.cs | 65 ++++- ...yAGI.Humanloop.ToolsClient.DeleteTool.g.cs | 53 +++- .../tryAGI.Humanloop.ToolsClient.GetTool.g.cs | 70 +++++- ...umanloop.ToolsClient.ListToolVersions.g.cs | 63 ++++- ...ryAGI.Humanloop.ToolsClient.ListTools.g.cs | 79 +++++- .../tryAGI.Humanloop.ToolsClient.LogTool.g.cs | 65 ++++- ...tryAGI.Humanloop.ToolsClient.MoveTool.g.cs | 68 +++++- ...loop.ToolsClient.RemoveToolDeployment.g.cs | 56 ++++- ...manloop.ToolsClient.SetToolDeployment.g.cs | 71 +++++- ...loop.ToolsClient.UpdateToolMonitoring.g.cs | 68 +++++- ...yAGI.Humanloop.ToolsClient.UpsertTool.g.cs | 65 ++++- .../tryAGI.Humanloop.ToolsClient.g.cs | 8 +- 181 files changed, 6438 insertions(+), 708 deletions(-) create mode 100644 src/libs/Humanloop/Generated/tryAGI.Humanloop.AutoSDKHttpResponse.g.cs diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.CallAgent.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.CallAgent.g.cs index 6bfe4a9..9137efe 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.CallAgent.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.CallAgent.g.cs @@ -50,6 +50,28 @@ partial void ProcessCallAgentResponseContent( /// public async global::System.Threading.Tasks.Task CallAgentAsync( + global::tryAGI.Humanloop.AgentCallRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallAgentAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Call Agent + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CallAgentAsResponseAsync( + global::tryAGI.Humanloop.AgentCallRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCallAgentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/agents/call", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCallAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCallAgentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCallAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCallAgentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCallAgentResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCallAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCallAgentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCallAgentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessCallAgentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.AgentCallResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.AgentCallResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessCallAgentResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.AgentCallResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.AgentCallResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.DeleteAgent.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.DeleteAgent.g.cs index 5d30d31..68bd788 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.DeleteAgent.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.DeleteAgent.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeleteAgentResponse( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteAgentAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Agent + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteAgentAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeleteAgentResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/agents/{id}", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeleteAgentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeleteAgentResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeleteAgentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeleteAgentResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeleteAgentResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeleteAgentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeleteAgentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeleteAgentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -298,6 +335,10 @@ partial void ProcessDeleteAgentResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -319,6 +360,10 @@ partial void ProcessDeleteAgentResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.GetAgent.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.GetAgent.g.cs index 027db46..f3ded7c 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.GetAgent.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.GetAgent.g.cs @@ -56,6 +56,29 @@ partial void ProcessGetAgentResponseContent( string? versionId = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetAgentAsResponseAsync( + id: id, + versionId: versionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Agent + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetAgentAsResponseAsync( + string id, + string? versionId = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,11 +109,12 @@ partial void ProcessGetAgentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/agents/{id}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("versionId", versionId) + .AddOptionalParameter("versionId", versionId) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -163,6 +187,8 @@ partial void ProcessGetAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +199,11 @@ partial void ProcessGetAgentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +221,8 @@ partial void ProcessGetAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +232,7 @@ partial void ProcessGetAgentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +241,11 @@ partial void ProcessGetAgentResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +262,15 @@ partial void ProcessGetAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +310,8 @@ partial void ProcessGetAgentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +332,8 @@ partial void ProcessGetAgentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +358,13 @@ partial void ProcessGetAgentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.AgentResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.AgentResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +392,13 @@ partial void ProcessGetAgentResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.ListAgentVersions.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.ListAgentVersions.g.cs index 87648a7..5775917 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.ListAgentVersions.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.ListAgentVersions.g.cs @@ -52,6 +52,26 @@ partial void ProcessListAgentVersionsResponseContent( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListAgentVersionsAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Agent Versions + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListAgentVersionsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessListAgentVersionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/agents/{id}/versions", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessListAgentVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessListAgentVersionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessListAgentVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessListAgentVersionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessListAgentVersionsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessListAgentVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessListAgentVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessListAgentVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -307,9 +346,13 @@ partial void ProcessListAgentVersionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -337,9 +380,13 @@ partial void ProcessListAgentVersionsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.ListAgents.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.ListAgents.g.cs index a0c4458..64bfcde 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.ListAgents.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.ListAgents.g.cs @@ -68,6 +68,38 @@ partial void ProcessListAgentsResponseContent( global::tryAGI.Humanloop.ListAgentsOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListAgentsAsResponseAsync( + page: page, + size: size, + name: name, + sortBy: sortBy, + order: order, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Agents + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListAgentsAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListAgentsOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,15 +133,16 @@ partial void ProcessListAgentsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/agents", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("size", size?.ToString()) .AddOptionalParameter("name", name) .AddOptionalParameter("sortBy", sortBy) - .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -185,6 +218,8 @@ partial void ProcessListAgentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -195,6 +230,11 @@ partial void ProcessListAgentsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -212,6 +252,8 @@ partial void ProcessListAgentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -221,8 +263,7 @@ partial void ProcessListAgentsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -231,6 +272,11 @@ partial void ProcessListAgentsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -247,14 +293,15 @@ partial void ProcessListAgentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -294,6 +341,8 @@ partial void ProcessListAgentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -314,6 +363,8 @@ partial void ProcessListAgentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -338,9 +389,13 @@ partial void ProcessListAgentsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PaginatedAgentResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PaginatedAgentResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -368,9 +423,13 @@ partial void ProcessListAgentsResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PaginatedAgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PaginatedAgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.LogAgent.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.LogAgent.g.cs index b22e840..8eead98 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.LogAgent.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.LogAgent.g.cs @@ -50,6 +50,28 @@ partial void ProcessLogAgentResponseContent( /// public async global::System.Threading.Tasks.Task LogAgentAsync( + global::tryAGI.Humanloop.LogAgentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await LogAgentAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Log Agent + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> LogAgentAsResponseAsync( + global::tryAGI.Humanloop.LogAgentRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessLogAgentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/agents/log", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessLogAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessLogAgentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessLogAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessLogAgentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessLogAgentResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessLogAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessLogAgentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessLogAgentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessLogAgentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.CreateLogResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.CreateLogResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessLogAgentResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.CreateLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.CreateLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.MoveAgent.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.MoveAgent.g.cs index 70d9704..59baea4 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.MoveAgent.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.MoveAgent.g.cs @@ -54,6 +54,31 @@ partial void ProcessMoveAgentResponseContent( public async global::System.Threading.Tasks.Task MoveAgentAsync( string id, + global::tryAGI.Humanloop.MoveRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MoveAgentAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Move Agent + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> MoveAgentAsResponseAsync( + string id, + global::tryAGI.Humanloop.MoveRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessMoveAgentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/agents/{id}", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessMoveAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessMoveAgentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessMoveAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessMoveAgentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessMoveAgentResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessMoveAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessMoveAgentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessMoveAgentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessMoveAgentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.AgentResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.AgentResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessMoveAgentResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.RemoveAgentDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.RemoveAgentDeployment.g.cs index 04c0131..27df4ea 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.RemoveAgentDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.RemoveAgentDeployment.g.cs @@ -51,6 +51,27 @@ partial void ProcessRemoveAgentDeploymentResponse( string environmentId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RemoveAgentDeploymentAsResponseAsync( + id: id, + environmentId: environmentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Remove Agent Deployment + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RemoveAgentDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessRemoveAgentDeploymentResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/agents/{id}/environments/{environmentId}", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessRemoveAgentDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessRemoveAgentDeploymentResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessRemoveAgentDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessRemoveAgentDeploymentResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessRemoveAgentDeploymentResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessRemoveAgentDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessRemoveAgentDeploymentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessRemoveAgentDeploymentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -304,6 +344,10 @@ partial void ProcessRemoveAgentDeploymentResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -325,6 +369,10 @@ partial void ProcessRemoveAgentDeploymentResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.SetAgentDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.SetAgentDeployment.g.cs index 49972f5..e5c8a92 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.SetAgentDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.SetAgentDeployment.g.cs @@ -58,6 +58,34 @@ partial void ProcessSetAgentDeploymentResponseContent( string id, string environmentId, + global::tryAGI.Humanloop.SetDeploymentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SetAgentDeploymentAsResponseAsync( + id: id, + environmentId: environmentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Set Agent Deployment + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SetAgentDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.SetDeploymentRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -94,6 +122,7 @@ partial void ProcessSetAgentDeploymentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/agents/{id}/environments/{environmentId}", baseUri: HttpClient.BaseAddress); @@ -175,6 +204,8 @@ partial void ProcessSetAgentDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +216,11 @@ partial void ProcessSetAgentDeploymentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +238,8 @@ partial void ProcessSetAgentDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +249,7 @@ partial void ProcessSetAgentDeploymentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +258,11 @@ partial void ProcessSetAgentDeploymentResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +279,15 @@ partial void ProcessSetAgentDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +327,8 @@ partial void ProcessSetAgentDeploymentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +349,8 @@ partial void ProcessSetAgentDeploymentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +375,13 @@ partial void ProcessSetAgentDeploymentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.AgentResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.AgentResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +409,13 @@ partial void ProcessSetAgentDeploymentResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.UpdateAgentMonitoring.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.UpdateAgentMonitoring.g.cs index 5df17f0..e472f8b 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.UpdateAgentMonitoring.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.UpdateAgentMonitoring.g.cs @@ -54,6 +54,31 @@ partial void ProcessUpdateAgentMonitoringResponseContent( public async global::System.Threading.Tasks.Task UpdateAgentMonitoringAsync( string id, + global::tryAGI.Humanloop.UpdateMonitoringRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateAgentMonitoringAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Agent Monitoring + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateAgentMonitoringAsResponseAsync( + string id, + global::tryAGI.Humanloop.UpdateMonitoringRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessUpdateAgentMonitoringResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/agents/{id}/evaluators", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessUpdateAgentMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessUpdateAgentMonitoringResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessUpdateAgentMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessUpdateAgentMonitoringResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessUpdateAgentMonitoringResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessUpdateAgentMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessUpdateAgentMonitoringResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessUpdateAgentMonitoringResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessUpdateAgentMonitoringResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.AgentResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.AgentResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessUpdateAgentMonitoringResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.UpsertAgent.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.UpsertAgent.g.cs index d128c49..57d4ed5 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.UpsertAgent.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.UpsertAgent.g.cs @@ -50,6 +50,28 @@ partial void ProcessUpsertAgentResponseContent( /// public async global::System.Threading.Tasks.Task UpsertAgentAsync( + global::tryAGI.Humanloop.AgentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpsertAgentAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upsert Agent + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpsertAgentAsResponseAsync( + global::tryAGI.Humanloop.AgentRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessUpsertAgentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/agents", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessUpsertAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessUpsertAgentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessUpsertAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessUpsertAgentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessUpsertAgentResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessUpsertAgentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessUpsertAgentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessUpsertAgentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessUpsertAgentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.AgentResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.AgentResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessUpsertAgentResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.g.cs index dbb0019..d91ba6c 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AgentsClient.g.cs @@ -72,10 +72,10 @@ public AgentsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public AgentsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::tryAGI.Humanloop.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::tryAGI.Humanloop.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.AutoSDKHttpResponse.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AutoSDKHttpResponse.g.cs new file mode 100644 index 0000000..a64bd1d --- /dev/null +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.AutoSDKHttpResponse.g.cs @@ -0,0 +1,121 @@ + +#nullable enable + +namespace tryAGI.Humanloop +{ + /// + /// Represents a successful HTTP response with status code and headers. + /// + public partial class AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri) + { + StatusCode = statusCode; + Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers)); + RequestUri = requestUri; + } + + /// + /// Gets the HTTP status code. + /// + public global::System.Net.HttpStatusCode StatusCode { get; } + /// + /// Gets the response headers. + /// + public global::System.Collections.Generic.Dictionary> Headers { get; } + /// + /// Gets the final request URI associated with the response. + /// + public global::System.Uri? RequestUri { get; } + + internal static global::System.Collections.Generic.Dictionary> CreateHeaders( + global::System.Net.Http.HttpResponseMessage response) + { + response = response ?? throw new global::System.ArgumentNullException(nameof(response)); + + var headers = global::System.Linq.Enumerable.ToDictionary( + response.Headers, + static header => header.Key, + static header => (global::System.Collections.Generic.IEnumerable)global::System.Linq.Enumerable.ToArray(header.Value), + global::System.StringComparer.OrdinalIgnoreCase); + + if (response.Content?.Headers == null) + { + return headers; + } + + foreach (var header in response.Content.Headers) + { + if (headers.TryGetValue(header.Key, out var existingValues)) + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray( + global::System.Linq.Enumerable.Concat(existingValues, header.Value)); + } + else + { + headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value); + } + } + + return headers; + } + } + + /// + /// Represents a successful HTTP response with status code, headers, and body. + /// + public partial class AutoSDKHttpResponse : AutoSDKHttpResponse + { + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + T body) + : this( + statusCode: statusCode, + headers: headers, + requestUri: null, + body: body) + { + } + + /// + /// Initializes a new instance of the class. + /// + public AutoSDKHttpResponse( + global::System.Net.HttpStatusCode statusCode, + global::System.Collections.Generic.Dictionary> headers, + global::System.Uri? requestUri, + T body) + : base(statusCode, headers, requestUri) + { + Body = body; + } + + /// + /// Gets the response body. + /// + public T Body { get; } + } +} \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.DeleteDataset.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.DeleteDataset.g.cs index 3cbb704..642e087 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.DeleteDataset.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.DeleteDataset.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeleteDatasetResponse( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteDatasetAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Dataset + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteDatasetAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeleteDatasetResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/datasets/{id}", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeleteDatasetResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeleteDatasetResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeleteDatasetResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeleteDatasetResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeleteDatasetResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeleteDatasetResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeleteDatasetResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeleteDatasetResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -298,6 +335,10 @@ partial void ProcessDeleteDatasetResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -319,6 +360,10 @@ partial void ProcessDeleteDatasetResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.GetDataset.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.GetDataset.g.cs index 6519f22..a72ee43 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.GetDataset.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.GetDataset.g.cs @@ -60,6 +60,32 @@ partial void ProcessGetDatasetResponseContent( bool? includeDatapoints = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetDatasetAsResponseAsync( + id: id, + versionId: versionId, + includeDatapoints: includeDatapoints, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Dataset + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetDatasetAsResponseAsync( + string id, + string? versionId = default, + bool? includeDatapoints = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,12 +117,13 @@ partial void ProcessGetDatasetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/datasets/{id}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("versionId", versionId) - .AddOptionalParameter("includeDatapoints", includeDatapoints?.ToString().ToLowerInvariant()) + .AddOptionalParameter("includeDatapoints", includeDatapoints?.ToString().ToLowerInvariant()) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -170,6 +197,8 @@ partial void ProcessGetDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +209,11 @@ partial void ProcessGetDatasetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +231,8 @@ partial void ProcessGetDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +242,7 @@ partial void ProcessGetDatasetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +251,11 @@ partial void ProcessGetDatasetResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +272,15 @@ partial void ProcessGetDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +320,8 @@ partial void ProcessGetDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +342,8 @@ partial void ProcessGetDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,9 +368,13 @@ partial void ProcessGetDatasetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.DatasetResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.DatasetResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -353,9 +402,13 @@ partial void ProcessGetDatasetResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.DatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.DatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.ListDatasetVersions.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.ListDatasetVersions.g.cs index 2b555c3..30896c6 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.ListDatasetVersions.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.ListDatasetVersions.g.cs @@ -52,6 +52,26 @@ partial void ProcessListDatasetVersionsResponseContent( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListDatasetVersionsAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Dataset Versions + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListDatasetVersionsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessListDatasetVersionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/datasets/{id}/versions", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessListDatasetVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessListDatasetVersionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessListDatasetVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessListDatasetVersionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessListDatasetVersionsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessListDatasetVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessListDatasetVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessListDatasetVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -307,9 +346,13 @@ partial void ProcessListDatasetVersionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -337,9 +380,13 @@ partial void ProcessListDatasetVersionsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.ListDatasets.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.ListDatasets.g.cs index 2334f7c..97014ed 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.ListDatasets.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.ListDatasets.g.cs @@ -68,6 +68,38 @@ partial void ProcessListDatasetsResponseContent( global::tryAGI.Humanloop.ListDatasetsOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListDatasetsAsResponseAsync( + page: page, + size: size, + name: name, + sortBy: sortBy, + order: order, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Datasets + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListDatasetsAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListDatasetsOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,15 +133,16 @@ partial void ProcessListDatasetsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/datasets", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("size", size?.ToString()) .AddOptionalParameter("name", name) .AddOptionalParameter("sortBy", sortBy) - .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -185,6 +218,8 @@ partial void ProcessListDatasetsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -195,6 +230,11 @@ partial void ProcessListDatasetsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -212,6 +252,8 @@ partial void ProcessListDatasetsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -221,8 +263,7 @@ partial void ProcessListDatasetsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -231,6 +272,11 @@ partial void ProcessListDatasetsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -247,14 +293,15 @@ partial void ProcessListDatasetsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -294,6 +341,8 @@ partial void ProcessListDatasetsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -314,6 +363,8 @@ partial void ProcessListDatasetsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -338,9 +389,13 @@ partial void ProcessListDatasetsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PaginatedDatasetResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PaginatedDatasetResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -368,9 +423,13 @@ partial void ProcessListDatasetsResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PaginatedDatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PaginatedDatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.MoveDataset.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.MoveDataset.g.cs index 2baffe2..95278f2 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.MoveDataset.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.MoveDataset.g.cs @@ -54,6 +54,31 @@ partial void ProcessMoveDatasetResponseContent( public async global::System.Threading.Tasks.Task MoveDatasetAsync( string id, + global::tryAGI.Humanloop.MoveRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MoveDatasetAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Move Dataset + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> MoveDatasetAsResponseAsync( + string id, + global::tryAGI.Humanloop.MoveRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessMoveDatasetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/datasets/{id}", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessMoveDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessMoveDatasetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessMoveDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessMoveDatasetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessMoveDatasetResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessMoveDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessMoveDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessMoveDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessMoveDatasetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.DatasetResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.DatasetResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessMoveDatasetResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.DatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.DatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.RemoveDatasetDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.RemoveDatasetDeployment.g.cs index bd2e9d5..5b4f714 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.RemoveDatasetDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.RemoveDatasetDeployment.g.cs @@ -51,6 +51,27 @@ partial void ProcessRemoveDatasetDeploymentResponse( string environmentId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RemoveDatasetDeploymentAsResponseAsync( + id: id, + environmentId: environmentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Remove Dataset Deployment + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RemoveDatasetDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessRemoveDatasetDeploymentResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/datasets/{id}/environments/{environmentId}", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessRemoveDatasetDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessRemoveDatasetDeploymentResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessRemoveDatasetDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessRemoveDatasetDeploymentResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessRemoveDatasetDeploymentResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessRemoveDatasetDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessRemoveDatasetDeploymentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessRemoveDatasetDeploymentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -304,6 +344,10 @@ partial void ProcessRemoveDatasetDeploymentResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -325,6 +369,10 @@ partial void ProcessRemoveDatasetDeploymentResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.SetDatasetDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.SetDatasetDeployment.g.cs index 61911c5..de7c488 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.SetDatasetDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.SetDatasetDeployment.g.cs @@ -58,6 +58,34 @@ partial void ProcessSetDatasetDeploymentResponseContent( string id, string environmentId, + global::tryAGI.Humanloop.SetDeploymentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SetDatasetDeploymentAsResponseAsync( + id: id, + environmentId: environmentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Set Dataset Deployment + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SetDatasetDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.SetDeploymentRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -94,6 +122,7 @@ partial void ProcessSetDatasetDeploymentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/datasets/{id}/environments/{environmentId}", baseUri: HttpClient.BaseAddress); @@ -175,6 +204,8 @@ partial void ProcessSetDatasetDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +216,11 @@ partial void ProcessSetDatasetDeploymentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +238,8 @@ partial void ProcessSetDatasetDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +249,7 @@ partial void ProcessSetDatasetDeploymentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +258,11 @@ partial void ProcessSetDatasetDeploymentResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +279,15 @@ partial void ProcessSetDatasetDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +327,8 @@ partial void ProcessSetDatasetDeploymentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +349,8 @@ partial void ProcessSetDatasetDeploymentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +375,13 @@ partial void ProcessSetDatasetDeploymentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.DatasetResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.DatasetResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +409,13 @@ partial void ProcessSetDatasetDeploymentResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.DatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.DatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.UpsertDataset.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.UpsertDataset.g.cs index 74e66d2..fb045d1 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.UpsertDataset.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.UpsertDataset.g.cs @@ -50,6 +50,28 @@ partial void ProcessUpsertDatasetResponseContent( /// public async global::System.Threading.Tasks.Task UpsertDatasetAsync( + global::tryAGI.Humanloop.DatasetRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpsertDatasetAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upsert Dataset + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpsertDatasetAsResponseAsync( + global::tryAGI.Humanloop.DatasetRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessUpsertDatasetResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/datasets", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessUpsertDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessUpsertDatasetResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessUpsertDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessUpsertDatasetResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessUpsertDatasetResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessUpsertDatasetResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessUpsertDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessUpsertDatasetResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessUpsertDatasetResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.DatasetResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.DatasetResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessUpsertDatasetResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.DatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.DatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.g.cs index 3b91f37..1a7475b 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DatasetsClient.g.cs @@ -72,10 +72,10 @@ public DatasetsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public DatasetsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::tryAGI.Humanloop.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::tryAGI.Humanloop.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.CreateDirectory.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.CreateDirectory.g.cs index 1c0e65d..de6306e 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.CreateDirectory.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.CreateDirectory.g.cs @@ -50,6 +50,28 @@ partial void ProcessCreateDirectoryResponseContent( /// public async global::System.Threading.Tasks.Task CreateDirectoryAsync( + global::tryAGI.Humanloop.CreateDirectoryRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateDirectoryAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Directory + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateDirectoryAsResponseAsync( + global::tryAGI.Humanloop.CreateDirectoryRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCreateDirectoryResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/directories", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCreateDirectoryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCreateDirectoryResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCreateDirectoryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCreateDirectoryResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCreateDirectoryResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCreateDirectoryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCreateDirectoryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCreateDirectoryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessCreateDirectoryResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.DirectoryResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.DirectoryResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessCreateDirectoryResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.DirectoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.DirectoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.DeleteDirectory.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.DeleteDirectory.g.cs index a863d83..1149e2d 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.DeleteDirectory.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.DeleteDirectory.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeleteDirectoryResponse( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteDirectoryAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Directory + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteDirectoryAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeleteDirectoryResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/directories/{id}", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeleteDirectoryResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeleteDirectoryResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeleteDirectoryResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeleteDirectoryResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeleteDirectoryResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeleteDirectoryResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeleteDirectoryResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeleteDirectoryResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -298,6 +335,10 @@ partial void ProcessDeleteDirectoryResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -319,6 +360,10 @@ partial void ProcessDeleteDirectoryResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.GetDirectory.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.GetDirectory.g.cs index fcd162c..552df16 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.GetDirectory.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.GetDirectory.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetDirectoryResponseContent( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetDirectoryAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Directory + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetDirectoryAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessGetDirectoryResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/directories/{id}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessGetDirectoryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessGetDirectoryResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessGetDirectoryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessGetDirectoryResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessGetDirectoryResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessGetDirectoryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessGetDirectoryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessGetDirectoryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -307,9 +346,13 @@ partial void ProcessGetDirectoryResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.DirectoryResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.DirectoryResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -337,9 +380,13 @@ partial void ProcessGetDirectoryResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.DirectoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.DirectoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.ListDirectories.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.ListDirectories.g.cs index aef4bbc..cecbbe4 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.ListDirectories.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.ListDirectories.g.cs @@ -48,6 +48,23 @@ partial void ProcessListDirectoriesResponseContent( public async global::System.Threading.Tasks.Task> ListDirectoriesAsync( global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListDirectoriesAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Directories + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListDirectoriesAsResponseAsync( + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +93,7 @@ partial void ProcessListDirectoriesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/directories", baseUri: HttpClient.BaseAddress); @@ -148,6 +166,8 @@ partial void ProcessListDirectoriesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -158,6 +178,11 @@ partial void ProcessListDirectoriesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -175,6 +200,8 @@ partial void ProcessListDirectoriesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -184,8 +211,7 @@ partial void ProcessListDirectoriesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -194,6 +220,11 @@ partial void ProcessListDirectoriesResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -210,14 +241,15 @@ partial void ProcessListDirectoriesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -257,6 +289,8 @@ partial void ProcessListDirectoriesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -277,6 +311,8 @@ partial void ProcessListDirectoriesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -301,9 +337,13 @@ partial void ProcessListDirectoriesResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -331,9 +371,13 @@ partial void ProcessListDirectoriesResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.UpdateDirectory.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.UpdateDirectory.g.cs index fae5621..2db323d 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.UpdateDirectory.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.UpdateDirectory.g.cs @@ -54,6 +54,31 @@ partial void ProcessUpdateDirectoryResponseContent( public async global::System.Threading.Tasks.Task UpdateDirectoryAsync( string id, + global::tryAGI.Humanloop.UpdateDirectoryRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateDirectoryAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Directory + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateDirectoryAsResponseAsync( + string id, + global::tryAGI.Humanloop.UpdateDirectoryRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessUpdateDirectoryResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/directories/{id}", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessUpdateDirectoryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessUpdateDirectoryResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessUpdateDirectoryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessUpdateDirectoryResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessUpdateDirectoryResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessUpdateDirectoryResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessUpdateDirectoryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessUpdateDirectoryResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessUpdateDirectoryResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.DirectoryResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.DirectoryResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessUpdateDirectoryResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.DirectoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.DirectoryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.g.cs index 8bfe6d0..9866df6 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.DirectoriesClient.g.cs @@ -72,10 +72,10 @@ public DirectoriesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public DirectoriesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::tryAGI.Humanloop.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::tryAGI.Humanloop.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.CreateEvaluation.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.CreateEvaluation.g.cs index e6f847c..f0c6bbb 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.CreateEvaluation.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.CreateEvaluation.g.cs @@ -50,6 +50,28 @@ partial void ProcessCreateEvaluationResponseContent( /// public async global::System.Threading.Tasks.Task CreateEvaluationAsync( + global::tryAGI.Humanloop.EvaluationRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateEvaluationAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Create Evaluation + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CreateEvaluationAsResponseAsync( + global::tryAGI.Humanloop.EvaluationRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCreateEvaluationResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/evaluations", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCreateEvaluationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCreateEvaluationResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCreateEvaluationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCreateEvaluationResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCreateEvaluationResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCreateEvaluationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCreateEvaluationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCreateEvaluationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessCreateEvaluationResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.EvaluationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.EvaluationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessCreateEvaluationResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.EvaluationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.EvaluationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.GetEvaluation.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.GetEvaluation.g.cs index ebd5747..11622c0 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.GetEvaluation.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.GetEvaluation.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetEvaluationResponseContent( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEvaluationAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Evaluation + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetEvaluationAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessGetEvaluationResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/evaluations/{id}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessGetEvaluationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessGetEvaluationResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessGetEvaluationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessGetEvaluationResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessGetEvaluationResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessGetEvaluationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessGetEvaluationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessGetEvaluationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -307,9 +346,13 @@ partial void ProcessGetEvaluationResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.EvaluationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.EvaluationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -337,9 +380,13 @@ partial void ProcessGetEvaluationResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.EvaluationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.EvaluationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.ListEvaluationLogs.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.ListEvaluationLogs.g.cs index da451ad..ab1b6ad 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.ListEvaluationLogs.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.ListEvaluationLogs.g.cs @@ -60,6 +60,32 @@ partial void ProcessListEvaluationLogsResponseContent( int? size = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListEvaluationLogsAsResponseAsync( + id: id, + page: page, + size: size, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Evaluation Logs + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListEvaluationLogsAsResponseAsync( + string id, + int? page = default, + int? size = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,12 +117,13 @@ partial void ProcessListEvaluationLogsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/evaluations/{id}/logs", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) - .AddOptionalParameter("size", size?.ToString()) + .AddOptionalParameter("size", size?.ToString()) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -170,6 +197,8 @@ partial void ProcessListEvaluationLogsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +209,11 @@ partial void ProcessListEvaluationLogsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +231,8 @@ partial void ProcessListEvaluationLogsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +242,7 @@ partial void ProcessListEvaluationLogsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +251,11 @@ partial void ProcessListEvaluationLogsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +272,15 @@ partial void ProcessListEvaluationLogsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +320,8 @@ partial void ProcessListEvaluationLogsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +342,8 @@ partial void ProcessListEvaluationLogsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,9 +368,13 @@ partial void ProcessListEvaluationLogsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PaginatedLogResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PaginatedLogResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -353,9 +402,13 @@ partial void ProcessListEvaluationLogsResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PaginatedLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PaginatedLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.ListEvaluationRuns.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.ListEvaluationRuns.g.cs index 9fd1cb7..136d2a8 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.ListEvaluationRuns.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.ListEvaluationRuns.g.cs @@ -52,6 +52,26 @@ partial void ProcessListEvaluationRunsResponseContent( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListEvaluationRunsAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Evaluation Runs + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListEvaluationRunsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessListEvaluationRunsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/evaluations/{id}/runs", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessListEvaluationRunsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessListEvaluationRunsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessListEvaluationRunsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessListEvaluationRunsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessListEvaluationRunsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessListEvaluationRunsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessListEvaluationRunsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessListEvaluationRunsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -307,9 +346,13 @@ partial void ProcessListEvaluationRunsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -337,9 +380,13 @@ partial void ProcessListEvaluationRunsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.ListEvaluations.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.ListEvaluations.g.cs index 93b8545..6a67932 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.ListEvaluations.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.ListEvaluations.g.cs @@ -60,6 +60,32 @@ partial void ProcessListEvaluationsResponseContent( string? fileId = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListEvaluationsAsResponseAsync( + page: page, + size: size, + fileId: fileId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Evaluations + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListEvaluationsAsResponseAsync( + int? page = default, + int? size = default, + string? fileId = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,13 +117,14 @@ partial void ProcessListEvaluationsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/evaluations", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("size", size?.ToString()) - .AddOptionalParameter("fileId", fileId) + .AddOptionalParameter("fileId", fileId) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -171,6 +198,8 @@ partial void ProcessListEvaluationsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -181,6 +210,11 @@ partial void ProcessListEvaluationsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -198,6 +232,8 @@ partial void ProcessListEvaluationsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -207,8 +243,7 @@ partial void ProcessListEvaluationsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -217,6 +252,11 @@ partial void ProcessListEvaluationsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -233,14 +273,15 @@ partial void ProcessListEvaluationsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -280,6 +321,8 @@ partial void ProcessListEvaluationsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -300,6 +343,8 @@ partial void ProcessListEvaluationsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -324,9 +369,13 @@ partial void ProcessListEvaluationsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PaginatedEvaluationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PaginatedEvaluationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -354,9 +403,13 @@ partial void ProcessListEvaluationsResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PaginatedEvaluationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PaginatedEvaluationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.UpdateEvaluation.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.UpdateEvaluation.g.cs index 6eaaab1..4c1e085 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.UpdateEvaluation.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.UpdateEvaluation.g.cs @@ -54,6 +54,31 @@ partial void ProcessUpdateEvaluationResponseContent( public async global::System.Threading.Tasks.Task UpdateEvaluationAsync( string id, + global::tryAGI.Humanloop.UpdateEvaluationStatusRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateEvaluationAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Evaluation + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateEvaluationAsResponseAsync( + string id, + global::tryAGI.Humanloop.UpdateEvaluationStatusRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessUpdateEvaluationResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/evaluations/{id}", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessUpdateEvaluationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessUpdateEvaluationResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessUpdateEvaluationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessUpdateEvaluationResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessUpdateEvaluationResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessUpdateEvaluationResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessUpdateEvaluationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessUpdateEvaluationResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessUpdateEvaluationResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.EvaluationResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.EvaluationResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessUpdateEvaluationResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.EvaluationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.EvaluationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.g.cs index f8a3675..ee70f1d 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluationsClient.g.cs @@ -72,10 +72,10 @@ public EvaluationsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public EvaluationsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::tryAGI.Humanloop.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::tryAGI.Humanloop.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.DeleteEvaluator.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.DeleteEvaluator.g.cs index c9d5d39..ce229af 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.DeleteEvaluator.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.DeleteEvaluator.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeleteEvaluatorResponse( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteEvaluatorAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Evaluator + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteEvaluatorAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeleteEvaluatorResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/evaluators/{id}", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeleteEvaluatorResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeleteEvaluatorResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeleteEvaluatorResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeleteEvaluatorResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeleteEvaluatorResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeleteEvaluatorResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeleteEvaluatorResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeleteEvaluatorResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -298,6 +335,10 @@ partial void ProcessDeleteEvaluatorResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -319,6 +360,10 @@ partial void ProcessDeleteEvaluatorResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.GetEvaluator.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.GetEvaluator.g.cs index 3702b3b..46c83f1 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.GetEvaluator.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.GetEvaluator.g.cs @@ -56,6 +56,29 @@ partial void ProcessGetEvaluatorResponseContent( string? versionId = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetEvaluatorAsResponseAsync( + id: id, + versionId: versionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Evaluator + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetEvaluatorAsResponseAsync( + string id, + string? versionId = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,11 +109,12 @@ partial void ProcessGetEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/evaluators/{id}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("versionId", versionId) + .AddOptionalParameter("versionId", versionId) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -163,6 +187,8 @@ partial void ProcessGetEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +199,11 @@ partial void ProcessGetEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +221,8 @@ partial void ProcessGetEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +232,7 @@ partial void ProcessGetEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +241,11 @@ partial void ProcessGetEvaluatorResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +262,15 @@ partial void ProcessGetEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +310,8 @@ partial void ProcessGetEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +332,8 @@ partial void ProcessGetEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +358,13 @@ partial void ProcessGetEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.EvaluatorResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.EvaluatorResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +392,13 @@ partial void ProcessGetEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.EvaluatorResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.EvaluatorResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.ListEvaluatorVersions.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.ListEvaluatorVersions.g.cs index 5166a1b..bad1a89 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.ListEvaluatorVersions.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.ListEvaluatorVersions.g.cs @@ -52,6 +52,26 @@ partial void ProcessListEvaluatorVersionsResponseContent( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListEvaluatorVersionsAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Evaluator Versions + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListEvaluatorVersionsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessListEvaluatorVersionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/evaluators/{id}/versions", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessListEvaluatorVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessListEvaluatorVersionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessListEvaluatorVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessListEvaluatorVersionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessListEvaluatorVersionsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessListEvaluatorVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessListEvaluatorVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessListEvaluatorVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -307,9 +346,13 @@ partial void ProcessListEvaluatorVersionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -337,9 +380,13 @@ partial void ProcessListEvaluatorVersionsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.ListEvaluators.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.ListEvaluators.g.cs index efc1a4e..151f80c 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.ListEvaluators.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.ListEvaluators.g.cs @@ -68,6 +68,38 @@ partial void ProcessListEvaluatorsResponseContent( global::tryAGI.Humanloop.ListEvaluatorsOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListEvaluatorsAsResponseAsync( + page: page, + size: size, + name: name, + sortBy: sortBy, + order: order, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Evaluators + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListEvaluatorsAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListEvaluatorsOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,15 +133,16 @@ partial void ProcessListEvaluatorsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/evaluators", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("size", size?.ToString()) .AddOptionalParameter("name", name) .AddOptionalParameter("sortBy", sortBy) - .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -185,6 +218,8 @@ partial void ProcessListEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -195,6 +230,11 @@ partial void ProcessListEvaluatorsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -212,6 +252,8 @@ partial void ProcessListEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -221,8 +263,7 @@ partial void ProcessListEvaluatorsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -231,6 +272,11 @@ partial void ProcessListEvaluatorsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -247,14 +293,15 @@ partial void ProcessListEvaluatorsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -294,6 +341,8 @@ partial void ProcessListEvaluatorsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -314,6 +363,8 @@ partial void ProcessListEvaluatorsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -338,9 +389,13 @@ partial void ProcessListEvaluatorsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PaginatedEvaluatorResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PaginatedEvaluatorResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -368,9 +423,13 @@ partial void ProcessListEvaluatorsResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PaginatedEvaluatorResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PaginatedEvaluatorResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.LogEvaluator.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.LogEvaluator.g.cs index 902f052..eec03bd 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.LogEvaluator.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.LogEvaluator.g.cs @@ -50,6 +50,28 @@ partial void ProcessLogEvaluatorResponseContent( /// public async global::System.Threading.Tasks.Task LogEvaluatorAsync( + global::tryAGI.Humanloop.LogEvaluatorRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await LogEvaluatorAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Log Evaluator + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> LogEvaluatorAsResponseAsync( + global::tryAGI.Humanloop.LogEvaluatorRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessLogEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/evaluators/log", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessLogEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessLogEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessLogEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessLogEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessLogEvaluatorResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessLogEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessLogEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessLogEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessLogEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.CreateLogResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.CreateLogResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessLogEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.CreateLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.CreateLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.MoveEvaluator.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.MoveEvaluator.g.cs index 1966ad5..b779e98 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.MoveEvaluator.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.MoveEvaluator.g.cs @@ -54,6 +54,31 @@ partial void ProcessMoveEvaluatorResponseContent( public async global::System.Threading.Tasks.Task MoveEvaluatorAsync( string id, + global::tryAGI.Humanloop.MoveRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MoveEvaluatorAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Move Evaluator + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> MoveEvaluatorAsResponseAsync( + string id, + global::tryAGI.Humanloop.MoveRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessMoveEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/evaluators/{id}", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessMoveEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessMoveEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessMoveEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessMoveEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessMoveEvaluatorResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessMoveEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessMoveEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessMoveEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessMoveEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.EvaluatorResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.EvaluatorResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessMoveEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.EvaluatorResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.EvaluatorResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.RemoveEvaluatorDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.RemoveEvaluatorDeployment.g.cs index 11f53be..d63c8a5 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.RemoveEvaluatorDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.RemoveEvaluatorDeployment.g.cs @@ -51,6 +51,27 @@ partial void ProcessRemoveEvaluatorDeploymentResponse( string environmentId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RemoveEvaluatorDeploymentAsResponseAsync( + id: id, + environmentId: environmentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Remove Evaluator Deployment + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RemoveEvaluatorDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessRemoveEvaluatorDeploymentResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/evaluators/{id}/environments/{environmentId}", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessRemoveEvaluatorDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessRemoveEvaluatorDeploymentResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessRemoveEvaluatorDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessRemoveEvaluatorDeploymentResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessRemoveEvaluatorDeploymentResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessRemoveEvaluatorDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessRemoveEvaluatorDeploymentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessRemoveEvaluatorDeploymentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -304,6 +344,10 @@ partial void ProcessRemoveEvaluatorDeploymentResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -325,6 +369,10 @@ partial void ProcessRemoveEvaluatorDeploymentResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.SetEvaluatorDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.SetEvaluatorDeployment.g.cs index cbbd95f..04d56fe 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.SetEvaluatorDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.SetEvaluatorDeployment.g.cs @@ -58,6 +58,34 @@ partial void ProcessSetEvaluatorDeploymentResponseContent( string id, string environmentId, + global::tryAGI.Humanloop.SetDeploymentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SetEvaluatorDeploymentAsResponseAsync( + id: id, + environmentId: environmentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Set Evaluator Deployment + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SetEvaluatorDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.SetDeploymentRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -94,6 +122,7 @@ partial void ProcessSetEvaluatorDeploymentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/evaluators/{id}/environments/{environmentId}", baseUri: HttpClient.BaseAddress); @@ -175,6 +204,8 @@ partial void ProcessSetEvaluatorDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +216,11 @@ partial void ProcessSetEvaluatorDeploymentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +238,8 @@ partial void ProcessSetEvaluatorDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +249,7 @@ partial void ProcessSetEvaluatorDeploymentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +258,11 @@ partial void ProcessSetEvaluatorDeploymentResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +279,15 @@ partial void ProcessSetEvaluatorDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +327,8 @@ partial void ProcessSetEvaluatorDeploymentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +349,8 @@ partial void ProcessSetEvaluatorDeploymentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +375,13 @@ partial void ProcessSetEvaluatorDeploymentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.EvaluatorResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.EvaluatorResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +409,13 @@ partial void ProcessSetEvaluatorDeploymentResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.EvaluatorResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.EvaluatorResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.UpdateEvaluatorMonitoring.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.UpdateEvaluatorMonitoring.g.cs index 93191e6..f60259a 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.UpdateEvaluatorMonitoring.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.UpdateEvaluatorMonitoring.g.cs @@ -54,6 +54,31 @@ partial void ProcessUpdateEvaluatorMonitoringResponseContent( public async global::System.Threading.Tasks.Task UpdateEvaluatorMonitoringAsync( string id, + global::tryAGI.Humanloop.UpdateMonitoringRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateEvaluatorMonitoringAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Evaluator Monitoring + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateEvaluatorMonitoringAsResponseAsync( + string id, + global::tryAGI.Humanloop.UpdateMonitoringRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessUpdateEvaluatorMonitoringResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/evaluators/{id}/evaluators", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessUpdateEvaluatorMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessUpdateEvaluatorMonitoringResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessUpdateEvaluatorMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessUpdateEvaluatorMonitoringResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessUpdateEvaluatorMonitoringResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessUpdateEvaluatorMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessUpdateEvaluatorMonitoringResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessUpdateEvaluatorMonitoringResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessUpdateEvaluatorMonitoringResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.EvaluatorResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.EvaluatorResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessUpdateEvaluatorMonitoringResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.EvaluatorResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.EvaluatorResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.UpsertEvaluator.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.UpsertEvaluator.g.cs index c6442c9..52cfce8 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.UpsertEvaluator.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.UpsertEvaluator.g.cs @@ -50,6 +50,28 @@ partial void ProcessUpsertEvaluatorResponseContent( /// public async global::System.Threading.Tasks.Task UpsertEvaluatorAsync( + global::tryAGI.Humanloop.EvaluatorRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpsertEvaluatorAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upsert Evaluator + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpsertEvaluatorAsResponseAsync( + global::tryAGI.Humanloop.EvaluatorRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessUpsertEvaluatorResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/evaluators", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessUpsertEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessUpsertEvaluatorResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessUpsertEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessUpsertEvaluatorResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessUpsertEvaluatorResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessUpsertEvaluatorResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessUpsertEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessUpsertEvaluatorResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessUpsertEvaluatorResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.EvaluatorResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.EvaluatorResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessUpsertEvaluatorResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.EvaluatorResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.EvaluatorResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.g.cs index 0a5b26a..fe2cfe0 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.EvaluatorsClient.g.cs @@ -72,10 +72,10 @@ public EvaluatorsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public EvaluatorsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::tryAGI.Humanloop.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::tryAGI.Humanloop.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FilesClient.GetFileByPath.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FilesClient.GetFileByPath.g.cs index c4b094b..576a1ce 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FilesClient.GetFileByPath.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FilesClient.GetFileByPath.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetFileByPathResponseContent( string path, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetFileByPathAsResponseAsync( + path: path, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get File by Path + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetFileByPathAsResponseAsync( + string path, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,11 +101,12 @@ partial void ProcessGetFileByPathResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/files/by-path", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddRequiredParameter("path", path) + .AddRequiredParameter("path", path) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -157,6 +178,8 @@ partial void ProcessGetFileByPathResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -167,6 +190,11 @@ partial void ProcessGetFileByPathResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -184,6 +212,8 @@ partial void ProcessGetFileByPathResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -193,8 +223,7 @@ partial void ProcessGetFileByPathResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -203,6 +232,11 @@ partial void ProcessGetFileByPathResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -219,14 +253,15 @@ partial void ProcessGetFileByPathResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -266,6 +301,8 @@ partial void ProcessGetFileByPathResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -286,6 +323,8 @@ partial void ProcessGetFileByPathResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -310,9 +349,13 @@ partial void ProcessGetFileByPathResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.FileResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.FileResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -340,9 +383,13 @@ partial void ProcessGetFileByPathResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.FileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.FileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FilesClient.ListFiles.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FilesClient.ListFiles.g.cs index 9949aa6..a947cd6 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FilesClient.ListFiles.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FilesClient.ListFiles.g.cs @@ -72,6 +72,41 @@ partial void ProcessListFilesResponseContent( global::tryAGI.Humanloop.ListFilesOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListFilesAsResponseAsync( + page: page, + size: size, + name: name, + type: type, + sortBy: sortBy, + order: order, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Files + /// + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListFilesAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + global::tryAGI.Humanloop.ListFilesType? type = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListFilesOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -106,16 +141,17 @@ partial void ProcessListFilesResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/files", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("size", size?.ToString()) .AddOptionalParameter("name", name) .AddOptionalParameter("type", type?.ToValueString()) .AddOptionalParameter("sortBy", sortBy) - .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -192,6 +228,8 @@ partial void ProcessListFilesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -202,6 +240,11 @@ partial void ProcessListFilesResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -219,6 +262,8 @@ partial void ProcessListFilesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -228,8 +273,7 @@ partial void ProcessListFilesResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -238,6 +282,11 @@ partial void ProcessListFilesResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -254,14 +303,15 @@ partial void ProcessListFilesResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -301,6 +351,8 @@ partial void ProcessListFilesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -321,6 +373,8 @@ partial void ProcessListFilesResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -345,9 +399,13 @@ partial void ProcessListFilesResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PaginatedFileResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PaginatedFileResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -375,9 +433,13 @@ partial void ProcessListFilesResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PaginatedFileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PaginatedFileResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FilesClient.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FilesClient.g.cs index bce7c1c..289c9dc 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FilesClient.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FilesClient.g.cs @@ -72,10 +72,10 @@ public FilesClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public FilesClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::tryAGI.Humanloop.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::tryAGI.Humanloop.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.DeleteFlow.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.DeleteFlow.g.cs index 6e52fd5..54778b0 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.DeleteFlow.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.DeleteFlow.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeleteFlowResponse( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteFlowAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Flow + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteFlowAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeleteFlowResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/flows/{id}", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeleteFlowResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeleteFlowResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeleteFlowResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeleteFlowResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeleteFlowResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeleteFlowResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeleteFlowResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeleteFlowResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -298,6 +335,10 @@ partial void ProcessDeleteFlowResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -319,6 +360,10 @@ partial void ProcessDeleteFlowResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.GetFlow.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.GetFlow.g.cs index 87c9dfb..5410f61 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.GetFlow.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.GetFlow.g.cs @@ -56,6 +56,29 @@ partial void ProcessGetFlowResponseContent( string? versionId = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetFlowAsResponseAsync( + id: id, + versionId: versionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Flow + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetFlowAsResponseAsync( + string id, + string? versionId = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,11 +109,12 @@ partial void ProcessGetFlowResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/flows/{id}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("versionId", versionId) + .AddOptionalParameter("versionId", versionId) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -163,6 +187,8 @@ partial void ProcessGetFlowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +199,11 @@ partial void ProcessGetFlowResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +221,8 @@ partial void ProcessGetFlowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +232,7 @@ partial void ProcessGetFlowResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +241,11 @@ partial void ProcessGetFlowResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +262,15 @@ partial void ProcessGetFlowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +310,8 @@ partial void ProcessGetFlowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +332,8 @@ partial void ProcessGetFlowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +358,13 @@ partial void ProcessGetFlowResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.FlowResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.FlowResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +392,13 @@ partial void ProcessGetFlowResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.FlowResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.FlowResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.ListFlowVersions.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.ListFlowVersions.g.cs index f97b8ae..5701274 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.ListFlowVersions.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.ListFlowVersions.g.cs @@ -52,6 +52,26 @@ partial void ProcessListFlowVersionsResponseContent( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListFlowVersionsAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Flow Versions + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListFlowVersionsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessListFlowVersionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/flows/{id}/versions", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessListFlowVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessListFlowVersionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessListFlowVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessListFlowVersionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessListFlowVersionsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessListFlowVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessListFlowVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessListFlowVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -307,9 +346,13 @@ partial void ProcessListFlowVersionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -337,9 +380,13 @@ partial void ProcessListFlowVersionsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.ListFlows.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.ListFlows.g.cs index 659d151..7520b9c 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.ListFlows.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.ListFlows.g.cs @@ -68,6 +68,38 @@ partial void ProcessListFlowsResponseContent( global::tryAGI.Humanloop.ListFlowsOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListFlowsAsResponseAsync( + page: page, + size: size, + name: name, + sortBy: sortBy, + order: order, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Flows + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListFlowsAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListFlowsOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,15 +133,16 @@ partial void ProcessListFlowsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/flows", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("size", size?.ToString()) .AddOptionalParameter("name", name) .AddOptionalParameter("sortBy", sortBy) - .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -185,6 +218,8 @@ partial void ProcessListFlowsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -195,6 +230,11 @@ partial void ProcessListFlowsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -212,6 +252,8 @@ partial void ProcessListFlowsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -221,8 +263,7 @@ partial void ProcessListFlowsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -231,6 +272,11 @@ partial void ProcessListFlowsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -247,14 +293,15 @@ partial void ProcessListFlowsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -294,6 +341,8 @@ partial void ProcessListFlowsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -314,6 +363,8 @@ partial void ProcessListFlowsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -338,9 +389,13 @@ partial void ProcessListFlowsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PaginatedFlowResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PaginatedFlowResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -368,9 +423,13 @@ partial void ProcessListFlowsResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PaginatedFlowResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PaginatedFlowResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.LogFlow.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.LogFlow.g.cs index 4e2a5f6..8c8afb2 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.LogFlow.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.LogFlow.g.cs @@ -50,6 +50,28 @@ partial void ProcessLogFlowResponseContent( /// public async global::System.Threading.Tasks.Task LogFlowAsync( + global::tryAGI.Humanloop.LogFlowRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await LogFlowAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Log Flow + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> LogFlowAsResponseAsync( + global::tryAGI.Humanloop.LogFlowRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessLogFlowResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/flows/log", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessLogFlowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessLogFlowResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessLogFlowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessLogFlowResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessLogFlowResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessLogFlowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessLogFlowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessLogFlowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessLogFlowResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.CreateLogResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.CreateLogResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessLogFlowResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.CreateLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.CreateLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.MoveFlow.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.MoveFlow.g.cs index db42468..744633c 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.MoveFlow.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.MoveFlow.g.cs @@ -54,6 +54,31 @@ partial void ProcessMoveFlowResponseContent( public async global::System.Threading.Tasks.Task MoveFlowAsync( string id, + global::tryAGI.Humanloop.MoveRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MoveFlowAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Move Flow + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> MoveFlowAsResponseAsync( + string id, + global::tryAGI.Humanloop.MoveRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessMoveFlowResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/flows/{id}", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessMoveFlowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessMoveFlowResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessMoveFlowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessMoveFlowResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessMoveFlowResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessMoveFlowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessMoveFlowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessMoveFlowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessMoveFlowResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.FlowResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.FlowResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessMoveFlowResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.FlowResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.FlowResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.RemoveFlowDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.RemoveFlowDeployment.g.cs index b2254fd..add7b0c 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.RemoveFlowDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.RemoveFlowDeployment.g.cs @@ -51,6 +51,27 @@ partial void ProcessRemoveFlowDeploymentResponse( string environmentId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RemoveFlowDeploymentAsResponseAsync( + id: id, + environmentId: environmentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Remove Flow Deployment + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RemoveFlowDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessRemoveFlowDeploymentResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/flows/{id}/environments/{environmentId}", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessRemoveFlowDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessRemoveFlowDeploymentResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessRemoveFlowDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessRemoveFlowDeploymentResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessRemoveFlowDeploymentResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessRemoveFlowDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessRemoveFlowDeploymentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessRemoveFlowDeploymentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -304,6 +344,10 @@ partial void ProcessRemoveFlowDeploymentResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -325,6 +369,10 @@ partial void ProcessRemoveFlowDeploymentResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.SetFlowDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.SetFlowDeployment.g.cs index 2a8fe09..085f1f6 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.SetFlowDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.SetFlowDeployment.g.cs @@ -58,6 +58,34 @@ partial void ProcessSetFlowDeploymentResponseContent( string id, string environmentId, + global::tryAGI.Humanloop.SetDeploymentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SetFlowDeploymentAsResponseAsync( + id: id, + environmentId: environmentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Set Flow Deployment + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SetFlowDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.SetDeploymentRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -94,6 +122,7 @@ partial void ProcessSetFlowDeploymentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/flows/{id}/environments/{environmentId}", baseUri: HttpClient.BaseAddress); @@ -175,6 +204,8 @@ partial void ProcessSetFlowDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +216,11 @@ partial void ProcessSetFlowDeploymentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +238,8 @@ partial void ProcessSetFlowDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +249,7 @@ partial void ProcessSetFlowDeploymentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +258,11 @@ partial void ProcessSetFlowDeploymentResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +279,15 @@ partial void ProcessSetFlowDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +327,8 @@ partial void ProcessSetFlowDeploymentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +349,8 @@ partial void ProcessSetFlowDeploymentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +375,13 @@ partial void ProcessSetFlowDeploymentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.FlowResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.FlowResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +409,13 @@ partial void ProcessSetFlowDeploymentResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.FlowResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.FlowResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.UpdateFlowMonitoring.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.UpdateFlowMonitoring.g.cs index f5fa6e7..a643cbb 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.UpdateFlowMonitoring.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.UpdateFlowMonitoring.g.cs @@ -54,6 +54,31 @@ partial void ProcessUpdateFlowMonitoringResponseContent( public async global::System.Threading.Tasks.Task UpdateFlowMonitoringAsync( string id, + global::tryAGI.Humanloop.UpdateMonitoringRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateFlowMonitoringAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Flow Monitoring + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateFlowMonitoringAsResponseAsync( + string id, + global::tryAGI.Humanloop.UpdateMonitoringRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessUpdateFlowMonitoringResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/flows/{id}/evaluators", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessUpdateFlowMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessUpdateFlowMonitoringResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessUpdateFlowMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessUpdateFlowMonitoringResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessUpdateFlowMonitoringResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessUpdateFlowMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessUpdateFlowMonitoringResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessUpdateFlowMonitoringResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessUpdateFlowMonitoringResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.FlowResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.FlowResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessUpdateFlowMonitoringResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.FlowResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.FlowResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.UpsertFlow.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.UpsertFlow.g.cs index 536e4fb..1fddccb 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.UpsertFlow.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.UpsertFlow.g.cs @@ -50,6 +50,28 @@ partial void ProcessUpsertFlowResponseContent( /// public async global::System.Threading.Tasks.Task UpsertFlowAsync( + global::tryAGI.Humanloop.FlowRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpsertFlowAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upsert Flow + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpsertFlowAsResponseAsync( + global::tryAGI.Humanloop.FlowRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessUpsertFlowResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/flows", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessUpsertFlowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessUpsertFlowResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessUpsertFlowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessUpsertFlowResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessUpsertFlowResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessUpsertFlowResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessUpsertFlowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessUpsertFlowResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessUpsertFlowResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.FlowResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.FlowResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessUpsertFlowResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.FlowResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.FlowResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.g.cs index 2b79365..fab9c69 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.FlowsClient.g.cs @@ -72,10 +72,10 @@ public FlowsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public FlowsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::tryAGI.Humanloop.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::tryAGI.Humanloop.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.HumanloopClient.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.HumanloopClient.g.cs index ee149f0..84ef1a9 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.HumanloopClient.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.HumanloopClient.g.cs @@ -45,7 +45,7 @@ public sealed partial class HumanloopClient : global::tryAGI.Humanloop.IHumanloo /// /// /// - public AgentsClient Agents => new AgentsClient(HttpClient, authorizations: Authorizations, options: Options) + public AgentsClient Agents => new AgentsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -54,7 +54,7 @@ public sealed partial class HumanloopClient : global::tryAGI.Humanloop.IHumanloo /// /// /// - public DatasetsClient Datasets => new DatasetsClient(HttpClient, authorizations: Authorizations, options: Options) + public DatasetsClient Datasets => new DatasetsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -63,7 +63,7 @@ public sealed partial class HumanloopClient : global::tryAGI.Humanloop.IHumanloo /// /// /// - public DirectoriesClient Directories => new DirectoriesClient(HttpClient, authorizations: Authorizations, options: Options) + public DirectoriesClient Directories => new DirectoriesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -72,7 +72,7 @@ public sealed partial class HumanloopClient : global::tryAGI.Humanloop.IHumanloo /// /// /// - public EvaluationsClient Evaluations => new EvaluationsClient(HttpClient, authorizations: Authorizations, options: Options) + public EvaluationsClient Evaluations => new EvaluationsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -81,7 +81,7 @@ public sealed partial class HumanloopClient : global::tryAGI.Humanloop.IHumanloo /// /// /// - public EvaluatorsClient Evaluators => new EvaluatorsClient(HttpClient, authorizations: Authorizations, options: Options) + public EvaluatorsClient Evaluators => new EvaluatorsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -90,7 +90,7 @@ public sealed partial class HumanloopClient : global::tryAGI.Humanloop.IHumanloo /// /// /// - public FilesClient Files => new FilesClient(HttpClient, authorizations: Authorizations, options: Options) + public FilesClient Files => new FilesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -99,7 +99,7 @@ public sealed partial class HumanloopClient : global::tryAGI.Humanloop.IHumanloo /// /// /// - public FlowsClient Flows => new FlowsClient(HttpClient, authorizations: Authorizations, options: Options) + public FlowsClient Flows => new FlowsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -108,7 +108,7 @@ public sealed partial class HumanloopClient : global::tryAGI.Humanloop.IHumanloo /// /// /// - public LogsClient Logs => new LogsClient(HttpClient, authorizations: Authorizations, options: Options) + public LogsClient Logs => new LogsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -117,7 +117,7 @@ public sealed partial class HumanloopClient : global::tryAGI.Humanloop.IHumanloo /// /// /// - public PromptsClient Prompts => new PromptsClient(HttpClient, authorizations: Authorizations, options: Options) + public PromptsClient Prompts => new PromptsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -126,7 +126,7 @@ public sealed partial class HumanloopClient : global::tryAGI.Humanloop.IHumanloo /// /// /// - public ToolsClient Tools => new ToolsClient(HttpClient, authorizations: Authorizations, options: Options) + public ToolsClient Tools => new ToolsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options) { ReadResponseAsString = ReadResponseAsString, JsonSerializerContext = JsonSerializerContext, @@ -165,10 +165,10 @@ public HumanloopClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public HumanloopClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::tryAGI.Humanloop.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::tryAGI.Humanloop.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.CallAgent.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.CallAgent.g.cs index d94ebee..df8b57e 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.CallAgent.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.CallAgent.g.cs @@ -19,6 +19,18 @@ public partial interface IAgentsClient /// /// Call Agent /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CallAgentAsResponseAsync( + + global::tryAGI.Humanloop.AgentCallRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Call Agent + /// /// /// /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.DeleteAgent.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.DeleteAgent.g.cs index a18086d..40beb2c 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.DeleteAgent.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.DeleteAgent.g.cs @@ -15,5 +15,16 @@ public partial interface IAgentsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Agent + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteAgentAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.GetAgent.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.GetAgent.g.cs index da232db..5a2fc8b 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.GetAgent.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.GetAgent.g.cs @@ -17,5 +17,18 @@ public partial interface IAgentsClient string? versionId = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Agent + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetAgentAsResponseAsync( + string id, + string? versionId = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.ListAgentVersions.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.ListAgentVersions.g.cs index b8edaae..9836eee 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.ListAgentVersions.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.ListAgentVersions.g.cs @@ -15,5 +15,16 @@ public partial interface IAgentsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Agent Versions + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListAgentVersionsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.ListAgents.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.ListAgents.g.cs index e3c77b1..35ece16 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.ListAgents.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.ListAgents.g.cs @@ -23,5 +23,24 @@ public partial interface IAgentsClient global::tryAGI.Humanloop.ListAgentsOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Agents + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListAgentsAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListAgentsOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.LogAgent.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.LogAgent.g.cs index 23fa5ce..0f24140 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.LogAgent.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.LogAgent.g.cs @@ -19,6 +19,18 @@ public partial interface IAgentsClient /// /// Log Agent /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> LogAgentAsResponseAsync( + + global::tryAGI.Humanloop.LogAgentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Log Agent + /// /// /// /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.MoveAgent.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.MoveAgent.g.cs index ac24a4a..3d28a06 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.MoveAgent.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.MoveAgent.g.cs @@ -22,6 +22,20 @@ public partial interface IAgentsClient /// Move Agent /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> MoveAgentAsResponseAsync( + string id, + + global::tryAGI.Humanloop.MoveRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Move Agent + /// + /// /// /// New path to move the file to. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.RemoveAgentDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.RemoveAgentDeployment.g.cs index 2f18df4..897fa98 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.RemoveAgentDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.RemoveAgentDeployment.g.cs @@ -17,5 +17,18 @@ public partial interface IAgentsClient string environmentId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Remove Agent Deployment + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RemoveAgentDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.SetAgentDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.SetAgentDeployment.g.cs index b5a1417..e13d6dc 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.SetAgentDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.SetAgentDeployment.g.cs @@ -25,6 +25,22 @@ public partial interface IAgentsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SetAgentDeploymentAsResponseAsync( + string id, + string environmentId, + + global::tryAGI.Humanloop.SetDeploymentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set Agent Deployment + /// + /// + /// /// /// Version ID to deploy. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.UpdateAgentMonitoring.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.UpdateAgentMonitoring.g.cs index 24eb14d..58b4e4f 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.UpdateAgentMonitoring.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.UpdateAgentMonitoring.g.cs @@ -22,6 +22,20 @@ public partial interface IAgentsClient /// Update Agent Monitoring /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateAgentMonitoringAsResponseAsync( + string id, + + global::tryAGI.Humanloop.UpdateMonitoringRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Agent Monitoring + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.UpsertAgent.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.UpsertAgent.g.cs index 5fcfc99..413eb4b 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.UpsertAgent.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IAgentsClient.UpsertAgent.g.cs @@ -19,6 +19,18 @@ public partial interface IAgentsClient /// /// Upsert Agent /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpsertAgentAsResponseAsync( + + global::tryAGI.Humanloop.AgentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upsert Agent + /// /// /// /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.DeleteDataset.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.DeleteDataset.g.cs index 4fe015a..c9f286e 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.DeleteDataset.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.DeleteDataset.g.cs @@ -15,5 +15,16 @@ public partial interface IDatasetsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Dataset + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteDatasetAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.GetDataset.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.GetDataset.g.cs index 705a830..962d6a5 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.GetDataset.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.GetDataset.g.cs @@ -19,5 +19,20 @@ public partial interface IDatasetsClient bool? includeDatapoints = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Dataset + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetDatasetAsResponseAsync( + string id, + string? versionId = default, + bool? includeDatapoints = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.ListDatasetVersions.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.ListDatasetVersions.g.cs index 0c2a058..770a07b 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.ListDatasetVersions.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.ListDatasetVersions.g.cs @@ -15,5 +15,16 @@ public partial interface IDatasetsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Dataset Versions + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListDatasetVersionsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.ListDatasets.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.ListDatasets.g.cs index 8426e31..327c919 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.ListDatasets.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.ListDatasets.g.cs @@ -23,5 +23,24 @@ public partial interface IDatasetsClient global::tryAGI.Humanloop.ListDatasetsOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Datasets + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListDatasetsAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListDatasetsOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.MoveDataset.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.MoveDataset.g.cs index 41cd955..53ddaae 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.MoveDataset.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.MoveDataset.g.cs @@ -22,6 +22,20 @@ public partial interface IDatasetsClient /// Move Dataset /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> MoveDatasetAsResponseAsync( + string id, + + global::tryAGI.Humanloop.MoveRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Move Dataset + /// + /// /// /// New path to move the file to. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.RemoveDatasetDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.RemoveDatasetDeployment.g.cs index 1d5e4d4..47103a1 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.RemoveDatasetDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.RemoveDatasetDeployment.g.cs @@ -17,5 +17,18 @@ public partial interface IDatasetsClient string environmentId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Remove Dataset Deployment + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RemoveDatasetDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.SetDatasetDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.SetDatasetDeployment.g.cs index a1575e7..208811d 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.SetDatasetDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.SetDatasetDeployment.g.cs @@ -25,6 +25,22 @@ public partial interface IDatasetsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SetDatasetDeploymentAsResponseAsync( + string id, + string environmentId, + + global::tryAGI.Humanloop.SetDeploymentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set Dataset Deployment + /// + /// + /// /// /// Version ID to deploy. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.UpsertDataset.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.UpsertDataset.g.cs index 8bfcf80..4b185e9 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.UpsertDataset.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDatasetsClient.UpsertDataset.g.cs @@ -19,6 +19,18 @@ public partial interface IDatasetsClient /// /// Upsert Dataset /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpsertDatasetAsResponseAsync( + + global::tryAGI.Humanloop.DatasetRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upsert Dataset + /// /// /// Path of the Dataset. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.CreateDirectory.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.CreateDirectory.g.cs index 586d9a9..cd57d14 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.CreateDirectory.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.CreateDirectory.g.cs @@ -19,6 +19,18 @@ public partial interface IDirectoriesClient /// /// Create Directory /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateDirectoryAsResponseAsync( + + global::tryAGI.Humanloop.CreateDirectoryRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Directory + /// /// /// Path for the directory. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.DeleteDirectory.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.DeleteDirectory.g.cs index a22f8a5..026a28b 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.DeleteDirectory.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.DeleteDirectory.g.cs @@ -15,5 +15,16 @@ public partial interface IDirectoriesClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Directory + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteDirectoryAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.GetDirectory.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.GetDirectory.g.cs index 25d4198..6179ff2 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.GetDirectory.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.GetDirectory.g.cs @@ -15,5 +15,16 @@ public partial interface IDirectoriesClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Directory + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetDirectoryAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.ListDirectories.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.ListDirectories.g.cs index 77404a2..730bb68 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.ListDirectories.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.ListDirectories.g.cs @@ -13,5 +13,14 @@ public partial interface IDirectoriesClient global::System.Threading.Tasks.Task> ListDirectoriesAsync( global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Directories + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListDirectoriesAsResponseAsync( + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.UpdateDirectory.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.UpdateDirectory.g.cs index 17a80de..72c53ac 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.UpdateDirectory.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IDirectoriesClient.UpdateDirectory.g.cs @@ -22,6 +22,20 @@ public partial interface IDirectoriesClient /// Update Directory /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateDirectoryAsResponseAsync( + string id, + + global::tryAGI.Humanloop.UpdateDirectoryRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Directory + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.CreateEvaluation.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.CreateEvaluation.g.cs index 60b1c37..35dfd49 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.CreateEvaluation.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.CreateEvaluation.g.cs @@ -19,6 +19,18 @@ public partial interface IEvaluationsClient /// /// Create Evaluation /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CreateEvaluationAsResponseAsync( + + global::tryAGI.Humanloop.EvaluationRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Create Evaluation + /// /// /// ID of the File to evaluate. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.GetEvaluation.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.GetEvaluation.g.cs index a1d150a..beb1b5a 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.GetEvaluation.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.GetEvaluation.g.cs @@ -15,5 +15,16 @@ public partial interface IEvaluationsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Evaluation + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetEvaluationAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.ListEvaluationLogs.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.ListEvaluationLogs.g.cs index 398a60d..0030a43 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.ListEvaluationLogs.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.ListEvaluationLogs.g.cs @@ -19,5 +19,20 @@ public partial interface IEvaluationsClient int? size = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Evaluation Logs + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListEvaluationLogsAsResponseAsync( + string id, + int? page = default, + int? size = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.ListEvaluationRuns.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.ListEvaluationRuns.g.cs index 9293bc0..0b068a3 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.ListEvaluationRuns.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.ListEvaluationRuns.g.cs @@ -15,5 +15,16 @@ public partial interface IEvaluationsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Evaluation Runs + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListEvaluationRunsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.ListEvaluations.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.ListEvaluations.g.cs index 24e4ac5..9289a2f 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.ListEvaluations.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.ListEvaluations.g.cs @@ -19,5 +19,20 @@ public partial interface IEvaluationsClient string? fileId = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Evaluations + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListEvaluationsAsResponseAsync( + int? page = default, + int? size = default, + string? fileId = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.UpdateEvaluation.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.UpdateEvaluation.g.cs index 9260cc3..d39bfb3 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.UpdateEvaluation.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluationsClient.UpdateEvaluation.g.cs @@ -22,6 +22,20 @@ public partial interface IEvaluationsClient /// Update Evaluation /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateEvaluationAsResponseAsync( + string id, + + global::tryAGI.Humanloop.UpdateEvaluationStatusRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Evaluation + /// + /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.DeleteEvaluator.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.DeleteEvaluator.g.cs index 34e5a20..5bed391 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.DeleteEvaluator.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.DeleteEvaluator.g.cs @@ -15,5 +15,16 @@ public partial interface IEvaluatorsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Evaluator + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteEvaluatorAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.GetEvaluator.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.GetEvaluator.g.cs index d3e24be..3731cfd 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.GetEvaluator.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.GetEvaluator.g.cs @@ -17,5 +17,18 @@ public partial interface IEvaluatorsClient string? versionId = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Evaluator + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetEvaluatorAsResponseAsync( + string id, + string? versionId = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.ListEvaluatorVersions.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.ListEvaluatorVersions.g.cs index 798fb51..11d0c0e 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.ListEvaluatorVersions.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.ListEvaluatorVersions.g.cs @@ -15,5 +15,16 @@ public partial interface IEvaluatorsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Evaluator Versions + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListEvaluatorVersionsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.ListEvaluators.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.ListEvaluators.g.cs index 0f51b55..cd2be1d 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.ListEvaluators.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.ListEvaluators.g.cs @@ -23,5 +23,24 @@ public partial interface IEvaluatorsClient global::tryAGI.Humanloop.ListEvaluatorsOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Evaluators + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListEvaluatorsAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListEvaluatorsOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.LogEvaluator.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.LogEvaluator.g.cs index 88e620c..d33243b 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.LogEvaluator.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.LogEvaluator.g.cs @@ -19,6 +19,18 @@ public partial interface IEvaluatorsClient /// /// Log Evaluator /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> LogEvaluatorAsResponseAsync( + + global::tryAGI.Humanloop.LogEvaluatorRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Log Evaluator + /// /// /// /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.MoveEvaluator.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.MoveEvaluator.g.cs index 6650a83..c5f1108 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.MoveEvaluator.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.MoveEvaluator.g.cs @@ -22,6 +22,20 @@ public partial interface IEvaluatorsClient /// Move Evaluator /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> MoveEvaluatorAsResponseAsync( + string id, + + global::tryAGI.Humanloop.MoveRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Move Evaluator + /// + /// /// /// New path to move the file to. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.RemoveEvaluatorDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.RemoveEvaluatorDeployment.g.cs index e23a930..f8fc708 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.RemoveEvaluatorDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.RemoveEvaluatorDeployment.g.cs @@ -17,5 +17,18 @@ public partial interface IEvaluatorsClient string environmentId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Remove Evaluator Deployment + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RemoveEvaluatorDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.SetEvaluatorDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.SetEvaluatorDeployment.g.cs index afca79f..677b465 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.SetEvaluatorDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.SetEvaluatorDeployment.g.cs @@ -25,6 +25,22 @@ public partial interface IEvaluatorsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SetEvaluatorDeploymentAsResponseAsync( + string id, + string environmentId, + + global::tryAGI.Humanloop.SetDeploymentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set Evaluator Deployment + /// + /// + /// /// /// Version ID to deploy. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.UpdateEvaluatorMonitoring.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.UpdateEvaluatorMonitoring.g.cs index 88fe292..73c279f 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.UpdateEvaluatorMonitoring.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.UpdateEvaluatorMonitoring.g.cs @@ -22,6 +22,20 @@ public partial interface IEvaluatorsClient /// Update Evaluator Monitoring /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateEvaluatorMonitoringAsResponseAsync( + string id, + + global::tryAGI.Humanloop.UpdateMonitoringRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Evaluator Monitoring + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.UpsertEvaluator.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.UpsertEvaluator.g.cs index d7c7e8a..6f7092f 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.UpsertEvaluator.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IEvaluatorsClient.UpsertEvaluator.g.cs @@ -19,6 +19,18 @@ public partial interface IEvaluatorsClient /// /// Upsert Evaluator /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpsertEvaluatorAsResponseAsync( + + global::tryAGI.Humanloop.EvaluatorRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upsert Evaluator + /// /// /// /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFilesClient.GetFileByPath.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFilesClient.GetFileByPath.g.cs index 4b78aa7..2d2d960 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFilesClient.GetFileByPath.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFilesClient.GetFileByPath.g.cs @@ -15,5 +15,16 @@ public partial interface IFilesClient string path, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get File by Path + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetFileByPathAsResponseAsync( + string path, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFilesClient.ListFiles.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFilesClient.ListFiles.g.cs index e3fe164..a6605e4 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFilesClient.ListFiles.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFilesClient.ListFiles.g.cs @@ -25,5 +25,26 @@ public partial interface IFilesClient global::tryAGI.Humanloop.ListFilesOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Files + /// + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListFilesAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + global::tryAGI.Humanloop.ListFilesType? type = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListFilesOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.DeleteFlow.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.DeleteFlow.g.cs index 3155ac3..9868d48 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.DeleteFlow.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.DeleteFlow.g.cs @@ -15,5 +15,16 @@ public partial interface IFlowsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Flow + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteFlowAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.GetFlow.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.GetFlow.g.cs index 92c18b1..8cc00ed 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.GetFlow.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.GetFlow.g.cs @@ -17,5 +17,18 @@ public partial interface IFlowsClient string? versionId = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Flow + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetFlowAsResponseAsync( + string id, + string? versionId = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.ListFlowVersions.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.ListFlowVersions.g.cs index 7e413d6..348a8ee 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.ListFlowVersions.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.ListFlowVersions.g.cs @@ -15,5 +15,16 @@ public partial interface IFlowsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Flow Versions + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListFlowVersionsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.ListFlows.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.ListFlows.g.cs index d84e2b0..ade0b17 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.ListFlows.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.ListFlows.g.cs @@ -23,5 +23,24 @@ public partial interface IFlowsClient global::tryAGI.Humanloop.ListFlowsOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Flows + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListFlowsAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListFlowsOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.LogFlow.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.LogFlow.g.cs index 5563f84..a45a6a3 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.LogFlow.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.LogFlow.g.cs @@ -19,6 +19,18 @@ public partial interface IFlowsClient /// /// Log Flow /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> LogFlowAsResponseAsync( + + global::tryAGI.Humanloop.LogFlowRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Log Flow + /// /// /// /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.MoveFlow.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.MoveFlow.g.cs index e2a7b7f..eedf4d5 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.MoveFlow.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.MoveFlow.g.cs @@ -22,6 +22,20 @@ public partial interface IFlowsClient /// Move Flow /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> MoveFlowAsResponseAsync( + string id, + + global::tryAGI.Humanloop.MoveRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Move Flow + /// + /// /// /// New path to move the file to. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.RemoveFlowDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.RemoveFlowDeployment.g.cs index c6e3d53..2ed163e 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.RemoveFlowDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.RemoveFlowDeployment.g.cs @@ -17,5 +17,18 @@ public partial interface IFlowsClient string environmentId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Remove Flow Deployment + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RemoveFlowDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.SetFlowDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.SetFlowDeployment.g.cs index 0963a1e..7350f2b 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.SetFlowDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.SetFlowDeployment.g.cs @@ -25,6 +25,22 @@ public partial interface IFlowsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SetFlowDeploymentAsResponseAsync( + string id, + string environmentId, + + global::tryAGI.Humanloop.SetDeploymentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set Flow Deployment + /// + /// + /// /// /// Version ID to deploy. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.UpdateFlowMonitoring.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.UpdateFlowMonitoring.g.cs index d80e7ef..9e27afd 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.UpdateFlowMonitoring.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.UpdateFlowMonitoring.g.cs @@ -22,6 +22,20 @@ public partial interface IFlowsClient /// Update Flow Monitoring /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateFlowMonitoringAsResponseAsync( + string id, + + global::tryAGI.Humanloop.UpdateMonitoringRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Flow Monitoring + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.UpsertFlow.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.UpsertFlow.g.cs index 15187dc..18c135a 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.UpsertFlow.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IFlowsClient.UpsertFlow.g.cs @@ -19,6 +19,18 @@ public partial interface IFlowsClient /// /// Upsert Flow /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpsertFlowAsResponseAsync( + + global::tryAGI.Humanloop.FlowRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upsert Flow + /// /// /// /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ILogsClient.DeleteLog.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ILogsClient.DeleteLog.g.cs index 9ae0a22..92cbc0a 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ILogsClient.DeleteLog.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ILogsClient.DeleteLog.g.cs @@ -15,5 +15,16 @@ public partial interface ILogsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Log + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteLogAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ILogsClient.GetLog.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ILogsClient.GetLog.g.cs index 5184717..9acda4f 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ILogsClient.GetLog.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ILogsClient.GetLog.g.cs @@ -15,5 +15,16 @@ public partial interface ILogsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Log + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetLogAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ILogsClient.ListLogs.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ILogsClient.ListLogs.g.cs index 7d8cc64..0708c4e 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ILogsClient.ListLogs.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ILogsClient.ListLogs.g.cs @@ -23,5 +23,24 @@ public partial interface ILogsClient string? search = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Logs + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListLogsAsResponseAsync( + int? page = default, + int? size = default, + string? fileId = default, + string? versionId = default, + string? search = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.CallPrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.CallPrompt.g.cs index 0e24a4c..95ff761 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.CallPrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.CallPrompt.g.cs @@ -21,6 +21,19 @@ public partial interface IPromptsClient /// Call Prompt
/// Call a Prompt with proxied LLM call and automatic logging. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CallPromptAsResponseAsync( + + global::tryAGI.Humanloop.PromptCallRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Call Prompt
+ /// Call a Prompt with proxied LLM call and automatic logging. + ///
/// /// A specific Version ID of the Prompt to call. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.DeletePrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.DeletePrompt.g.cs index 40bd109..428bd7a 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.DeletePrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.DeletePrompt.g.cs @@ -15,5 +15,16 @@ public partial interface IPromptsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Prompt + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeletePromptAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.DeletePromptVersion.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.DeletePromptVersion.g.cs index 51fd7f2..b49dd0c 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.DeletePromptVersion.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.DeletePromptVersion.g.cs @@ -17,5 +17,18 @@ public partial interface IPromptsClient string versionId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Prompt Version + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeletePromptVersionAsResponseAsync( + string id, + string versionId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.DeserializePrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.DeserializePrompt.g.cs index 32484c7..b31ab67 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.DeserializePrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.DeserializePrompt.g.cs @@ -19,6 +19,18 @@ public partial interface IPromptsClient /// /// Deserialize Prompt /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> DeserializePromptAsResponseAsync( + + global::tryAGI.Humanloop.DeserializePromptRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Deserialize Prompt + /// /// /// Raw .prompt file content. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.GetPrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.GetPrompt.g.cs index 83f4f9b..58929a8 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.GetPrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.GetPrompt.g.cs @@ -19,5 +19,20 @@ public partial interface IPromptsClient string? environment = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Prompt + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetPromptAsResponseAsync( + string id, + string? versionId = default, + string? environment = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.ListPromptEnvironments.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.ListPromptEnvironments.g.cs index bc8e29f..4f9d2a0 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.ListPromptEnvironments.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.ListPromptEnvironments.g.cs @@ -15,5 +15,16 @@ public partial interface IPromptsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Prompt Environments + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListPromptEnvironmentsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.ListPromptVersions.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.ListPromptVersions.g.cs index 3c131b0..354aa2a 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.ListPromptVersions.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.ListPromptVersions.g.cs @@ -17,5 +17,18 @@ public partial interface IPromptsClient string? status = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Prompt Versions + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListPromptVersionsAsResponseAsync( + string id, + string? status = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.ListPrompts.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.ListPrompts.g.cs index 21d921d..12c0776 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.ListPrompts.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.ListPrompts.g.cs @@ -26,5 +26,27 @@ public partial interface IPromptsClient global::tryAGI.Humanloop.ListPromptsOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Prompts
+ /// Get a paginated list of Prompts. + ///
+ /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListPromptsAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + string? userFilter = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListPromptsOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.LogPrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.LogPrompt.g.cs index 3bb51a2..5fe8fef 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.LogPrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.LogPrompt.g.cs @@ -19,6 +19,18 @@ public partial interface IPromptsClient /// /// Log Prompt /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> LogPromptAsResponseAsync( + + global::tryAGI.Humanloop.PromptLogRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Log Prompt + /// /// /// /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.MovePrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.MovePrompt.g.cs index 51b8099..6b23748 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.MovePrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.MovePrompt.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptsClient /// Move Prompt /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> MovePromptAsResponseAsync( + string id, + + global::tryAGI.Humanloop.MoveRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Move Prompt + /// + /// /// /// New path to move the file to. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.PopulatePrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.PopulatePrompt.g.cs index f9ced1a..e15ff18 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.PopulatePrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.PopulatePrompt.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptsClient /// Populate Prompt /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> PopulatePromptAsResponseAsync( + string id, + + global::tryAGI.Humanloop.PopulatePromptRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Populate Prompt + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.RemovePromptDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.RemovePromptDeployment.g.cs index 34172ac..a019664 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.RemovePromptDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.RemovePromptDeployment.g.cs @@ -17,5 +17,18 @@ public partial interface IPromptsClient string environmentId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Remove Prompt Deployment + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RemovePromptDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.SerializePrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.SerializePrompt.g.cs index 54aa7bc..d7eb0e6 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.SerializePrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.SerializePrompt.g.cs @@ -19,5 +19,20 @@ public partial interface IPromptsClient string? environment = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Serialize Prompt + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SerializePromptAsResponseAsync( + string id, + string? versionId = default, + string? environment = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.SetPromptDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.SetPromptDeployment.g.cs index 8efd55e..e3aae46 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.SetPromptDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.SetPromptDeployment.g.cs @@ -25,6 +25,22 @@ public partial interface IPromptsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SetPromptDeploymentAsResponseAsync( + string id, + string environmentId, + + global::tryAGI.Humanloop.SetDeploymentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set Prompt Deployment + /// + /// + /// /// /// Version ID to deploy. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpdatePromptLog.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpdatePromptLog.g.cs index 040032a..d5e48f4 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpdatePromptLog.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpdatePromptLog.g.cs @@ -25,6 +25,22 @@ public partial interface IPromptsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdatePromptLogAsResponseAsync( + string id, + string logId, + + global::tryAGI.Humanloop.PromptLogRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Prompt Log + /// + /// + /// /// /// /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpdatePromptMonitoring.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpdatePromptMonitoring.g.cs index d24eeca..7500df6 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpdatePromptMonitoring.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpdatePromptMonitoring.g.cs @@ -22,6 +22,20 @@ public partial interface IPromptsClient /// Update Prompt Monitoring /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdatePromptMonitoringAsResponseAsync( + string id, + + global::tryAGI.Humanloop.UpdateMonitoringRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Prompt Monitoring + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpdatePromptVersion.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpdatePromptVersion.g.cs index 097a3f2..95527ae 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpdatePromptVersion.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpdatePromptVersion.g.cs @@ -25,6 +25,22 @@ public partial interface IPromptsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdatePromptVersionAsResponseAsync( + string id, + string versionId, + + global::tryAGI.Humanloop.UpdateVersionRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Prompt Version + /// + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpsertPrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpsertPrompt.g.cs index 8c4b389..3512ce3 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpsertPrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IPromptsClient.UpsertPrompt.g.cs @@ -21,6 +21,19 @@ public partial interface IPromptsClient /// Upsert Prompt
/// Create or update a Prompt. /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpsertPromptAsResponseAsync( + + global::tryAGI.Humanloop.PromptRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upsert Prompt
+ /// Create or update a Prompt. + ///
/// /// Path of the Prompt, including the name. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.CallTool.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.CallTool.g.cs index 980e6c2..eb0a803 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.CallTool.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.CallTool.g.cs @@ -19,6 +19,18 @@ public partial interface IToolsClient /// /// Call Tool /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> CallToolAsResponseAsync( + + global::tryAGI.Humanloop.CallToolRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Call Tool + /// /// /// /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.DeleteTool.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.DeleteTool.g.cs index ad1e2f2..e6af395 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.DeleteTool.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.DeleteTool.g.cs @@ -15,5 +15,16 @@ public partial interface IToolsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Delete Tool + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteToolAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.GetTool.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.GetTool.g.cs index d1d7630..a0cf51f 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.GetTool.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.GetTool.g.cs @@ -17,5 +17,18 @@ public partial interface IToolsClient string? versionId = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get Tool + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> GetToolAsResponseAsync( + string id, + string? versionId = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.ListToolVersions.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.ListToolVersions.g.cs index 6fb5861..e409400 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.ListToolVersions.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.ListToolVersions.g.cs @@ -15,5 +15,16 @@ public partial interface IToolsClient string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Tool Versions + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task>> ListToolVersionsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.ListTools.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.ListTools.g.cs index 6721de7..55cf766 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.ListTools.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.ListTools.g.cs @@ -23,5 +23,24 @@ public partial interface IToolsClient global::tryAGI.Humanloop.ListToolsOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List Tools + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> ListToolsAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListToolsOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.LogTool.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.LogTool.g.cs index 7fcc5c4..a73c4dd 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.LogTool.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.LogTool.g.cs @@ -19,6 +19,18 @@ public partial interface IToolsClient /// /// Log Tool /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> LogToolAsResponseAsync( + + global::tryAGI.Humanloop.LogToolRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Log Tool + /// /// /// /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.MoveTool.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.MoveTool.g.cs index 95a2e1e..52b0592 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.MoveTool.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.MoveTool.g.cs @@ -22,6 +22,20 @@ public partial interface IToolsClient /// Move Tool /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> MoveToolAsResponseAsync( + string id, + + global::tryAGI.Humanloop.MoveRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Move Tool + /// + /// /// /// New path to move the file to. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.RemoveToolDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.RemoveToolDeployment.g.cs index b776ea8..2cd072d 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.RemoveToolDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.RemoveToolDeployment.g.cs @@ -17,5 +17,18 @@ public partial interface IToolsClient string environmentId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Remove Tool Deployment + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RemoveToolDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); } } \ No newline at end of file diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.SetToolDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.SetToolDeployment.g.cs index affced8..967b294 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.SetToolDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.SetToolDeployment.g.cs @@ -25,6 +25,22 @@ public partial interface IToolsClient /// /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> SetToolDeploymentAsResponseAsync( + string id, + string environmentId, + + global::tryAGI.Humanloop.SetDeploymentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Set Tool Deployment + /// + /// + /// /// /// Version ID to deploy. /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.UpdateToolMonitoring.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.UpdateToolMonitoring.g.cs index 0901385..b5fc51e 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.UpdateToolMonitoring.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.UpdateToolMonitoring.g.cs @@ -22,6 +22,20 @@ public partial interface IToolsClient /// Update Tool Monitoring /// /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpdateToolMonitoringAsResponseAsync( + string id, + + global::tryAGI.Humanloop.UpdateMonitoringRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Update Tool Monitoring + /// + /// /// /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.UpsertTool.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.UpsertTool.g.cs index 3013cc3..1c87d34 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.UpsertTool.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.IToolsClient.UpsertTool.g.cs @@ -19,6 +19,18 @@ public partial interface IToolsClient /// /// Upsert Tool /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> UpsertToolAsResponseAsync( + + global::tryAGI.Humanloop.ToolRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Upsert Tool + /// /// /// /// diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.DeleteLog.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.DeleteLog.g.cs index f80e641..a2fa850 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.DeleteLog.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.DeleteLog.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeleteLogResponse( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteLogAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Log + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteLogAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeleteLogResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/logs/{id}", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeleteLogResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeleteLogResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeleteLogResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeleteLogResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeleteLogResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeleteLogResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeleteLogResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeleteLogResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -298,6 +335,10 @@ partial void ProcessDeleteLogResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -319,6 +360,10 @@ partial void ProcessDeleteLogResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.GetLog.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.GetLog.g.cs index 3142bd4..808aaf8 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.GetLog.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.GetLog.g.cs @@ -52,6 +52,26 @@ partial void ProcessGetLogResponseContent( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetLogAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Log + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetLogAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessGetLogResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/logs/{id}", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessGetLogResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessGetLogResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessGetLogResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessGetLogResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessGetLogResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessGetLogResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessGetLogResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessGetLogResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -307,9 +346,13 @@ partial void ProcessGetLogResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PromptLogResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PromptLogResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -337,9 +380,13 @@ partial void ProcessGetLogResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PromptLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PromptLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.ListLogs.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.ListLogs.g.cs index 097d1a4..11203fc 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.ListLogs.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.ListLogs.g.cs @@ -68,6 +68,38 @@ partial void ProcessListLogsResponseContent( string? search = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListLogsAsResponseAsync( + page: page, + size: size, + fileId: fileId, + versionId: versionId, + search: search, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Logs + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListLogsAsResponseAsync( + int? page = default, + int? size = default, + string? fileId = default, + string? versionId = default, + string? search = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,15 +133,16 @@ partial void ProcessListLogsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/logs", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("size", size?.ToString()) .AddOptionalParameter("fileId", fileId) .AddOptionalParameter("versionId", versionId) - .AddOptionalParameter("search", search) + .AddOptionalParameter("search", search) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -185,6 +218,8 @@ partial void ProcessListLogsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -195,6 +230,11 @@ partial void ProcessListLogsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -212,6 +252,8 @@ partial void ProcessListLogsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -221,8 +263,7 @@ partial void ProcessListLogsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -231,6 +272,11 @@ partial void ProcessListLogsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -247,14 +293,15 @@ partial void ProcessListLogsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -294,6 +341,8 @@ partial void ProcessListLogsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -314,6 +363,8 @@ partial void ProcessListLogsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -338,9 +389,13 @@ partial void ProcessListLogsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PaginatedLogResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PaginatedLogResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -368,9 +423,13 @@ partial void ProcessListLogsResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PaginatedLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PaginatedLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.g.cs index a468317..e4348de 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.LogsClient.g.cs @@ -72,10 +72,10 @@ public LogsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public LogsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::tryAGI.Humanloop.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::tryAGI.Humanloop.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.OptionsSupport.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.OptionsSupport.g.cs index 1ac71b2..3d84996 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.OptionsSupport.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.OptionsSupport.g.cs @@ -101,9 +101,45 @@ public sealed class AutoSDKRetryOptions public int MaxAttempts { get; set; } = 1; /// - /// Optional fixed delay between retry attempts. + /// Optional fixed delay between retry attempts. When set, this takes precedence over exponential backoff. /// public global::System.TimeSpan? Delay { get; set; } + + /// + /// Initial exponential backoff delay used when is not set. + /// + public global::System.TimeSpan InitialDelay { get; set; } = global::System.TimeSpan.FromSeconds(1); + + /// + /// Maximum retry delay after applying retry headers, backoff, and jitter. + /// + public global::System.TimeSpan MaxDelay { get; set; } = global::System.TimeSpan.FromSeconds(30); + + /// + /// Multiplier applied to exponential backoff after each failed attempt. + /// Values below 1 are normalized to 1. + /// + public double BackoffMultiplier { get; set; } = 2D; + + /// + /// Randomizes computed backoff by plus or minus this ratio. Values are clamped to 0..1. + /// + public double JitterRatio { get; set; } = 0.2D; + + /// + /// Whether Retry-After response headers should control retry delay when present. + /// + public bool UseRetryAfterHeader { get; set; } = true; + + /// + /// Whether a rate-limit reset response header should control retry delay when present. + /// + public bool UseRateLimitResetHeader { get; set; } + + /// + /// Optional provider-specific rate-limit reset header name. Values may be Unix seconds or an HTTP date. + /// + public string? RateLimitResetHeaderName { get; set; } = "X-RateLimit-Reset"; } @@ -231,6 +267,16 @@ public sealed class AutoSDKHookContext /// public bool WillRetry { get; set; } + /// + /// The computed retry delay when is true. + /// + public global::System.TimeSpan? RetryDelay { get; set; } + + /// + /// A short retry reason such as exception or status:429. + /// + public string RetryReason { get; set; } = string.Empty; + /// /// The effective cancellation token for the current request attempt. /// @@ -254,6 +300,8 @@ internal static class AutoSDKRequestOptionsSupport int attempt, int maxAttempts, bool willRetry, + global::System.TimeSpan? retryDelay, + string retryReason, global::System.Threading.CancellationToken cancellationToken) { return new global::tryAGI.Humanloop.AutoSDKHookContext @@ -271,6 +319,8 @@ internal static class AutoSDKRequestOptionsSupport Attempt = attempt, MaxAttempts = maxAttempts, WillRetry = willRetry, + RetryDelay = retryDelay, + RetryReason = retryReason ?? string.Empty, CancellationToken = cancellationToken, }; } @@ -338,19 +388,188 @@ internal static int GetMaxAttempts( return maxAttempts < 1 ? 1 : maxAttempts; } - internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + internal static global::System.TimeSpan GetRetryDelay( global::tryAGI.Humanloop.AutoSDKClientOptions clientOptions, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions, + global::System.Net.Http.HttpResponseMessage? response, + int attempt) + { + var retryOptions = requestOptions?.Retry ?? clientOptions.Retry ?? new global::tryAGI.Humanloop.AutoSDKRetryOptions(); + + if (retryOptions.UseRetryAfterHeader && + TryGetRetryAfterDelay(response, out var retryAfterDelay)) + { + return ClampRetryDelay(retryAfterDelay, retryOptions); + } + + if (retryOptions.UseRateLimitResetHeader && + TryGetRateLimitResetDelay(response, retryOptions.RateLimitResetHeaderName, out var rateLimitResetDelay)) + { + return ClampRetryDelay(rateLimitResetDelay, retryOptions); + } + + if (retryOptions.Delay.HasValue) + { + return ClampRetryDelay(retryOptions.Delay.Value, retryOptions); + } + + var initialDelay = retryOptions.InitialDelay; + if (initialDelay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var multiplier = retryOptions.BackoffMultiplier < 1D ? 1D : retryOptions.BackoffMultiplier; + var exponent = attempt <= 1 ? 0 : attempt - 1; + var delayMilliseconds = initialDelay.TotalMilliseconds * global::System.Math.Pow(multiplier, exponent); + if (double.IsNaN(delayMilliseconds) || double.IsInfinity(delayMilliseconds) || delayMilliseconds < 0D) + { + delayMilliseconds = 0D; + } + + var delay = global::System.TimeSpan.FromMilliseconds(delayMilliseconds); + delay = ApplyJitter(delay, retryOptions.JitterRatio); + return ClampRetryDelay(delay, retryOptions); + } + + internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync( + global::System.TimeSpan retryDelay, global::System.Threading.CancellationToken cancellationToken) { - var delay = requestOptions?.Retry?.Delay ?? - clientOptions.Retry?.Delay; - if (!delay.HasValue || delay.Value <= global::System.TimeSpan.Zero) + if (retryDelay <= global::System.TimeSpan.Zero) { return; } - await global::System.Threading.Tasks.Task.Delay(delay.Value, cancellationToken).ConfigureAwait(false); + await global::System.Threading.Tasks.Task.Delay(retryDelay, cancellationToken).ConfigureAwait(false); + } + + private static bool TryGetRetryAfterDelay( + global::System.Net.Http.HttpResponseMessage? response, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + var retryAfter = response?.Headers.RetryAfter; + if (retryAfter == null) + { + return false; + } + + if (retryAfter.Delta.HasValue) + { + delay = retryAfter.Delta.Value; + return delay > global::System.TimeSpan.Zero; + } + + if (retryAfter.Date.HasValue) + { + delay = retryAfter.Date.Value - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static bool TryGetRateLimitResetDelay( + global::System.Net.Http.HttpResponseMessage? response, + string? headerName, + out global::System.TimeSpan delay) + { + delay = global::System.TimeSpan.Zero; + if (response == null || string.IsNullOrWhiteSpace(headerName)) + { + return false; + } + + if (!response.Headers.TryGetValues(headerName, out var values) && + (response.Content?.Headers == null || !response.Content.Headers.TryGetValues(headerName, out values))) + { + return false; + } + + var value = global::System.Linq.Enumerable.FirstOrDefault(values); + if (string.IsNullOrWhiteSpace(value)) + { + return false; + } + + value = value.Trim(); + if (long.TryParse( + value, + global::System.Globalization.NumberStyles.Integer, + global::System.Globalization.CultureInfo.InvariantCulture, + out var unixSeconds)) + { + delay = global::System.DateTimeOffset.FromUnixTimeSeconds(unixSeconds) - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + if (global::System.DateTimeOffset.TryParse( + value, + global::System.Globalization.CultureInfo.InvariantCulture, + global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal, + out var resetAt)) + { + delay = resetAt - global::System.DateTimeOffset.UtcNow; + return delay > global::System.TimeSpan.Zero; + } + + return false; + } + + private static global::System.TimeSpan ApplyJitter( + global::System.TimeSpan delay, + double jitterRatio) + { + if (delay <= global::System.TimeSpan.Zero || jitterRatio <= 0D) + { + return delay; + } + + if (jitterRatio > 1D) + { + jitterRatio = 1D; + } + + var sample = NextJitterSample(); + var multiplier = 1D - jitterRatio + (sample * jitterRatio * 2D); + var milliseconds = delay.TotalMilliseconds * multiplier; + if (double.IsNaN(milliseconds) || double.IsInfinity(milliseconds) || milliseconds < 0D) + { + milliseconds = 0D; + } + + return global::System.TimeSpan.FromMilliseconds(milliseconds); + } + + private static double NextJitterSample() + { + var bytes = new byte[8]; + using (var randomNumberGenerator = global::System.Security.Cryptography.RandomNumberGenerator.Create()) + { + randomNumberGenerator.GetBytes(bytes); + } + + var value = global::System.BitConverter.ToUInt64(bytes, 0); + return value / (double)ulong.MaxValue; + } + + private static global::System.TimeSpan ClampRetryDelay( + global::System.TimeSpan delay, + global::tryAGI.Humanloop.AutoSDKRetryOptions retryOptions) + { + if (delay <= global::System.TimeSpan.Zero) + { + return global::System.TimeSpan.Zero; + } + + var maxDelay = retryOptions.MaxDelay; + if (maxDelay > global::System.TimeSpan.Zero && delay > maxDelay) + { + return maxDelay; + } + + return delay; } internal static bool ShouldRetryStatusCode( diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.CallPrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.CallPrompt.g.cs index f44aca4..c616fc2 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.CallPrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.CallPrompt.g.cs @@ -51,6 +51,29 @@ partial void ProcessCallPromptResponseContent( /// public async global::System.Threading.Tasks.Task CallPromptAsync( + global::tryAGI.Humanloop.PromptCallRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallPromptAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Call Prompt
+ /// Call a Prompt with proxied LLM call and automatic logging. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CallPromptAsResponseAsync( + global::tryAGI.Humanloop.PromptCallRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessCallPromptResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/prompts/call", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessCallPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessCallPromptResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessCallPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessCallPromptResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessCallPromptResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessCallPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessCallPromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessCallPromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -317,9 +359,13 @@ partial void ProcessCallPromptResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PromptCallResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PromptCallResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -347,9 +393,13 @@ partial void ProcessCallPromptResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PromptCallResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PromptCallResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.DeletePrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.DeletePrompt.g.cs index a4709e7..36d7bc5 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.DeletePrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.DeletePrompt.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeletePromptResponse( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeletePromptAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Prompt + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeletePromptAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeletePromptResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeletePromptResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeletePromptResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeletePromptResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeletePromptResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeletePromptResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeletePromptResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeletePromptResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeletePromptResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -298,6 +335,10 @@ partial void ProcessDeletePromptResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -319,6 +360,10 @@ partial void ProcessDeletePromptResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.DeletePromptVersion.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.DeletePromptVersion.g.cs index 0366a64..9dbeeae 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.DeletePromptVersion.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.DeletePromptVersion.g.cs @@ -51,6 +51,27 @@ partial void ProcessDeletePromptVersionResponse( string versionId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeletePromptVersionAsResponseAsync( + id: id, + versionId: versionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Prompt Version + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeletePromptVersionAsResponseAsync( + string id, + string versionId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessDeletePromptVersionResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}/versions/{versionId}", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessDeletePromptVersionResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessDeletePromptVersionResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessDeletePromptVersionResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessDeletePromptVersionResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessDeletePromptVersionResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessDeletePromptVersionResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessDeletePromptVersionResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessDeletePromptVersionResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -304,6 +344,10 @@ partial void ProcessDeletePromptVersionResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -325,6 +369,10 @@ partial void ProcessDeletePromptVersionResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.DeserializePrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.DeserializePrompt.g.cs index 4101369..f9a0df3 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.DeserializePrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.DeserializePrompt.g.cs @@ -50,6 +50,28 @@ partial void ProcessDeserializePromptResponseContent( /// public async global::System.Threading.Tasks.Task DeserializePromptAsync( + global::tryAGI.Humanloop.DeserializePromptRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await DeserializePromptAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Deserialize Prompt + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> DeserializePromptAsResponseAsync( + global::tryAGI.Humanloop.DeserializePromptRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessDeserializePromptResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/prompts/deserialize", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessDeserializePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessDeserializePromptResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessDeserializePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessDeserializePromptResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessDeserializePromptResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessDeserializePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessDeserializePromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessDeserializePromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessDeserializePromptResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessDeserializePromptResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.GetPrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.GetPrompt.g.cs index c9a75bc..efce00a 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.GetPrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.GetPrompt.g.cs @@ -60,6 +60,32 @@ partial void ProcessGetPromptResponseContent( string? environment = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetPromptAsResponseAsync( + id: id, + versionId: versionId, + environment: environment, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Prompt + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetPromptAsResponseAsync( + string id, + string? versionId = default, + string? environment = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,12 +117,13 @@ partial void ProcessGetPromptResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("versionId", versionId) - .AddOptionalParameter("environment", environment) + .AddOptionalParameter("environment", environment) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -170,6 +197,8 @@ partial void ProcessGetPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +209,11 @@ partial void ProcessGetPromptResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +231,8 @@ partial void ProcessGetPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +242,7 @@ partial void ProcessGetPromptResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +251,11 @@ partial void ProcessGetPromptResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +272,15 @@ partial void ProcessGetPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +320,8 @@ partial void ProcessGetPromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +342,8 @@ partial void ProcessGetPromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,9 +368,13 @@ partial void ProcessGetPromptResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -353,9 +402,13 @@ partial void ProcessGetPromptResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.ListPromptEnvironments.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.ListPromptEnvironments.g.cs index 6183fc5..f9fd870 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.ListPromptEnvironments.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.ListPromptEnvironments.g.cs @@ -52,6 +52,26 @@ partial void ProcessListPromptEnvironmentsResponseContent( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListPromptEnvironmentsAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Prompt Environments + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListPromptEnvironmentsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessListPromptEnvironmentsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}/environments", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessListPromptEnvironmentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessListPromptEnvironmentsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessListPromptEnvironmentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessListPromptEnvironmentsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessListPromptEnvironmentsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessListPromptEnvironmentsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessListPromptEnvironmentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessListPromptEnvironmentsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -307,9 +346,13 @@ partial void ProcessListPromptEnvironmentsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -337,9 +380,13 @@ partial void ProcessListPromptEnvironmentsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.ListPromptVersions.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.ListPromptVersions.g.cs index dd0b96f..abd6625 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.ListPromptVersions.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.ListPromptVersions.g.cs @@ -56,6 +56,29 @@ partial void ProcessListPromptVersionsResponseContent( string? status = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListPromptVersionsAsResponseAsync( + id: id, + status: status, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Prompt Versions + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListPromptVersionsAsResponseAsync( + string id, + string? status = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,11 +109,12 @@ partial void ProcessListPromptVersionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}/versions", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("status", status) + .AddOptionalParameter("status", status) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -163,6 +187,8 @@ partial void ProcessListPromptVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +199,11 @@ partial void ProcessListPromptVersionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +221,8 @@ partial void ProcessListPromptVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +232,7 @@ partial void ProcessListPromptVersionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +241,11 @@ partial void ProcessListPromptVersionsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +262,15 @@ partial void ProcessListPromptVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +310,8 @@ partial void ProcessListPromptVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +332,8 @@ partial void ProcessListPromptVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +358,13 @@ partial void ProcessListPromptVersionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +392,13 @@ partial void ProcessListPromptVersionsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.ListPrompts.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.ListPrompts.g.cs index dac746b..cd00aa5 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.ListPrompts.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.ListPrompts.g.cs @@ -73,6 +73,42 @@ partial void ProcessListPromptsResponseContent( global::tryAGI.Humanloop.ListPromptsOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListPromptsAsResponseAsync( + page: page, + size: size, + name: name, + userFilter: userFilter, + sortBy: sortBy, + order: order, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Prompts
+ /// Get a paginated list of Prompts. + ///
+ /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListPromptsAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + string? userFilter = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListPromptsOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -107,16 +143,17 @@ partial void ProcessListPromptsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/prompts", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("size", size?.ToString()) .AddOptionalParameter("name", name) .AddOptionalParameter("userFilter", userFilter) .AddOptionalParameter("sortBy", sortBy) - .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -193,6 +230,8 @@ partial void ProcessListPromptsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -203,6 +242,11 @@ partial void ProcessListPromptsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -220,6 +264,8 @@ partial void ProcessListPromptsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -229,8 +275,7 @@ partial void ProcessListPromptsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -239,6 +284,11 @@ partial void ProcessListPromptsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -255,14 +305,15 @@ partial void ProcessListPromptsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -302,6 +353,8 @@ partial void ProcessListPromptsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -322,6 +375,8 @@ partial void ProcessListPromptsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -346,9 +401,13 @@ partial void ProcessListPromptsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PaginatedPromptResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PaginatedPromptResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -376,9 +435,13 @@ partial void ProcessListPromptsResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PaginatedPromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PaginatedPromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.LogPrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.LogPrompt.g.cs index db6ea31..e01ab4a 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.LogPrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.LogPrompt.g.cs @@ -50,6 +50,28 @@ partial void ProcessLogPromptResponseContent( /// public async global::System.Threading.Tasks.Task LogPromptAsync( + global::tryAGI.Humanloop.PromptLogRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await LogPromptAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Log Prompt + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> LogPromptAsResponseAsync( + global::tryAGI.Humanloop.PromptLogRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessLogPromptResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/prompts/log", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessLogPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessLogPromptResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessLogPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessLogPromptResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessLogPromptResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessLogPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessLogPromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessLogPromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessLogPromptResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.CreatePromptLogResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.CreatePromptLogResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessLogPromptResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.CreatePromptLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.CreatePromptLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.MovePrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.MovePrompt.g.cs index 4d02144..ce05e1b 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.MovePrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.MovePrompt.g.cs @@ -54,6 +54,31 @@ partial void ProcessMovePromptResponseContent( public async global::System.Threading.Tasks.Task MovePromptAsync( string id, + global::tryAGI.Humanloop.MoveRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MovePromptAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Move Prompt + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> MovePromptAsResponseAsync( + string id, + global::tryAGI.Humanloop.MoveRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessMovePromptResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessMovePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessMovePromptResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessMovePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessMovePromptResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessMovePromptResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessMovePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessMovePromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessMovePromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessMovePromptResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessMovePromptResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.PopulatePrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.PopulatePrompt.g.cs index 4499b45..e4d526f 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.PopulatePrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.PopulatePrompt.g.cs @@ -54,6 +54,31 @@ partial void ProcessPopulatePromptResponseContent( public async global::System.Threading.Tasks.Task PopulatePromptAsync( string id, + global::tryAGI.Humanloop.PopulatePromptRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await PopulatePromptAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Populate Prompt + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> PopulatePromptAsResponseAsync( + string id, + global::tryAGI.Humanloop.PopulatePromptRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessPopulatePromptResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}/populate", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessPopulatePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessPopulatePromptResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessPopulatePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessPopulatePromptResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessPopulatePromptResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessPopulatePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessPopulatePromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessPopulatePromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessPopulatePromptResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PopulatePromptResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PopulatePromptResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessPopulatePromptResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PopulatePromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PopulatePromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.RemovePromptDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.RemovePromptDeployment.g.cs index 0bd8871..01653e3 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.RemovePromptDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.RemovePromptDeployment.g.cs @@ -51,6 +51,27 @@ partial void ProcessRemovePromptDeploymentResponse( string environmentId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RemovePromptDeploymentAsResponseAsync( + id: id, + environmentId: environmentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Remove Prompt Deployment + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RemovePromptDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessRemovePromptDeploymentResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}/environments/{environmentId}", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessRemovePromptDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessRemovePromptDeploymentResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessRemovePromptDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessRemovePromptDeploymentResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessRemovePromptDeploymentResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessRemovePromptDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessRemovePromptDeploymentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessRemovePromptDeploymentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -304,6 +344,10 @@ partial void ProcessRemovePromptDeploymentResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -325,6 +369,10 @@ partial void ProcessRemovePromptDeploymentResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.SerializePrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.SerializePrompt.g.cs index ad05591..b360b05 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.SerializePrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.SerializePrompt.g.cs @@ -60,6 +60,32 @@ partial void ProcessSerializePromptResponseContent( string? environment = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SerializePromptAsResponseAsync( + id: id, + versionId: versionId, + environment: environment, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Serialize Prompt + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SerializePromptAsResponseAsync( + string id, + string? versionId = default, + string? environment = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -91,12 +117,13 @@ partial void ProcessSerializePromptResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}/serialize", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("versionId", versionId) - .AddOptionalParameter("environment", environment) + .AddOptionalParameter("environment", environment) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -170,6 +197,8 @@ partial void ProcessSerializePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -180,6 +209,11 @@ partial void ProcessSerializePromptResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -197,6 +231,8 @@ partial void ProcessSerializePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -206,8 +242,7 @@ partial void ProcessSerializePromptResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -216,6 +251,11 @@ partial void ProcessSerializePromptResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -232,14 +272,15 @@ partial void ProcessSerializePromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -279,6 +320,8 @@ partial void ProcessSerializePromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -299,6 +342,8 @@ partial void ProcessSerializePromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -323,7 +368,11 @@ partial void ProcessSerializePromptResponseContent( { __response.EnsureSuccessStatusCode(); - return __content; + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { @@ -351,7 +400,11 @@ partial void ProcessSerializePromptResponseContent( #endif ).ConfigureAwait(false); - return __content; + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __content); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.SetPromptDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.SetPromptDeployment.g.cs index 9e6891b..d372495 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.SetPromptDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.SetPromptDeployment.g.cs @@ -58,6 +58,34 @@ partial void ProcessSetPromptDeploymentResponseContent( string id, string environmentId, + global::tryAGI.Humanloop.SetDeploymentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SetPromptDeploymentAsResponseAsync( + id: id, + environmentId: environmentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Set Prompt Deployment + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SetPromptDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.SetDeploymentRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -94,6 +122,7 @@ partial void ProcessSetPromptDeploymentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}/environments/{environmentId}", baseUri: HttpClient.BaseAddress); @@ -175,6 +204,8 @@ partial void ProcessSetPromptDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +216,11 @@ partial void ProcessSetPromptDeploymentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +238,8 @@ partial void ProcessSetPromptDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +249,7 @@ partial void ProcessSetPromptDeploymentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +258,11 @@ partial void ProcessSetPromptDeploymentResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +279,15 @@ partial void ProcessSetPromptDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +327,8 @@ partial void ProcessSetPromptDeploymentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +349,8 @@ partial void ProcessSetPromptDeploymentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +375,13 @@ partial void ProcessSetPromptDeploymentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +409,13 @@ partial void ProcessSetPromptDeploymentResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpdatePromptLog.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpdatePromptLog.g.cs index 2843f30..3275f0f 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpdatePromptLog.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpdatePromptLog.g.cs @@ -58,6 +58,34 @@ partial void ProcessUpdatePromptLogResponseContent( string id, string logId, + global::tryAGI.Humanloop.PromptLogRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdatePromptLogAsResponseAsync( + id: id, + logId: logId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Prompt Log + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdatePromptLogAsResponseAsync( + string id, + string logId, + global::tryAGI.Humanloop.PromptLogRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -94,6 +122,7 @@ partial void ProcessUpdatePromptLogResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}/log/{logId}", baseUri: HttpClient.BaseAddress); @@ -175,6 +204,8 @@ partial void ProcessUpdatePromptLogResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +216,11 @@ partial void ProcessUpdatePromptLogResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +238,8 @@ partial void ProcessUpdatePromptLogResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +249,7 @@ partial void ProcessUpdatePromptLogResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +258,11 @@ partial void ProcessUpdatePromptLogResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +279,15 @@ partial void ProcessUpdatePromptLogResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +327,8 @@ partial void ProcessUpdatePromptLogResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +349,8 @@ partial void ProcessUpdatePromptLogResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +375,13 @@ partial void ProcessUpdatePromptLogResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.CreatePromptLogResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.CreatePromptLogResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +409,13 @@ partial void ProcessUpdatePromptLogResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.CreatePromptLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.CreatePromptLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpdatePromptMonitoring.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpdatePromptMonitoring.g.cs index f052843..0f30581 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpdatePromptMonitoring.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpdatePromptMonitoring.g.cs @@ -54,6 +54,31 @@ partial void ProcessUpdatePromptMonitoringResponseContent( public async global::System.Threading.Tasks.Task UpdatePromptMonitoringAsync( string id, + global::tryAGI.Humanloop.UpdateMonitoringRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdatePromptMonitoringAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Prompt Monitoring + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdatePromptMonitoringAsResponseAsync( + string id, + global::tryAGI.Humanloop.UpdateMonitoringRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessUpdatePromptMonitoringResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}/evaluators", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessUpdatePromptMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessUpdatePromptMonitoringResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessUpdatePromptMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessUpdatePromptMonitoringResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessUpdatePromptMonitoringResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessUpdatePromptMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessUpdatePromptMonitoringResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessUpdatePromptMonitoringResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessUpdatePromptMonitoringResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessUpdatePromptMonitoringResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpdatePromptVersion.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpdatePromptVersion.g.cs index 4676d27..b523053 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpdatePromptVersion.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpdatePromptVersion.g.cs @@ -58,6 +58,34 @@ partial void ProcessUpdatePromptVersionResponseContent( string id, string versionId, + global::tryAGI.Humanloop.UpdateVersionRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdatePromptVersionAsResponseAsync( + id: id, + versionId: versionId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Prompt Version + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdatePromptVersionAsResponseAsync( + string id, + string versionId, + global::tryAGI.Humanloop.UpdateVersionRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -94,6 +122,7 @@ partial void ProcessUpdatePromptVersionResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/prompts/{id}/versions/{versionId}", baseUri: HttpClient.BaseAddress); @@ -175,6 +204,8 @@ partial void ProcessUpdatePromptVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +216,11 @@ partial void ProcessUpdatePromptVersionResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +238,8 @@ partial void ProcessUpdatePromptVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +249,7 @@ partial void ProcessUpdatePromptVersionResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +258,11 @@ partial void ProcessUpdatePromptVersionResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +279,15 @@ partial void ProcessUpdatePromptVersionResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +327,8 @@ partial void ProcessUpdatePromptVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +349,8 @@ partial void ProcessUpdatePromptVersionResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +375,13 @@ partial void ProcessUpdatePromptVersionResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +409,13 @@ partial void ProcessUpdatePromptVersionResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpsertPrompt.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpsertPrompt.g.cs index 1018508..b681a9c 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpsertPrompt.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.UpsertPrompt.g.cs @@ -51,6 +51,29 @@ partial void ProcessUpsertPromptResponseContent( /// public async global::System.Threading.Tasks.Task UpsertPromptAsync( + global::tryAGI.Humanloop.PromptRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpsertPromptAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upsert Prompt
+ /// Create or update a Prompt. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpsertPromptAsResponseAsync( + global::tryAGI.Humanloop.PromptRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -85,6 +108,7 @@ partial void ProcessUpsertPromptResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/prompts", baseUri: HttpClient.BaseAddress); @@ -164,6 +188,8 @@ partial void ProcessUpsertPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -174,6 +200,11 @@ partial void ProcessUpsertPromptResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -191,6 +222,8 @@ partial void ProcessUpsertPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -200,8 +233,7 @@ partial void ProcessUpsertPromptResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -210,6 +242,11 @@ partial void ProcessUpsertPromptResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -226,14 +263,15 @@ partial void ProcessUpsertPromptResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -273,6 +311,8 @@ partial void ProcessUpsertPromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -293,6 +333,8 @@ partial void ProcessUpsertPromptResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -317,9 +359,13 @@ partial void ProcessUpsertPromptResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PromptResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -347,9 +393,13 @@ partial void ProcessUpsertPromptResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PromptResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.g.cs index ef77f28..f1353cb 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.PromptsClient.g.cs @@ -72,10 +72,10 @@ public PromptsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public PromptsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::tryAGI.Humanloop.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::tryAGI.Humanloop.AutoSDKClientOptions? options, bool disposeHttpClient = true) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.CallTool.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.CallTool.g.cs index fd49f2f..feb19e8 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.CallTool.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.CallTool.g.cs @@ -50,6 +50,28 @@ partial void ProcessCallToolResponseContent( /// public async global::System.Threading.Tasks.Task CallToolAsync( + global::tryAGI.Humanloop.CallToolRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CallToolAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Call Tool + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> CallToolAsResponseAsync( + global::tryAGI.Humanloop.CallToolRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessCallToolResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/tools/call", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessCallToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessCallToolResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessCallToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessCallToolResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessCallToolResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessCallToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessCallToolResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessCallToolResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessCallToolResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.CallToolResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.CallToolResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessCallToolResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.CallToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.CallToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.DeleteTool.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.DeleteTool.g.cs index 7279ad3..05dd93e 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.DeleteTool.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.DeleteTool.g.cs @@ -47,6 +47,24 @@ partial void ProcessDeleteToolResponse( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await DeleteToolAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Delete Tool + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteToolAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -76,6 +94,7 @@ partial void ProcessDeleteToolResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/tools/{id}", baseUri: HttpClient.BaseAddress); @@ -149,6 +168,8 @@ partial void ProcessDeleteToolResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -159,6 +180,11 @@ partial void ProcessDeleteToolResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -176,6 +202,8 @@ partial void ProcessDeleteToolResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -185,8 +213,7 @@ partial void ProcessDeleteToolResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -195,6 +222,11 @@ partial void ProcessDeleteToolResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -211,14 +243,15 @@ partial void ProcessDeleteToolResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -258,6 +291,8 @@ partial void ProcessDeleteToolResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -278,6 +313,8 @@ partial void ProcessDeleteToolResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -298,6 +335,10 @@ partial void ProcessDeleteToolResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -319,6 +360,10 @@ partial void ProcessDeleteToolResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.GetTool.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.GetTool.g.cs index d42a4a4..47b195e 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.GetTool.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.GetTool.g.cs @@ -56,6 +56,29 @@ partial void ProcessGetToolResponseContent( string? versionId = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await GetToolAsResponseAsync( + id: id, + versionId: versionId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get Tool + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> GetToolAsResponseAsync( + string id, + string? versionId = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -86,11 +109,12 @@ partial void ProcessGetToolResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/tools/{id}", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder - .AddOptionalParameter("versionId", versionId) + .AddOptionalParameter("versionId", versionId) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -163,6 +187,8 @@ partial void ProcessGetToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +199,11 @@ partial void ProcessGetToolResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +221,8 @@ partial void ProcessGetToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +232,7 @@ partial void ProcessGetToolResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +241,11 @@ partial void ProcessGetToolResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +262,15 @@ partial void ProcessGetToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +310,8 @@ partial void ProcessGetToolResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +332,8 @@ partial void ProcessGetToolResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +358,13 @@ partial void ProcessGetToolResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.ToolResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.ToolResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +392,13 @@ partial void ProcessGetToolResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.ToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.ToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.ListToolVersions.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.ListToolVersions.g.cs index f50edd4..767f543 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.ListToolVersions.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.ListToolVersions.g.cs @@ -52,6 +52,26 @@ partial void ProcessListToolVersionsResponseContent( string id, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListToolVersionsAsResponseAsync( + id: id, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Tool Versions + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task>> ListToolVersionsAsResponseAsync( + string id, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +101,7 @@ partial void ProcessListToolVersionsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/tools/{id}/versions", baseUri: HttpClient.BaseAddress); @@ -154,6 +175,8 @@ partial void ProcessListToolVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -164,6 +187,11 @@ partial void ProcessListToolVersionsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -181,6 +209,8 @@ partial void ProcessListToolVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -190,8 +220,7 @@ partial void ProcessListToolVersionsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -200,6 +229,11 @@ partial void ProcessListToolVersionsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -216,14 +250,15 @@ partial void ProcessListToolVersionsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -263,6 +298,8 @@ partial void ProcessListToolVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -283,6 +320,8 @@ partial void ProcessListToolVersionsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -307,9 +346,13 @@ partial void ProcessListToolVersionsResponseContent( { __response.EnsureSuccessStatusCode(); - return - (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? + var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -337,9 +380,13 @@ partial void ProcessListToolVersionsResponseContent( #endif ).ConfigureAwait(false); - return - (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? + var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse>( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.ListTools.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.ListTools.g.cs index 8316274..e6256eb 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.ListTools.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.ListTools.g.cs @@ -68,6 +68,38 @@ partial void ProcessListToolsResponseContent( global::tryAGI.Humanloop.ListToolsOrder? order = default, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListToolsAsResponseAsync( + page: page, + size: size, + name: name, + sortBy: sortBy, + order: order, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List Tools + /// + /// + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> ListToolsAsResponseAsync( + int? page = default, + int? size = default, + string? name = default, + string? sortBy = default, + global::tryAGI.Humanloop.ListToolsOrder? order = default, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -101,15 +133,16 @@ partial void ProcessListToolsResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/tools", - baseUri: HttpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("page", page?.ToString()) .AddOptionalParameter("size", size?.ToString()) .AddOptionalParameter("name", name) .AddOptionalParameter("sortBy", sortBy) - .AddOptionalParameter("order", order?.ToValueString()) + .AddOptionalParameter("order", order?.ToValueString()) ; var __path = __pathBuilder.ToString(); __path = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.AppendQueryParameters( @@ -185,6 +218,8 @@ partial void ProcessListToolsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -195,6 +230,11 @@ partial void ProcessListToolsResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -212,6 +252,8 @@ partial void ProcessListToolsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -221,8 +263,7 @@ partial void ProcessListToolsResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -231,6 +272,11 @@ partial void ProcessListToolsResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -247,14 +293,15 @@ partial void ProcessListToolsResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -294,6 +341,8 @@ partial void ProcessListToolsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -314,6 +363,8 @@ partial void ProcessListToolsResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -338,9 +389,13 @@ partial void ProcessListToolsResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.PaginatedToolResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.PaginatedToolResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -368,9 +423,13 @@ partial void ProcessListToolsResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.PaginatedToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.PaginatedToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.LogTool.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.LogTool.g.cs index a898218..41ae90b 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.LogTool.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.LogTool.g.cs @@ -50,6 +50,28 @@ partial void ProcessLogToolResponseContent( /// public async global::System.Threading.Tasks.Task LogToolAsync( + global::tryAGI.Humanloop.LogToolRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await LogToolAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Log Tool + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> LogToolAsResponseAsync( + global::tryAGI.Humanloop.LogToolRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessLogToolResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/tools/log", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessLogToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessLogToolResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessLogToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessLogToolResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessLogToolResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessLogToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessLogToolResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessLogToolResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessLogToolResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.CreateLogResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.CreateLogResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessLogToolResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.CreateLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.CreateLogResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.MoveTool.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.MoveTool.g.cs index 0bc57e3..28f3745 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.MoveTool.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.MoveTool.g.cs @@ -54,6 +54,31 @@ partial void ProcessMoveToolResponseContent( public async global::System.Threading.Tasks.Task MoveToolAsync( string id, + global::tryAGI.Humanloop.MoveRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await MoveToolAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Move Tool + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> MoveToolAsResponseAsync( + string id, + global::tryAGI.Humanloop.MoveRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessMoveToolResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/tools/{id}", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessMoveToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessMoveToolResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessMoveToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessMoveToolResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessMoveToolResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessMoveToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessMoveToolResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessMoveToolResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessMoveToolResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.ToolResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.ToolResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessMoveToolResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.ToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.ToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.RemoveToolDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.RemoveToolDeployment.g.cs index 6099ab2..d4bf704 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.RemoveToolDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.RemoveToolDeployment.g.cs @@ -51,6 +51,27 @@ partial void ProcessRemoveToolDeploymentResponse( string environmentId, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) + { + await RemoveToolDeploymentAsResponseAsync( + id: id, + environmentId: environmentId, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + /// + /// Remove Tool Deployment + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RemoveToolDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( client: HttpClient); @@ -81,6 +102,7 @@ partial void ProcessRemoveToolDeploymentResponse( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/tools/{id}/environments/{environmentId}", baseUri: HttpClient.BaseAddress); @@ -155,6 +177,8 @@ partial void ProcessRemoveToolDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -165,6 +189,11 @@ partial void ProcessRemoveToolDeploymentResponse( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -182,6 +211,8 @@ partial void ProcessRemoveToolDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -191,8 +222,7 @@ partial void ProcessRemoveToolDeploymentResponse( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -201,6 +231,11 @@ partial void ProcessRemoveToolDeploymentResponse( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -217,14 +252,15 @@ partial void ProcessRemoveToolDeploymentResponse( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -264,6 +300,8 @@ partial void ProcessRemoveToolDeploymentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -284,6 +322,8 @@ partial void ProcessRemoveToolDeploymentResponse( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -304,6 +344,10 @@ partial void ProcessRemoveToolDeploymentResponse( { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { @@ -325,6 +369,10 @@ partial void ProcessRemoveToolDeploymentResponse( try { __response.EnsureSuccessStatusCode(); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.SetToolDeployment.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.SetToolDeployment.g.cs index 5d5632c..3f3108b 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.SetToolDeployment.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.SetToolDeployment.g.cs @@ -58,6 +58,34 @@ partial void ProcessSetToolDeploymentResponseContent( string id, string environmentId, + global::tryAGI.Humanloop.SetDeploymentRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await SetToolDeploymentAsResponseAsync( + id: id, + environmentId: environmentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Set Tool Deployment + /// + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> SetToolDeploymentAsResponseAsync( + string id, + string environmentId, + global::tryAGI.Humanloop.SetDeploymentRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -94,6 +122,7 @@ partial void ProcessSetToolDeploymentResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/tools/{id}/environments/{environmentId}", baseUri: HttpClient.BaseAddress); @@ -175,6 +204,8 @@ partial void ProcessSetToolDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -185,6 +216,11 @@ partial void ProcessSetToolDeploymentResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -202,6 +238,8 @@ partial void ProcessSetToolDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -211,8 +249,7 @@ partial void ProcessSetToolDeploymentResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -221,6 +258,11 @@ partial void ProcessSetToolDeploymentResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -237,14 +279,15 @@ partial void ProcessSetToolDeploymentResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -284,6 +327,8 @@ partial void ProcessSetToolDeploymentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -304,6 +349,8 @@ partial void ProcessSetToolDeploymentResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -328,9 +375,13 @@ partial void ProcessSetToolDeploymentResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.ToolResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.ToolResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -358,9 +409,13 @@ partial void ProcessSetToolDeploymentResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.ToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.ToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.UpdateToolMonitoring.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.UpdateToolMonitoring.g.cs index 18cbae8..d02eff6 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.UpdateToolMonitoring.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.UpdateToolMonitoring.g.cs @@ -54,6 +54,31 @@ partial void ProcessUpdateToolMonitoringResponseContent( public async global::System.Threading.Tasks.Task UpdateToolMonitoringAsync( string id, + global::tryAGI.Humanloop.UpdateMonitoringRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpdateToolMonitoringAsResponseAsync( + id: id, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Update Tool Monitoring + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpdateToolMonitoringAsResponseAsync( + string id, + global::tryAGI.Humanloop.UpdateMonitoringRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -89,6 +114,7 @@ partial void ProcessUpdateToolMonitoringResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: $"/tools/{id}/evaluators", baseUri: HttpClient.BaseAddress); @@ -169,6 +195,8 @@ partial void ProcessUpdateToolMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -179,6 +207,11 @@ partial void ProcessUpdateToolMonitoringResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -196,6 +229,8 @@ partial void ProcessUpdateToolMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -205,8 +240,7 @@ partial void ProcessUpdateToolMonitoringResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -215,6 +249,11 @@ partial void ProcessUpdateToolMonitoringResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -231,14 +270,15 @@ partial void ProcessUpdateToolMonitoringResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -278,6 +318,8 @@ partial void ProcessUpdateToolMonitoringResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -298,6 +340,8 @@ partial void ProcessUpdateToolMonitoringResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -322,9 +366,13 @@ partial void ProcessUpdateToolMonitoringResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.ToolResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.ToolResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -352,9 +400,13 @@ partial void ProcessUpdateToolMonitoringResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.ToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.ToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.UpsertTool.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.UpsertTool.g.cs index fa93637..08d266a 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.UpsertTool.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.UpsertTool.g.cs @@ -50,6 +50,28 @@ partial void ProcessUpsertToolResponseContent( /// public async global::System.Threading.Tasks.Task UpsertToolAsync( + global::tryAGI.Humanloop.ToolRequest request, + global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await UpsertToolAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Upsert Tool + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> UpsertToolAsResponseAsync( + global::tryAGI.Humanloop.ToolRequest request, global::tryAGI.Humanloop.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) @@ -84,6 +106,7 @@ partial void ProcessUpsertToolResponseContent( global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() { + var __pathBuilder = new global::tryAGI.Humanloop.PathBuilder( path: "/tools", baseUri: HttpClient.BaseAddress); @@ -163,6 +186,8 @@ partial void ProcessUpsertToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); try { @@ -173,6 +198,11 @@ partial void ProcessUpsertToolResponseContent( } catch (global::System.Net.Http.HttpRequestException __exception) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, @@ -190,6 +220,8 @@ partial void ProcessUpsertToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); if (!__willRetry) { @@ -199,8 +231,7 @@ partial void ProcessUpsertToolResponseContent( __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -209,6 +240,11 @@ partial void ProcessUpsertToolResponseContent( __attempt < __maxAttempts && global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) { + var __retryDelay = global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( clientOptions: Options, context: global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.CreateHookContext( @@ -225,14 +261,15 @@ partial void ProcessUpsertToolResponseContent( attempt: __attempt, maxAttempts: __maxAttempts, willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); __response.Dispose(); __response = null; __httpRequest.Dispose(); __httpRequest = null; await global::tryAGI.Humanloop.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( - clientOptions: Options, - requestOptions: requestOptions, + retryDelay: __retryDelay, cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); continue; } @@ -272,6 +309,8 @@ partial void ProcessUpsertToolResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } else @@ -292,6 +331,8 @@ partial void ProcessUpsertToolResponseContent( attempt: __attemptNumber, maxAttempts: __maxAttempts, willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); } @@ -316,9 +357,13 @@ partial void ProcessUpsertToolResponseContent( { __response.EnsureSuccessStatusCode(); - return - global::tryAGI.Humanloop.ToolResponse.FromJson(__content, JsonSerializerContext) ?? + var __value = global::tryAGI.Humanloop.ToolResponse.FromJson(__content, JsonSerializerContext) ?? throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { @@ -346,9 +391,13 @@ partial void ProcessUpsertToolResponseContent( #endif ).ConfigureAwait(false); - return - await global::tryAGI.Humanloop.ToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + var __value = await global::tryAGI.Humanloop.ToolResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::tryAGI.Humanloop.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::tryAGI.Humanloop.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); } catch (global::System.Exception __ex) { diff --git a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.g.cs b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.g.cs index ce0b2f0..63aceee 100644 --- a/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.g.cs +++ b/src/libs/Humanloop/Generated/tryAGI.Humanloop.ToolsClient.g.cs @@ -72,10 +72,10 @@ public ToolsClient( /// Client-wide request defaults such as headers, query parameters, retries, and timeout. /// Dispose the HttpClient when the instance is disposed. True by default. public ToolsClient( - global::System.Net.Http.HttpClient? httpClient = null, - global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null, - global::tryAGI.Humanloop.AutoSDKClientOptions? options = null, + global::System.Net.Http.HttpClient? httpClient, + global::System.Uri? baseUri, + global::System.Collections.Generic.List? authorizations, + global::tryAGI.Humanloop.AutoSDKClientOptions? options, bool disposeHttpClient = true) {