From 97bd1ce89bf31cdda20be70a7fd06e2ced6f1d74 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 23 Oct 2024 12:38:05 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../LangSmith.AceClient.Execute.g.cs | 68 ++++++------- .../Generated/LangSmith.AceClient.g.cs | 38 ++++--- ...QueuesClient.AddRunsToAnnotationQueue.g.cs | 64 ++++++------ ...ionQueuesClient.CreateAnnotationQueue.g.cs | 68 ++++++------- ...reateIdentityAnnotationQueueRunStatus.g.cs | 68 ++++++------- ...ionQueuesClient.DeleteAnnotationQueue.g.cs | 62 ++++++------ ...esClient.DeleteRunFromAnnotationQueue.g.cs | 62 ++++++------ ...ationQueuesClient.GetAnnotationQueues.g.cs | 62 ++++++------ ...ueuesClient.GetAnnotationQueuesForRun.g.cs | 62 ++++++------ ...ueuesClient.GetRunFromAnnotationQueue.g.cs | 62 ++++++------ ...euesClient.GetSizeFromAnnotationQueue.g.cs | 62 ++++++------ ...lient.GetTotalSizeFromAnnotationQueue.g.cs | 62 ++++++------ ...ionQueuesClient.UpdateAnnotationQueue.g.cs | 68 ++++++------- ...euesClient.UpdateRunInAnnotationQueue.g.cs | 68 ++++++------- .../LangSmith.AnnotationQueuesClient.g.cs | 38 ++++--- .../LangSmith.ApiKeyClient.DeleteApiKey.g.cs | 62 ++++++------ ...piKeyClient.DeletePersonalAccessToken.g.cs | 62 ++++++------ ...LangSmith.ApiKeyClient.GenerateApiKey.g.cs | 68 ++++++------- ...KeyClient.GeneratePersonalAccessToken.g.cs | 68 ++++++------- .../LangSmith.ApiKeyClient.GetApiKeys.g.cs | 62 ++++++------ ....ApiKeyClient.GetPersonalAccessTokens.g.cs | 62 ++++++------ .../Generated/LangSmith.ApiKeyClient.g.cs | 38 ++++--- ...lient.CheckSsoEmailVerificationStatus.g.cs | 68 ++++++------- ...gSmith.AuthClient.ConfirmSsoUserEmail.g.cs | 68 ++++++------- .../LangSmith.AuthClient.GetSsoSettings.g.cs | 62 ++++++------ .../Generated/LangSmith.AuthClient.Login.g.cs | 62 ++++++------ ...angSmith.AuthClient.OauthProviderAuth.g.cs | 62 ++++++------ ...mith.AuthClient.OauthProviderCallback.g.cs | 62 ++++++------ ...gSmith.AuthClient.OauthProviderLogout.g.cs | 62 ++++++------ ...h.AuthClient.SendSsoEmailConfirmation.g.cs | 68 ++++++------- .../Generated/LangSmith.AuthClient.g.cs | 38 ++++--- ...th.BulkExportsClient.CancelBulkExport.g.cs | 68 ++++++------- ...th.BulkExportsClient.CreateBulkExport.g.cs | 68 ++++++------- ...rtsClient.CreateBulkExportDestination.g.cs | 68 ++++++------- ...Smith.BulkExportsClient.GetBulkExport.g.cs | 62 ++++++------ ...xportsClient.GetBulkExportDestination.g.cs | 62 ++++++------ ...portsClient.GetBulkExportDestinations.g.cs | 62 ++++++------ ...th.BulkExportsClient.GetBulkExportRun.g.cs | 62 ++++++------ ...h.BulkExportsClient.GetBulkExportRuns.g.cs | 62 ++++++------ ...mith.BulkExportsClient.GetBulkExports.g.cs | 62 ++++++------ .../LangSmith.BulkExportsClient.g.cs | 38 ++++--- .../LangSmith.ChartsClient.CreateChart.g.cs | 68 ++++++------- .../LangSmith.ChartsClient.CreateSection.g.cs | 68 ++++++------- .../LangSmith.ChartsClient.DeleteChart.g.cs | 62 ++++++------ .../LangSmith.ChartsClient.DeleteSection.g.cs | 62 ++++++------ ...ngSmith.ChartsClient.ReadChartPreview.g.cs | 68 ++++++------- .../LangSmith.ChartsClient.ReadCharts.g.cs | 68 ++++++------- .../LangSmith.ChartsClient.ReadSections.g.cs | 62 ++++++------ ...angSmith.ChartsClient.ReadSingleChart.g.cs | 68 ++++++------- ...gSmith.ChartsClient.ReadSingleSection.g.cs | 68 ++++++------- .../LangSmith.ChartsClient.UpdateChart.g.cs | 68 ++++++------- .../LangSmith.ChartsClient.UpdateSection.g.cs | 68 ++++++------- .../Generated/LangSmith.ChartsClient.g.cs | 38 ++++--- ...angSmith.CommentsClient.CreateComment.g.cs | 68 ++++++------- ...Smith.CommentsClient.CreateSubComment.g.cs | 68 ++++++------- .../LangSmith.CommentsClient.GetComments.g.cs | 62 ++++++------ ...ngSmith.CommentsClient.GetSubComments.g.cs | 62 ++++++------ .../LangSmith.CommentsClient.LikeComment.g.cs | 62 ++++++------ ...angSmith.CommentsClient.UnlikeComment.g.cs | 62 ++++++------ .../Generated/LangSmith.CommentsClient.g.cs | 38 ++++--- .../LangSmith.CommitsClient.CreateCommit.g.cs | 68 ++++++------- .../LangSmith.CommitsClient.GetCommit.g.cs | 62 ++++++------ .../LangSmith.CommitsClient.ListCommits.g.cs | 62 ++++++------ .../Generated/LangSmith.CommitsClient.g.cs | 38 ++++--- ...LangSmith.DatasetsClient.CloneDataset.g.cs | 68 ++++++------- ...etsClient.CreateComparativeExperiment.g.cs | 68 ++++++------- ...angSmith.DatasetsClient.CreateDataset.g.cs | 68 ++++++------- ...ngSmith.DatasetsClient.DatasetHandler.g.cs | 68 ++++++------- ...etsClient.DeleteComparativeExperiment.g.cs | 62 ++++++------ ...angSmith.DatasetsClient.DeleteDataset.g.cs | 62 ++++++------ ...th.DatasetsClient.DiffDatasetVersions.g.cs | 62 ++++++------ ...ith.DatasetsClient.DownloadDatasetCsv.g.cs | 62 ++++++------ ....DatasetsClient.DownloadDatasetOpenai.g.cs | 62 ++++++------ ...atasetsClient.DownloadDatasetOpenaiFt.g.cs | 62 ++++++------ .../LangSmith.DatasetsClient.Generate.g.cs | 68 ++++++------- ...Smith.DatasetsClient.GetDatasetSplits.g.cs | 62 ++++++------ ...mith.DatasetsClient.GetDatasetVersion.g.cs | 62 ++++++------ ...ith.DatasetsClient.GetDatasetVersions.g.cs | 62 ++++++------ ...LangSmith.DatasetsClient.GetIndexInfo.g.cs | 62 ++++++------ .../LangSmith.DatasetsClient.Index.g.cs | 68 ++++++------- ...setsClient.ReadComparativeExperiments.g.cs | 62 ++++++------ .../LangSmith.DatasetsClient.ReadDataset.g.cs | 62 ++++++------ ....DatasetsClient.ReadDatasetShareState.g.cs | 62 ++++++------ ...LangSmith.DatasetsClient.ReadDatasets.g.cs | 62 ++++++------ .../LangSmith.DatasetsClient.ReadDelta.g.cs | 68 ++++++------- ...h.DatasetsClient.ReadExamplesWithRuns.g.cs | 68 ++++++------- .../LangSmith.DatasetsClient.RemoveIndex.g.cs | 62 ++++++------ .../LangSmith.DatasetsClient.Search.g.cs | 68 ++++++------- ...LangSmith.DatasetsClient.ShareDataset.g.cs | 62 ++++++------ ...h.DatasetsClient.StreamDatasetHandler.g.cs | 68 ++++++------- ...ngSmith.DatasetsClient.UnshareDataset.g.cs | 62 ++++++------ ...angSmith.DatasetsClient.UpdateDataset.g.cs | 68 ++++++------- ...th.DatasetsClient.UpdateDatasetSplits.g.cs | 68 ++++++------- ...h.DatasetsClient.UpdateDatasetVersion.g.cs | 68 ++++++------- ...Smith.DatasetsClient.UploadCsvDataset.g.cs | 68 ++++++------- ...Smith.DatasetsClient.UploadExperiment.g.cs | 68 ++++++------- .../Generated/LangSmith.DatasetsClient.g.cs | 38 ++++--- .../LangSmith.EventsClient.CreateEvent.g.cs | 68 ++++++------- .../Generated/LangSmith.EventsClient.g.cs | 38 ++++--- ...angSmith.ExamplesClient.CountExamples.g.cs | 62 ++++++------ ...angSmith.ExamplesClient.CreateExample.g.cs | 68 ++++++------- ...ngSmith.ExamplesClient.CreateExamples.g.cs | 64 ++++++------ ...angSmith.ExamplesClient.DeleteExample.g.cs | 62 ++++++------ ...ngSmith.ExamplesClient.DeleteExamples.g.cs | 62 ++++++------ .../LangSmith.ExamplesClient.ReadExample.g.cs | 62 ++++++------ ...LangSmith.ExamplesClient.ReadExamples.g.cs | 62 ++++++------ ...angSmith.ExamplesClient.UpdateExample.g.cs | 68 ++++++------- ...ngSmith.ExamplesClient.UpdateExamples.g.cs | 64 ++++++------ ...ngSmith.ExamplesClient.UploadExamples.g.cs | 68 ++++++------- .../Generated/LangSmith.ExamplesClient.g.cs | 38 ++++--- ...ngSmith.FeedbackClient.CreateFeedback.g.cs | 68 ++++++------- ...dbackClient.CreateFeedbackIngestToken.g.cs | 68 ++++++------- ...backClient.CreateFeedbackWithTokenGet.g.cs | 62 ++++++------ ...ackClient.CreateFeedbackWithTokenPost.g.cs | 68 ++++++------- ...ngSmith.FeedbackClient.DeleteFeedback.g.cs | 62 ++++++------ ....FeedbackClient.EagerlyCreateFeedback.g.cs | 68 ++++++------- ...edbackClient.ListFeedbackIngestTokens.g.cs | 62 ++++++------ ...LangSmith.FeedbackClient.ReadFeedback.g.cs | 62 ++++++------ ...angSmith.FeedbackClient.ReadFeedbacks.g.cs | 62 ++++++------ ...ngSmith.FeedbackClient.UpdateFeedback.g.cs | 68 ++++++------- .../Generated/LangSmith.FeedbackClient.g.cs | 38 ++++--- ...gsClient.CreateFeedbackConfigEndpoint.g.cs | 68 ++++++------- ...igsClient.ListFeedbackConfigsEndpoint.g.cs | 62 ++++++------ ...gsClient.UpdateFeedbackConfigEndpoint.g.cs | 68 ++++++------- .../LangSmith.FeedbackConfigsClient.g.cs | 38 ++++--- .../Generated/LangSmith.IAceClient.g.cs | 15 +++ .../LangSmith.IAnnotationQueuesClient.g.cs | 15 +++ .../Generated/LangSmith.IApiKeyClient.g.cs | 15 +++ .../Generated/LangSmith.IAuthClient.g.cs | 15 +++ .../LangSmith.IBulkExportsClient.g.cs | 15 +++ .../Generated/LangSmith.IChartsClient.g.cs | 15 +++ .../Generated/LangSmith.ICommentsClient.g.cs | 15 +++ .../Generated/LangSmith.ICommitsClient.g.cs | 15 +++ .../Generated/LangSmith.IDatasetsClient.g.cs | 15 +++ .../Generated/LangSmith.IEventsClient.g.cs | 15 +++ .../Generated/LangSmith.IExamplesClient.g.cs | 15 +++ .../Generated/LangSmith.IFeedbackClient.g.cs | 15 +++ .../LangSmith.IFeedbackConfigsClient.g.cs | 15 +++ .../Generated/LangSmith.IInfoClient.g.cs | 15 +++ .../Generated/LangSmith.ILangSmithApi.g.cs | 15 +++ .../Generated/LangSmith.ILikesClient.g.cs | 15 +++ .../LangSmith.IModelPriceMapClient.g.cs | 15 +++ .../Generated/LangSmith.IOrgsClient.g.cs | 15 +++ .../LangSmith.IPlaygroundSettingsClient.g.cs | 15 +++ .../Generated/LangSmith.IPromptsClient.g.cs | 15 +++ .../Generated/LangSmith.IPublicClient.g.cs | 15 +++ .../Generated/LangSmith.IReposClient.g.cs | 15 +++ .../Generated/LangSmith.IRunClient.g.cs | 15 +++ .../LangSmith.IServiceAccountsClient.g.cs | 15 +++ .../Generated/LangSmith.ISettingsClient.g.cs | 15 +++ .../Generated/LangSmith.ITagsClient.g.cs | 15 +++ .../Generated/LangSmith.ITenantClient.g.cs | 15 +++ .../LangSmith.ITracerSessionsClient.g.cs | 15 +++ .../LangSmith.ITtlSettingsClient.g.cs | 15 +++ .../LangSmith.IUsageLimitsClient.g.cs | 15 +++ .../LangSmith.IWorkspacesClient.g.cs | 15 +++ .../LangSmith.InfoClient.GetServerInfo.g.cs | 62 ++++++------ .../Generated/LangSmith.InfoClient.g.cs | 38 ++++--- ...mithApi.Authorizations.ApiKeyInHeader.g.cs | 4 +- .../LangSmith.LangSmithApi.Constructors..g.cs | 9 +- .../LangSmith.LangSmithApi.Health.g.cs | 62 ++++++------ .../Generated/LangSmith.LangSmithApi.Ok.g.cs | 62 ++++++------ .../Generated/LangSmith.LangSmithApi.g.cs | 98 +++++++++++-------- .../LangSmith.LikesClient.LikeRepo.g.cs | 68 ++++++------- .../Generated/LangSmith.LikesClient.g.cs | 38 ++++--- ...delPriceMapClient.CreateNewModelPrice.g.cs | 68 ++++++------- ....ModelPriceMapClient.DeleteModelPrice.g.cs | 62 ++++++------ ...ModelPriceMapClient.ReadModelPriceMap.g.cs | 62 ++++++------ ....ModelPriceMapClient.UpdateModelPrice.g.cs | 68 ++++++------- .../LangSmith.ModelPriceMapClient.g.cs | 38 ++++--- .../Generated/LangSmith.Models.RepoTag.g.cs | 7 ++ ...lient.AddBasicAuthMembersToCurrentOrg.g.cs | 64 ++++++------ ...mith.OrgsClient.AddMemberToCurrentOrg.g.cs | 68 ++++++------- ...rgsClient.AddMembersToCurrentOrgBatch.g.cs | 64 ++++++------ ...angSmith.OrgsClient.ChangePaymentPlan.g.cs | 68 ++++++------- ...Client.ClaimPendingOrganizationInvite.g.cs | 62 ++++++------ ...reateCustomersAndGetStripeSetupIntent.g.cs | 62 ++++++------ ...ngSmith.OrgsClient.CreateOrganization.g.cs | 68 ++++++------- ...th.OrgsClient.CreateOrganizationRoles.g.cs | 68 ++++++------- ...angSmith.OrgsClient.CreateSsoSettings.g.cs | 68 ++++++------- ...sClient.DeleteCurrentOrgPendingMember.g.cs | 62 ++++++------ ...th.OrgsClient.DeleteOrganizationRoles.g.cs | 62 ++++++------ ...lient.DeletePendingOrganizationInvite.g.cs | 62 ++++++------ ...angSmith.OrgsClient.DeleteSsoSettings.g.cs | 62 ++++++------ .../LangSmith.OrgsClient.GetCompanyInfo.g.cs | 62 ++++++------ ...Smith.OrgsClient.GetCurrentOrgMembers.g.cs | 62 ++++++------ ...OrgsClient.GetCurrentOrganizationInfo.g.cs | 62 ++++++------ ...mith.OrgsClient.GetCurrentSsoSettings.g.cs | 62 ++++++------ ...OrgsClient.GetCurrentUserLoginMethods.g.cs | 62 ++++++------ .../LangSmith.OrgsClient.GetDashboard.g.cs | 62 ++++++------ ...OrgsClient.GetOrganizationBillingInfo.g.cs | 62 ++++++------ ...gSmith.OrgsClient.GetOrganizationInfo.g.cs | 62 ++++++------ ...mith.OrgsClient.ListOrganizationRoles.g.cs | 62 ++++++------ ...angSmith.OrgsClient.ListOrganizations.g.cs | 62 ++++++------ ...Client.ListPendingOrganizationInvites.g.cs | 62 ++++++------ .../LangSmith.OrgsClient.ListPermissions.g.cs | 62 ++++++------ .../LangSmith.OrgsClient.ListTtlSettings.g.cs | 62 ++++++------ ...ith.OrgsClient.OnPaymentMethodCreated.g.cs | 68 ++++++------- ...OrgsClient.RemoveMemberFromCurrentOrg.g.cs | 62 ++++++------ .../LangSmith.OrgsClient.SetCompanyInfo.g.cs | 68 ++++++------- ....OrgsClient.UpdateAllowedLoginMethods.g.cs | 68 ++++++------- ...ith.OrgsClient.UpdateCurrentOrgMember.g.cs | 68 ++++++------- ...sClient.UpdateCurrentOrganizationInfo.g.cs | 68 ++++++------- ...angSmith.OrgsClient.UpdateCurrentUser.g.cs | 68 ++++++------- ...th.OrgsClient.UpdateOrganizationRoles.g.cs | 68 ++++++------- ...angSmith.OrgsClient.UpdateSsoSettings.g.cs | 68 ++++++------- ...angSmith.OrgsClient.UpsertTtlSettings.g.cs | 68 ++++++------- .../Generated/LangSmith.OrgsClient.g.cs | 38 ++++--- ...ttingsClient.CreatePlaygroundSettings.g.cs | 68 ++++++------- ...ttingsClient.DeletePlaygroundSettings.g.cs | 62 ++++++------ ...SettingsClient.ListPlaygroundSettings.g.cs | 62 ++++++------ ...ttingsClient.UpdatePlaygroundSettings.g.cs | 68 ++++++------- .../LangSmith.PlaygroundSettingsClient.g.cs | 38 ++++--- .../LangSmith.PromptsClient.InvokePrompt.g.cs | 68 ++++++------- .../Generated/LangSmith.PromptsClient.g.cs | 38 ++++--- ...mith.PublicClient.CountSharedExamples.g.cs | 62 ++++++------ ...ent.GenerateQueryForSharedDatasetRuns.g.cs | 68 ++++++------- ...ith.PublicClient.GetMessageJsonSchema.g.cs | 62 ++++++------ .../LangSmith.PublicClient.GetSharedRun.g.cs | 62 ++++++------ ...ngSmith.PublicClient.GetSharedRunById.g.cs | 62 ++++++------ ...h.PublicClient.QuerySharedDatasetRuns.g.cs | 68 ++++++------- ...angSmith.PublicClient.QuerySharedRuns.g.cs | 68 ++++++------- ...ient.ReadSharedComparativeExperiments.g.cs | 62 ++++++------ ...gSmith.PublicClient.ReadSharedDataset.g.cs | 62 ++++++------ ...ent.ReadSharedDatasetExamplesWithRuns.g.cs | 68 ++++++------- ...ublicClient.ReadSharedDatasetFeedback.g.cs | 62 ++++++------ ...ith.PublicClient.ReadSharedDatasetRun.g.cs | 62 ++++++------ ...lient.ReadSharedDatasetTracerSessions.g.cs | 64 ++++++------ ...angSmith.PublicClient.ReadSharedDelta.g.cs | 68 ++++++------- ...Smith.PublicClient.ReadSharedExamples.g.cs | 62 ++++++------ ...mith.PublicClient.ReadSharedFeedbacks.g.cs | 62 ++++++------ ...h.PublicClient.StatsSharedDatasetRuns.g.cs | 68 ++++++------- .../Generated/LangSmith.PublicClient.g.cs | 38 ++++--- .../LangSmith.ReposClient.CreateRepo.g.cs | 68 ++++++------- .../LangSmith.ReposClient.DeleteRepo.g.cs | 62 ++++++------ .../LangSmith.ReposClient.ForkRepo.g.cs | 68 ++++++------- .../LangSmith.ReposClient.GetRepo.g.cs | 62 ++++++------ .../LangSmith.ReposClient.ListRepoTags.g.cs | 62 ++++++------ .../LangSmith.ReposClient.ListRepos.g.cs | 62 ++++++------ .../LangSmith.ReposClient.OptimizePrompt.g.cs | 68 ++++++------- .../LangSmith.ReposClient.UpdateRepo.g.cs | 68 ++++++------- .../Generated/LangSmith.ReposClient.g.cs | 38 ++++--- .../LangSmith.RunClient.BatchIngestRuns.g.cs | 68 ++++++------- .../LangSmith.RunClient.CreateRule.g.cs | 68 ++++++------- .../LangSmith.RunClient.CreateRun.g.cs | 68 ++++++------- .../LangSmith.RunClient.DeleteRule.g.cs | 62 ++++++------ ...gSmith.RunClient.GenerateQueryForRuns.g.cs | 68 ++++++------- .../LangSmith.RunClient.GroupRuns.g.cs | 70 ++++++------- .../LangSmith.RunClient.ListRuleLogs.g.cs | 62 ++++++------ .../LangSmith.RunClient.ListRules.g.cs | 62 ++++++------ ...gSmith.RunClient.MonitorTracerSession.g.cs | 68 ++++++------- ...ngSmith.RunClient.MultipartIngestRuns.g.cs | 62 ++++++------ .../LangSmith.RunClient.QueryRuns.g.cs | 68 ++++++------- .../LangSmith.RunClient.ReadRun.g.cs | 62 ++++++------ ...LangSmith.RunClient.ReadRunShareState.g.cs | 62 ++++++------ .../LangSmith.RunClient.ShareRun.g.cs | 62 ++++++------ .../LangSmith.RunClient.StatsGroupRuns.g.cs | 68 ++++++------- .../LangSmith.RunClient.StatsRuns.g.cs | 68 ++++++------- .../LangSmith.RunClient.TriggerRule.g.cs | 62 ++++++------ .../LangSmith.RunClient.TriggerRules.g.cs | 68 ++++++------- .../LangSmith.RunClient.UnshareRun.g.cs | 62 ++++++------ .../LangSmith.RunClient.UpdateRule.g.cs | 68 ++++++------- .../LangSmith.RunClient.UpdateRun.g.cs | 68 ++++++------- .../Generated/LangSmith.RunClient.g.cs | 38 ++++--- ...ceAccountsClient.CreateServiceAccount.g.cs | 68 ++++++------- ...ceAccountsClient.DeleteServiceAccount.g.cs | 62 ++++++------ ...viceAccountsClient.GetServiceAccounts.g.cs | 62 ++++++------ .../LangSmith.ServiceAccountsClient.g.cs | 38 ++++--- .../LangSmith.SettingsClient.GetSettings.g.cs | 62 ++++++------ ...gSmith.SettingsClient.SetTenantHandle.g.cs | 68 ++++++------- .../Generated/LangSmith.SettingsClient.g.cs | 38 ++++--- .../LangSmith.TagsClient.CreateTag.g.cs | 68 ++++++------- .../LangSmith.TagsClient.DeleteTag.g.cs | 62 ++++++------ .../LangSmith.TagsClient.GetTag.g.cs | 62 ++++++------ .../LangSmith.TagsClient.GetTags.g.cs | 62 ++++++------ .../LangSmith.TagsClient.UpdateTag.g.cs | 68 ++++++------- .../Generated/LangSmith.TagsClient.g.cs | 38 ++++--- .../LangSmith.TenantClient.CreateTenant.g.cs | 68 ++++++------- .../LangSmith.TenantClient.ListTenants.g.cs | 62 ++++++------ .../Generated/LangSmith.TenantClient.g.cs | 38 ++++--- ...TracerSessionsClient.CreateFilterView.g.cs | 68 ++++++------- ...cerSessionsClient.CreateTracerSession.g.cs | 68 ++++++------- ...TracerSessionsClient.DeleteFilterView.g.cs | 62 ++++++------ ...cerSessionsClient.DeleteTracerSession.g.cs | 62 ++++++------ ...erSessionsClient.DeleteTracerSessions.g.cs | 62 ++++++------ ...h.TracerSessionsClient.ReadFilterView.g.cs | 62 ++++++------ ....TracerSessionsClient.ReadFilterViews.g.cs | 62 ++++++------ ...racerSessionsClient.ReadTracerSession.g.cs | 64 ++++++------ ...acerSessionsClient.ReadTracerSessions.g.cs | 64 ++++++------ ...Client.ReadTracerSessionsRunsMetadata.g.cs | 62 ++++++------ ...TracerSessionsClient.UpdateFilterView.g.cs | 68 ++++++------- ...cerSessionsClient.UpdateTracerSession.g.cs | 68 ++++++------- .../LangSmith.TracerSessionsClient.g.cs | 38 ++++--- ...ith.TtlSettingsClient.ListTtlSettings.g.cs | 62 ++++++------ ...h.TtlSettingsClient.UpsertTtlSettings.g.cs | 68 ++++++------- .../LangSmith.TtlSettingsClient.g.cs | 38 ++++--- ...th.UsageLimitsClient.DeleteUsageLimit.g.cs | 62 ++++++------ ....UsageLimitsClient.ListOrgUsageLimits.g.cs | 62 ++++++------ ...ith.UsageLimitsClient.ListUsageLimits.g.cs | 62 ++++++------ ...th.UsageLimitsClient.UpsertUsageLimit.g.cs | 68 ++++++------- .../LangSmith.UsageLimitsClient.g.cs | 38 ++++--- ...cesClient.AddMemberToCurrentWorkspace.g.cs | 68 ++++++------- ...ent.AddMembersToCurrentWorkspaceBatch.g.cs | 64 ++++++------ ....WorkspacesClient.BulkUnshareEntities.g.cs | 68 ++++++------- ...ngSmith.WorkspacesClient.CreateTagKey.g.cs | 68 ++++++------- ...Smith.WorkspacesClient.CreateTagValue.g.cs | 68 ++++++------- ...gSmith.WorkspacesClient.CreateTagging.g.cs | 68 ++++++------- ...mith.WorkspacesClient.CreateWorkspace.g.cs | 68 ++++++------- ...esClient.DeleteCurrentWorkspaceMember.g.cs | 62 ++++++------ ...t.DeleteCurrentWorkspacePendingMember.g.cs | 62 ++++++------ ...esClient.DeletePendingWorkspaceInvite.g.cs | 62 ++++++------ ...ngSmith.WorkspacesClient.DeleteTagKey.g.cs | 62 ++++++------ ...Smith.WorkspacesClient.DeleteTagValue.g.cs | 62 ++++++------ ...gSmith.WorkspacesClient.DeleteTagging.g.cs | 62 ++++++------ ...acesClient.GetCurrentWorkspaceMembers.g.cs | 62 ++++++------ ...spacesClient.GetCurrentWorkspaceStats.g.cs | 62 ++++++------ ...nt.GetCurrentWorkspaceUsageLimitsInfo.g.cs | 62 ++++++------ ...mith.WorkspacesClient.GetSharedTokens.g.cs | 62 ++++++------ .../LangSmith.WorkspacesClient.GetTagKey.g.cs | 62 ++++++------ ...angSmith.WorkspacesClient.GetTagValue.g.cs | 62 ++++++------ ...cesClient.ListCurrentWorkspaceSecrets.g.cs | 62 ++++++------ ...cesClient.ListPendingWorkspaceInvites.g.cs | 62 ++++++------ ...angSmith.WorkspacesClient.ListTagKeys.g.cs | 62 ++++++------ ...gSmith.WorkspacesClient.ListTagValues.g.cs | 62 ++++++------ ...ngSmith.WorkspacesClient.ListTaggings.g.cs | 62 ++++++------ .../LangSmith.WorkspacesClient.ListTags.g.cs | 62 ++++++------ ....WorkspacesClient.ListTagsForResource.g.cs | 62 ++++++------ ...Smith.WorkspacesClient.ListWorkspaces.g.cs | 62 ++++++------ ...cesClient.PatchCurrentWorkspaceMember.g.cs | 68 ++++++------- ...Smith.WorkspacesClient.PatchWorkspace.g.cs | 68 ++++++------- ...ngSmith.WorkspacesClient.UpdateTagKey.g.cs | 68 ++++++------- ...Smith.WorkspacesClient.UpdateTagValue.g.cs | 68 ++++++------- ...sClient.UpsertCurrentWorkspaceSecrets.g.cs | 64 ++++++------ .../Generated/LangSmith.WorkspacesClient.g.cs | 38 ++++--- src/libs/LangSmith/openapi.yaml | 4 + 335 files changed, 10008 insertions(+), 9097 deletions(-) diff --git a/src/libs/LangSmith/Generated/LangSmith.AceClient.Execute.g.cs b/src/libs/LangSmith/Generated/LangSmith.AceClient.Execute.g.cs index 1da9aec4..1e1abfa8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AceClient.Execute.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AceClient.Execute.g.cs @@ -35,32 +35,32 @@ partial void ProcessExecuteResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareExecuteArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/ace/execute", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessExecuteResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareExecuteRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessExecuteResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessExecuteResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -126,14 +126,14 @@ partial void ProcessExecuteResponseContent( string code, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.BodyExecuteApiV1AceExecutePost + var __request = new global::LangSmith.BodyExecuteApiV1AceExecutePost { Args = args, Code = code, }; return await ExecuteAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.AceClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.AceClient.g.cs index 25cad6f8..d873e21a 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AceClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AceClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class AceClient : global::LangSmith.IAceClient, global::Sy /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class AceClient : global::LangSmith.IAceClient, global::Sy /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public AceClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.AddRunsToAnnotationQueue.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.AddRunsToAnnotationQueue.g.cs index c0967c0f..e385a146 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.AddRunsToAnnotationQueue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.AddRunsToAnnotationQueue.g.cs @@ -38,33 +38,33 @@ partial void ProcessAddRunsToAnnotationQueueResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareAddRunsToAnnotationQueueArguments( - httpClient: _httpClient, + httpClient: HttpClient, queueId: ref queueId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/annotation-queues/{queueId}/runs", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); @@ -72,47 +72,47 @@ partial void ProcessAddRunsToAnnotationQueueResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareAddRunsToAnnotationQueueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, queueId: queueId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessAddRunsToAnnotationQueueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessAddRunsToAnnotationQueueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.CreateAnnotationQueue.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.CreateAnnotationQueue.g.cs index f3fbad2a..5125c6d5 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.CreateAnnotationQueue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.CreateAnnotationQueue.g.cs @@ -34,32 +34,32 @@ partial void ProcessCreateAnnotationQueueResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateAnnotationQueueArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/annotation-queues", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessCreateAnnotationQueueResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateAnnotationQueueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateAnnotationQueueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateAnnotationQueueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -146,7 +146,7 @@ partial void ProcessCreateAnnotationQueueResponseContent( global::System.Guid? id = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.AnnotationQueueCreateSchema + var __request = new global::LangSmith.AnnotationQueueCreateSchema { Name = name, Description = description, @@ -160,7 +160,7 @@ partial void ProcessCreateAnnotationQueueResponseContent( }; return await CreateAnnotationQueueAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.CreateIdentityAnnotationQueueRunStatus.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.CreateIdentityAnnotationQueueRunStatus.g.cs index 83d51d0b..dc636ccf 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.CreateIdentityAnnotationQueueRunStatus.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.CreateIdentityAnnotationQueueRunStatus.g.cs @@ -38,33 +38,33 @@ partial void ProcessCreateIdentityAnnotationQueueRunStatusResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateIdentityAnnotationQueueRunStatusArguments( - httpClient: _httpClient, + httpClient: HttpClient, annotationQueueRunId: ref annotationQueueRunId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/annotation-queues/status/{annotationQueueRunId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -72,47 +72,47 @@ partial void ProcessCreateIdentityAnnotationQueueRunStatusResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateIdentityAnnotationQueueRunStatusRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, annotationQueueRunId: annotationQueueRunId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateIdentityAnnotationQueueRunStatusResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateIdentityAnnotationQueueRunStatusResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -132,7 +132,7 @@ partial void ProcessCreateIdentityAnnotationQueueRunStatusResponseContent( global::System.DateTime? overrideAddedAt = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.IdentityAnnotationQueueRunStatusCreateSchema + var __request = new global::LangSmith.IdentityAnnotationQueueRunStatusCreateSchema { Status = status, OverrideAddedAt = overrideAddedAt, @@ -140,7 +140,7 @@ partial void ProcessCreateIdentityAnnotationQueueRunStatusResponseContent( return await CreateIdentityAnnotationQueueRunStatusAsync( annotationQueueRunId: annotationQueueRunId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.DeleteAnnotationQueue.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.DeleteAnnotationQueue.g.cs index 30039670..b7d2a803 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.DeleteAnnotationQueue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.DeleteAnnotationQueue.g.cs @@ -32,73 +32,73 @@ partial void ProcessDeleteAnnotationQueueResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteAnnotationQueueArguments( - httpClient: _httpClient, + httpClient: HttpClient, queueId: ref queueId); var __pathBuilder = new PathBuilder( path: $"/api/v1/annotation-queues/{queueId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteAnnotationQueueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, queueId: queueId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteAnnotationQueueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteAnnotationQueueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.DeleteRunFromAnnotationQueue.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.DeleteRunFromAnnotationQueue.g.cs index a9b4476b..6d847fd7 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.DeleteRunFromAnnotationQueue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.DeleteRunFromAnnotationQueue.g.cs @@ -36,75 +36,75 @@ partial void ProcessDeleteRunFromAnnotationQueueResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteRunFromAnnotationQueueArguments( - httpClient: _httpClient, + httpClient: HttpClient, queueId: ref queueId, queueRunId: ref queueRunId); var __pathBuilder = new PathBuilder( path: $"/api/v1/annotation-queues/{queueId}/runs/{queueRunId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteRunFromAnnotationQueueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, queueId: queueId, queueRunId: queueRunId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteRunFromAnnotationQueueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteRunFromAnnotationQueueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetAnnotationQueues.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetAnnotationQueues.g.cs index 4d0d435f..4dd92fe8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetAnnotationQueues.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetAnnotationQueues.g.cs @@ -56,9 +56,9 @@ partial void ProcessGetAnnotationQueuesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetAnnotationQueuesArguments( - httpClient: _httpClient, + httpClient: HttpClient, ids: ids, name: ref name, nameContains: ref nameContains, @@ -68,7 +68,7 @@ partial void ProcessGetAnnotationQueuesResponseContent( var __pathBuilder = new PathBuilder( path: "/api/v1/annotation-queues", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("ids", ids, selector: static x => x.ToString(), delimiter: ",", explode: true) .AddOptionalParameter("name", name) @@ -78,32 +78,32 @@ partial void ProcessGetAnnotationQueuesResponseContent( .AddOptionalParameter("tag_value_id", tagValueId, selector: static x => x.ToString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetAnnotationQueuesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, ids: ids, name: name, nameContains: nameContains, @@ -111,36 +111,36 @@ partial void ProcessGetAnnotationQueuesResponseContent( limit: limit, tagValueId: tagValueId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetAnnotationQueuesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetAnnotationQueuesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetAnnotationQueuesForRun.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetAnnotationQueuesForRun.g.cs index 7c8841b4..1ccab987 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetAnnotationQueuesForRun.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetAnnotationQueuesForRun.g.cs @@ -32,73 +32,73 @@ partial void ProcessGetAnnotationQueuesForRunResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetAnnotationQueuesForRunArguments( - httpClient: _httpClient, + httpClient: HttpClient, runId: ref runId); var __pathBuilder = new PathBuilder( path: $"/api/v1/annotation-queues/{runId}/queues", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetAnnotationQueuesForRunRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, runId: runId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetAnnotationQueuesForRunResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetAnnotationQueuesForRunResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetRunFromAnnotationQueue.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetRunFromAnnotationQueue.g.cs index f0de9222..195effb9 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetRunFromAnnotationQueue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetRunFromAnnotationQueue.g.cs @@ -36,75 +36,75 @@ partial void ProcessGetRunFromAnnotationQueueResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetRunFromAnnotationQueueArguments( - httpClient: _httpClient, + httpClient: HttpClient, queueId: ref queueId, index: ref index); var __pathBuilder = new PathBuilder( path: $"/api/v1/annotation-queues/{queueId}/run/{index}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetRunFromAnnotationQueueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, queueId: queueId, index: index); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetRunFromAnnotationQueueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetRunFromAnnotationQueueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetSizeFromAnnotationQueue.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetSizeFromAnnotationQueue.g.cs index 57881ca9..e2117583 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetSizeFromAnnotationQueue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetSizeFromAnnotationQueue.g.cs @@ -32,73 +32,73 @@ partial void ProcessGetSizeFromAnnotationQueueResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetSizeFromAnnotationQueueArguments( - httpClient: _httpClient, + httpClient: HttpClient, queueId: ref queueId); var __pathBuilder = new PathBuilder( path: $"/api/v1/annotation-queues/{queueId}/size", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetSizeFromAnnotationQueueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, queueId: queueId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetSizeFromAnnotationQueueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetSizeFromAnnotationQueueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetTotalSizeFromAnnotationQueue.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetTotalSizeFromAnnotationQueue.g.cs index 0c66837b..b3c3c281 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetTotalSizeFromAnnotationQueue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.GetTotalSizeFromAnnotationQueue.g.cs @@ -32,73 +32,73 @@ partial void ProcessGetTotalSizeFromAnnotationQueueResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetTotalSizeFromAnnotationQueueArguments( - httpClient: _httpClient, + httpClient: HttpClient, queueId: ref queueId); var __pathBuilder = new PathBuilder( path: $"/api/v1/annotation-queues/{queueId}/total_size", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetTotalSizeFromAnnotationQueueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, queueId: queueId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetTotalSizeFromAnnotationQueueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetTotalSizeFromAnnotationQueueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.UpdateAnnotationQueue.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.UpdateAnnotationQueue.g.cs index d02a02e1..262c21c6 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.UpdateAnnotationQueue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.UpdateAnnotationQueue.g.cs @@ -38,33 +38,33 @@ partial void ProcessUpdateAnnotationQueueResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateAnnotationQueueArguments( - httpClient: _httpClient, + httpClient: HttpClient, queueId: ref queueId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/annotation-queues/{queueId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -72,47 +72,47 @@ partial void ProcessUpdateAnnotationQueueResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateAnnotationQueueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, queueId: queueId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateAnnotationQueueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateAnnotationQueueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -144,7 +144,7 @@ partial void ProcessUpdateAnnotationQueueResponseContent( int? reservationMinutes = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.AnnotationQueueUpdateSchema + var __request = new global::LangSmith.AnnotationQueueUpdateSchema { Name = name, Description = description, @@ -156,7 +156,7 @@ partial void ProcessUpdateAnnotationQueueResponseContent( return await UpdateAnnotationQueueAsync( queueId: queueId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.UpdateRunInAnnotationQueue.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.UpdateRunInAnnotationQueue.g.cs index 9a98fe8c..593341dd 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.UpdateRunInAnnotationQueue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.UpdateRunInAnnotationQueue.g.cs @@ -42,34 +42,34 @@ partial void ProcessUpdateRunInAnnotationQueueResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateRunInAnnotationQueueArguments( - httpClient: _httpClient, + httpClient: HttpClient, queueId: ref queueId, queueRunId: ref queueRunId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/annotation-queues/{queueId}/runs/{queueRunId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -77,48 +77,48 @@ partial void ProcessUpdateRunInAnnotationQueueResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateRunInAnnotationQueueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, queueId: queueId, queueRunId: queueRunId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateRunInAnnotationQueueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateRunInAnnotationQueueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -140,7 +140,7 @@ partial void ProcessUpdateRunInAnnotationQueueResponseContent( global::System.DateTime? addedAt = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.AnnotationQueueRunUpdateSchema + var __request = new global::LangSmith.AnnotationQueueRunUpdateSchema { LastReviewedTime = lastReviewedTime, AddedAt = addedAt, @@ -149,7 +149,7 @@ partial void ProcessUpdateRunInAnnotationQueueResponseContent( return await UpdateRunInAnnotationQueueAsync( queueId: queueId, queueRunId: queueRunId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.g.cs index b7d55a3e..b87e0a57 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AnnotationQueuesClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class AnnotationQueuesClient : global::LangSmith.IAnnotati /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class AnnotationQueuesClient : global::LangSmith.IAnnotati /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public AnnotationQueuesClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.DeleteApiKey.g.cs b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.DeleteApiKey.g.cs index cee89a67..992174c4 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.DeleteApiKey.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.DeleteApiKey.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteApiKeyResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteApiKeyArguments( - httpClient: _httpClient, + httpClient: HttpClient, apiKeyId: ref apiKeyId); var __pathBuilder = new PathBuilder( path: $"/api/v1/api-key/{apiKeyId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteApiKeyRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, apiKeyId: apiKeyId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteApiKeyResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteApiKeyResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.DeletePersonalAccessToken.g.cs b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.DeletePersonalAccessToken.g.cs index 3b63af41..15c65a3d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.DeletePersonalAccessToken.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.DeletePersonalAccessToken.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeletePersonalAccessTokenResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeletePersonalAccessTokenArguments( - httpClient: _httpClient, + httpClient: HttpClient, patId: ref patId); var __pathBuilder = new PathBuilder( path: $"/api/v1/api-key/current/{patId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeletePersonalAccessTokenRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, patId: patId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeletePersonalAccessTokenResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeletePersonalAccessTokenResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GenerateApiKey.g.cs b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GenerateApiKey.g.cs index fa45fe1b..9def4106 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GenerateApiKey.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GenerateApiKey.g.cs @@ -35,32 +35,32 @@ partial void ProcessGenerateApiKeyResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGenerateApiKeyArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/api-key", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessGenerateApiKeyResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGenerateApiKeyRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGenerateApiKeyResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGenerateApiKeyResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -132,14 +132,14 @@ partial void ProcessGenerateApiKeyResponseContent( bool? readOnly = false, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.APIKeyCreateRequest + var __request = new global::LangSmith.APIKeyCreateRequest { Description = description, ReadOnly = readOnly, }; return await GenerateApiKeyAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GeneratePersonalAccessToken.g.cs b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GeneratePersonalAccessToken.g.cs index f4b1a9c7..8ed3fc71 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GeneratePersonalAccessToken.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GeneratePersonalAccessToken.g.cs @@ -35,32 +35,32 @@ partial void ProcessGeneratePersonalAccessTokenResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGeneratePersonalAccessTokenArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/api-key/current", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessGeneratePersonalAccessTokenResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGeneratePersonalAccessTokenRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGeneratePersonalAccessTokenResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGeneratePersonalAccessTokenResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -132,14 +132,14 @@ partial void ProcessGeneratePersonalAccessTokenResponseContent( bool? readOnly = false, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.APIKeyCreateRequest + var __request = new global::LangSmith.APIKeyCreateRequest { Description = description, ReadOnly = readOnly, }; return await GeneratePersonalAccessTokenAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GetApiKeys.g.cs b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GetApiKeys.g.cs index ad2c1255..c8daa128 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GetApiKeys.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GetApiKeys.g.cs @@ -29,71 +29,71 @@ partial void ProcessGetApiKeysResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetApiKeysArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/api-key", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetApiKeysRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetApiKeysResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetApiKeysResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GetPersonalAccessTokens.g.cs b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GetPersonalAccessTokens.g.cs index 56ce7735..254471a5 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GetPersonalAccessTokens.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.GetPersonalAccessTokens.g.cs @@ -29,71 +29,71 @@ partial void ProcessGetPersonalAccessTokensResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetPersonalAccessTokensArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/api-key/current", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetPersonalAccessTokensRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetPersonalAccessTokensResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetPersonalAccessTokensResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.g.cs index 2401dac8..82d282f5 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ApiKeyClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class ApiKeyClient : global::LangSmith.IApiKeyClient, glob /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class ApiKeyClient : global::LangSmith.IApiKeyClient, glob /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public ApiKeyClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.AuthClient.CheckSsoEmailVerificationStatus.g.cs b/src/libs/LangSmith/Generated/LangSmith.AuthClient.CheckSsoEmailVerificationStatus.g.cs index 37a07f8c..5773746a 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AuthClient.CheckSsoEmailVerificationStatus.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AuthClient.CheckSsoEmailVerificationStatus.g.cs @@ -35,32 +35,32 @@ partial void ProcessCheckSsoEmailVerificationStatusResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCheckSsoEmailVerificationStatusArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/sso/email-verification/status", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCheckSsoEmailVerificationStatusResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCheckSsoEmailVerificationStatusRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCheckSsoEmailVerificationStatusResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCheckSsoEmailVerificationStatusResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -128,14 +128,14 @@ partial void ProcessCheckSsoEmailVerificationStatusResponseContent( global::System.Guid samlProviderId, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.SSOEmailVerificationStatusRequest + var __request = new global::LangSmith.SSOEmailVerificationStatusRequest { Email = email, SamlProviderId = samlProviderId, }; return await CheckSsoEmailVerificationStatusAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.AuthClient.ConfirmSsoUserEmail.g.cs b/src/libs/LangSmith/Generated/LangSmith.AuthClient.ConfirmSsoUserEmail.g.cs index 4cd68e28..12cbe732 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AuthClient.ConfirmSsoUserEmail.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AuthClient.ConfirmSsoUserEmail.g.cs @@ -35,32 +35,32 @@ partial void ProcessConfirmSsoUserEmailResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareConfirmSsoUserEmailArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/sso/email-verification/confirm", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessConfirmSsoUserEmailResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareConfirmSsoUserEmailRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessConfirmSsoUserEmailResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessConfirmSsoUserEmailResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -124,13 +124,13 @@ partial void ProcessConfirmSsoUserEmailResponseContent( string token, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.SSOConfirmEmailRequest + var __request = new global::LangSmith.SSOConfirmEmailRequest { Token = token, }; return await ConfirmSsoUserEmailAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.AuthClient.GetSsoSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.AuthClient.GetSsoSettings.g.cs index 52eb08d2..4cc5a8b8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AuthClient.GetSsoSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AuthClient.GetSsoSettings.g.cs @@ -33,73 +33,73 @@ partial void ProcessGetSsoSettingsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetSsoSettingsArguments( - httpClient: _httpClient, + httpClient: HttpClient, ssoLoginSlug: ref ssoLoginSlug); var __pathBuilder = new PathBuilder( path: $"/api/v1/sso/settings/{ssoLoginSlug}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetSsoSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, ssoLoginSlug: ssoLoginSlug); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetSsoSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetSsoSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.AuthClient.Login.g.cs b/src/libs/LangSmith/Generated/LangSmith.AuthClient.Login.g.cs index d96582a3..20c4bb44 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AuthClient.Login.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AuthClient.Login.g.cs @@ -28,71 +28,71 @@ partial void ProcessLoginResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareLoginArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/login", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareLoginRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessLoginResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessLoginResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.AuthClient.OauthProviderAuth.g.cs b/src/libs/LangSmith/Generated/LangSmith.AuthClient.OauthProviderAuth.g.cs index ed5204b4..36978f7a 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AuthClient.OauthProviderAuth.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AuthClient.OauthProviderAuth.g.cs @@ -32,73 +32,73 @@ partial void ProcessOauthProviderAuthResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareOauthProviderAuthArguments( - httpClient: _httpClient, + httpClient: HttpClient, provider: ref provider); var __pathBuilder = new PathBuilder( path: $"/api/v1/oauth/{provider}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareOauthProviderAuthRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, provider: provider); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessOauthProviderAuthResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessOauthProviderAuthResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.AuthClient.OauthProviderCallback.g.cs b/src/libs/LangSmith/Generated/LangSmith.AuthClient.OauthProviderCallback.g.cs index f7c2c555..cc926338 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AuthClient.OauthProviderCallback.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AuthClient.OauthProviderCallback.g.cs @@ -32,73 +32,73 @@ partial void ProcessOauthProviderCallbackResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareOauthProviderCallbackArguments( - httpClient: _httpClient, + httpClient: HttpClient, provider: ref provider); var __pathBuilder = new PathBuilder( path: $"/api/v1/oauth/{provider}/callback", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareOauthProviderCallbackRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, provider: provider); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessOauthProviderCallbackResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessOauthProviderCallbackResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.AuthClient.OauthProviderLogout.g.cs b/src/libs/LangSmith/Generated/LangSmith.AuthClient.OauthProviderLogout.g.cs index f97ecfef..661902cd 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AuthClient.OauthProviderLogout.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AuthClient.OauthProviderLogout.g.cs @@ -32,73 +32,73 @@ partial void ProcessOauthProviderLogoutResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareOauthProviderLogoutArguments( - httpClient: _httpClient, + httpClient: HttpClient, provider: ref provider); var __pathBuilder = new PathBuilder( path: $"/api/v1/oauth/{provider}/logout", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareOauthProviderLogoutRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, provider: provider); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessOauthProviderLogoutResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessOauthProviderLogoutResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.AuthClient.SendSsoEmailConfirmation.g.cs b/src/libs/LangSmith/Generated/LangSmith.AuthClient.SendSsoEmailConfirmation.g.cs index 44712ec4..38b28a24 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AuthClient.SendSsoEmailConfirmation.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AuthClient.SendSsoEmailConfirmation.g.cs @@ -35,32 +35,32 @@ partial void ProcessSendSsoEmailConfirmationResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareSendSsoEmailConfirmationArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/sso/email-verification/send", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessSendSsoEmailConfirmationResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareSendSsoEmailConfirmationRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessSendSsoEmailConfirmationResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessSendSsoEmailConfirmationResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -126,14 +126,14 @@ partial void ProcessSendSsoEmailConfirmationResponseContent( global::System.Guid samlProviderId, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.SSOEmailVerificationSendRequest + var __request = new global::LangSmith.SSOEmailVerificationSendRequest { Email = email, SamlProviderId = samlProviderId, }; return await SendSsoEmailConfirmationAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.AuthClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.AuthClient.g.cs index ae20df4f..4d7d657f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.AuthClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.AuthClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class AuthClient : global::LangSmith.IAuthClient, global:: /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class AuthClient : global::LangSmith.IAuthClient, global:: /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public AuthClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.CancelBulkExport.g.cs b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.CancelBulkExport.g.cs index 2ffd7f1e..166ef6fe 100644 --- a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.CancelBulkExport.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.CancelBulkExport.g.cs @@ -39,33 +39,33 @@ partial void ProcessCancelBulkExportResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCancelBulkExportArguments( - httpClient: _httpClient, + httpClient: HttpClient, bulkExportId: ref bulkExportId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/bulk-exports/{bulkExportId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessCancelBulkExportResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCancelBulkExportRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, bulkExportId: bulkExportId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCancelBulkExportResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCancelBulkExportResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -134,14 +134,14 @@ partial void ProcessCancelBulkExportResponseContent( global::LangSmith.BulkExportUpdateStatus status = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.BulkExportUpdate + var __request = new global::LangSmith.BulkExportUpdate { Status = status, }; return await CancelBulkExportAsync( bulkExportId: bulkExportId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.CreateBulkExport.g.cs b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.CreateBulkExport.g.cs index 782fabfe..8c2e655a 100644 --- a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.CreateBulkExport.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.CreateBulkExport.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateBulkExportResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateBulkExportArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/bulk-exports", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateBulkExportResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateBulkExportRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateBulkExportResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateBulkExportResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -136,7 +136,7 @@ partial void ProcessCreateBulkExportResponseContent( global::LangSmith.BulkExportCompression? compression = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.BulkExportCreate + var __request = new global::LangSmith.BulkExportCreate { BulkExportDestinationId = bulkExportDestinationId, SessionId = sessionId, @@ -147,7 +147,7 @@ partial void ProcessCreateBulkExportResponseContent( }; return await CreateBulkExportAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.CreateBulkExportDestination.g.cs b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.CreateBulkExportDestination.g.cs index a9295e13..020e9aef 100644 --- a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.CreateBulkExportDestination.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.CreateBulkExportDestination.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateBulkExportDestinationResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateBulkExportDestinationArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/bulk-exports/destinations", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateBulkExportDestinationResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateBulkExportDestinationRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateBulkExportDestinationResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateBulkExportDestinationResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -132,7 +132,7 @@ partial void ProcessCreateBulkExportDestinationResponseContent( global::LangSmith.BulkExportDestinationType? destinationType = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.BulkExportDestinationCreate + var __request = new global::LangSmith.BulkExportDestinationCreate { DestinationType = destinationType, DisplayName = displayName, @@ -141,7 +141,7 @@ partial void ProcessCreateBulkExportDestinationResponseContent( }; return await CreateBulkExportDestinationAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExport.g.cs b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExport.g.cs index 0e5b8d12..33bd1974 100644 --- a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExport.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExport.g.cs @@ -33,73 +33,73 @@ partial void ProcessGetBulkExportResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetBulkExportArguments( - httpClient: _httpClient, + httpClient: HttpClient, bulkExportId: ref bulkExportId); var __pathBuilder = new PathBuilder( path: $"/api/v1/bulk-exports/{bulkExportId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetBulkExportRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, bulkExportId: bulkExportId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetBulkExportResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetBulkExportResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportDestination.g.cs b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportDestination.g.cs index f03dcba2..e217d7c2 100644 --- a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportDestination.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportDestination.g.cs @@ -33,73 +33,73 @@ partial void ProcessGetBulkExportDestinationResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetBulkExportDestinationArguments( - httpClient: _httpClient, + httpClient: HttpClient, destinationId: ref destinationId); var __pathBuilder = new PathBuilder( path: $"/api/v1/bulk-exports/destinations/{destinationId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetBulkExportDestinationRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, destinationId: destinationId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetBulkExportDestinationResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetBulkExportDestinationResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportDestinations.g.cs b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportDestinations.g.cs index e3d3df17..beddbaaa 100644 --- a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportDestinations.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportDestinations.g.cs @@ -29,71 +29,71 @@ partial void ProcessGetBulkExportDestinationsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetBulkExportDestinationsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/bulk-exports/destinations", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetBulkExportDestinationsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetBulkExportDestinationsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetBulkExportDestinationsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportRun.g.cs b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportRun.g.cs index 75749c00..26110a45 100644 --- a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportRun.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportRun.g.cs @@ -37,75 +37,75 @@ partial void ProcessGetBulkExportRunResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetBulkExportRunArguments( - httpClient: _httpClient, + httpClient: HttpClient, bulkExportId: ref bulkExportId, runId: ref runId); var __pathBuilder = new PathBuilder( path: $"/api/v1/bulk-exports/{bulkExportId}/runs/{runId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetBulkExportRunRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, bulkExportId: bulkExportId, runId: runId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetBulkExportRunResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetBulkExportRunResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportRuns.g.cs index d08dc0c6..1063a7b5 100644 --- a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExportRuns.g.cs @@ -33,73 +33,73 @@ partial void ProcessGetBulkExportRunsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetBulkExportRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, bulkExportId: ref bulkExportId); var __pathBuilder = new PathBuilder( path: $"/api/v1/bulk-exports/{bulkExportId}/runs", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetBulkExportRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, bulkExportId: bulkExportId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetBulkExportRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetBulkExportRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExports.g.cs b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExports.g.cs index 71fcbc2e..9e9679ad 100644 --- a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExports.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.GetBulkExports.g.cs @@ -29,71 +29,71 @@ partial void ProcessGetBulkExportsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetBulkExportsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/bulk-exports", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetBulkExportsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetBulkExportsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetBulkExportsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.g.cs index a3171305..2b94be49 100644 --- a/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.BulkExportsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class BulkExportsClient : global::LangSmith.IBulkExportsCl /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class BulkExportsClient : global::LangSmith.IBulkExportsCl /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public BulkExportsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.CreateChart.g.cs b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.CreateChart.g.cs index 267435aa..6bc94611 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.CreateChart.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.CreateChart.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateChartResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateChartArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/charts/create", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateChartResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateChartRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateChartResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateChartResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -142,7 +142,7 @@ partial void ProcessCreateChartResponseContent( global::LangSmith.CustomChartSeriesFilters? commonFilters = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CustomChartCreate + var __request = new global::LangSmith.CustomChartCreate { Title = title, Description = description, @@ -155,7 +155,7 @@ partial void ProcessCreateChartResponseContent( }; return await CreateChartAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.CreateSection.g.cs b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.CreateSection.g.cs index 17a9324e..ad4a8e37 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.CreateSection.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.CreateSection.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateSectionResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateSectionArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/charts/section", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateSectionResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateSectionRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateSectionResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateSectionResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -130,7 +130,7 @@ partial void ProcessCreateSectionResponseContent( int? index = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CustomChartsSectionCreate + var __request = new global::LangSmith.CustomChartsSectionCreate { Title = title, Description = description, @@ -138,7 +138,7 @@ partial void ProcessCreateSectionResponseContent( }; return await CreateSectionAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.DeleteChart.g.cs b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.DeleteChart.g.cs index 357ab865..16484739 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.DeleteChart.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.DeleteChart.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteChartResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteChartArguments( - httpClient: _httpClient, + httpClient: HttpClient, chartId: ref chartId); var __pathBuilder = new PathBuilder( path: $"/api/v1/charts/{chartId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteChartRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, chartId: chartId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteChartResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteChartResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.DeleteSection.g.cs b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.DeleteSection.g.cs index 9bb828dc..4ab37908 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.DeleteSection.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.DeleteSection.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteSectionResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteSectionArguments( - httpClient: _httpClient, + httpClient: HttpClient, sectionId: ref sectionId); var __pathBuilder = new PathBuilder( path: $"/api/v1/charts/section/{sectionId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteSectionRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sectionId: sectionId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteSectionResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteSectionResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreview.g.cs b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreview.g.cs index 82480f80..2d0593e3 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreview.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadChartPreview.g.cs @@ -35,32 +35,32 @@ partial void ProcessReadChartPreviewResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadChartPreviewArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/charts/preview", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessReadChartPreviewResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadChartPreviewRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadChartPreviewResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadChartPreviewResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -128,14 +128,14 @@ partial void ProcessReadChartPreviewResponseContent( global::LangSmith.CustomChartCreatePreview chart, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CustomChartPreviewRequest + var __request = new global::LangSmith.CustomChartPreviewRequest { BucketInfo = bucketInfo, Chart = chart, }; return await ReadChartPreviewAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadCharts.g.cs b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadCharts.g.cs index 6f0612a0..3ade3120 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadCharts.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadCharts.g.cs @@ -35,32 +35,32 @@ partial void ProcessReadChartsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadChartsArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/charts", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessReadChartsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadChartsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadChartsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadChartsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -140,7 +140,7 @@ partial void ProcessReadChartsResponseContent( global::System.Collections.Generic.IList? tagValueId = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CustomChartsRequest + var __request = new global::LangSmith.CustomChartsRequest { Timezone = timezone, StartTime = startTime, @@ -151,7 +151,7 @@ partial void ProcessReadChartsResponseContent( }; return await ReadChartsAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadSections.g.cs b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadSections.g.cs index 1fa2f6cf..69191bd8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadSections.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadSections.g.cs @@ -65,9 +65,9 @@ partial void ProcessReadSectionsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadSectionsArguments( - httpClient: _httpClient, + httpClient: HttpClient, limit: ref limit, offset: ref offset, titleContains: ref titleContains, @@ -78,7 +78,7 @@ partial void ProcessReadSectionsResponseContent( var __pathBuilder = new PathBuilder( path: "/api/v1/charts/section", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("offset", offset?.ToString()) @@ -89,32 +89,32 @@ partial void ProcessReadSectionsResponseContent( .AddOptionalParameter("tag_value_id", tagValueId, selector: static x => x.ToString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadSectionsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, limit: limit, offset: offset, titleContains: titleContains, @@ -123,36 +123,36 @@ partial void ProcessReadSectionsResponseContent( sortByDesc: sortByDesc, tagValueId: tagValueId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadSectionsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadSectionsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadSingleChart.g.cs b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadSingleChart.g.cs index 00117db7..341597a8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadSingleChart.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadSingleChart.g.cs @@ -39,33 +39,33 @@ partial void ProcessReadSingleChartResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadSingleChartArguments( - httpClient: _httpClient, + httpClient: HttpClient, chartId: ref chartId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/charts/{chartId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessReadSingleChartResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadSingleChartRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, chartId: chartId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadSingleChartResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadSingleChartResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -148,7 +148,7 @@ partial void ProcessReadSingleChartResponseContent( global::System.Collections.Generic.IList? tagValueId = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CustomChartsRequest + var __request = new global::LangSmith.CustomChartsRequest { Timezone = timezone, StartTime = startTime, @@ -160,7 +160,7 @@ partial void ProcessReadSingleChartResponseContent( return await ReadSingleChartAsync( chartId: chartId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadSingleSection.g.cs b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadSingleSection.g.cs index fd9f8640..6249c32d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadSingleSection.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.ReadSingleSection.g.cs @@ -39,33 +39,33 @@ partial void ProcessReadSingleSectionResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadSingleSectionArguments( - httpClient: _httpClient, + httpClient: HttpClient, sectionId: ref sectionId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/charts/section/{sectionId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessReadSingleSectionResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadSingleSectionRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sectionId: sectionId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadSingleSectionResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadSingleSectionResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -144,7 +144,7 @@ partial void ProcessReadSingleSectionResponseContent( global::LangSmith.TimedeltaInput? stride = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CustomChartsRequestBase + var __request = new global::LangSmith.CustomChartsRequestBase { Timezone = timezone, StartTime = startTime, @@ -154,7 +154,7 @@ partial void ProcessReadSingleSectionResponseContent( return await ReadSingleSectionAsync( sectionId: sectionId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.UpdateChart.g.cs b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.UpdateChart.g.cs index 2ffa1748..3a9ab208 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.UpdateChart.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.UpdateChart.g.cs @@ -39,33 +39,33 @@ partial void ProcessUpdateChartResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateChartArguments( - httpClient: _httpClient, + httpClient: HttpClient, chartId: ref chartId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/charts/{chartId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessUpdateChartResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateChartRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, chartId: chartId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateChartResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateChartResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -148,7 +148,7 @@ partial void ProcessUpdateChartResponseContent( global::LangSmith.AnyOf? commonFilters = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CustomChartUpdate + var __request = new global::LangSmith.CustomChartUpdate { Title = title, Description = description, @@ -162,7 +162,7 @@ partial void ProcessUpdateChartResponseContent( return await UpdateChartAsync( chartId: chartId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.UpdateSection.g.cs b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.UpdateSection.g.cs index 752cdd75..176612d9 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.UpdateSection.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.UpdateSection.g.cs @@ -39,33 +39,33 @@ partial void ProcessUpdateSectionResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateSectionArguments( - httpClient: _httpClient, + httpClient: HttpClient, sectionId: ref sectionId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/charts/section/{sectionId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessUpdateSectionResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateSectionRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sectionId: sectionId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateSectionResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateSectionResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -138,7 +138,7 @@ partial void ProcessUpdateSectionResponseContent( global::LangSmith.AnyOf? index = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CustomChartsSectionUpdate + var __request = new global::LangSmith.CustomChartsSectionUpdate { Title = title, Description = description, @@ -147,7 +147,7 @@ partial void ProcessUpdateSectionResponseContent( return await UpdateSectionAsync( sectionId: sectionId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.g.cs index b489e347..21b6c392 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ChartsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ChartsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class ChartsClient : global::LangSmith.IChartsClient, glob /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class ChartsClient : global::LangSmith.IChartsClient, glob /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public ChartsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.CreateComment.g.cs b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.CreateComment.g.cs index 98d2a711..8b99ef51 100644 --- a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.CreateComment.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.CreateComment.g.cs @@ -42,34 +42,34 @@ partial void ProcessCreateCommentResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateCommentArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/comments/{owner}/{repo}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -77,48 +77,48 @@ partial void ProcessCreateCommentResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateCommentRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateCommentResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateCommentResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -138,7 +138,7 @@ partial void ProcessCreateCommentResponseContent( string content, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CreateCommentRequest + var __request = new global::LangSmith.CreateCommentRequest { Content = content, }; @@ -146,7 +146,7 @@ partial void ProcessCreateCommentResponseContent( return await CreateCommentAsync( owner: owner, repo: repo, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.CreateSubComment.g.cs b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.CreateSubComment.g.cs index 1fcb7149..58b1431c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.CreateSubComment.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.CreateSubComment.g.cs @@ -46,9 +46,9 @@ partial void ProcessCreateSubCommentResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateSubCommentArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo, parentCommentId: ref parentCommentId, @@ -56,25 +56,25 @@ partial void ProcessCreateSubCommentResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/comments/{owner}/{repo}/{parentCommentId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -82,49 +82,49 @@ partial void ProcessCreateSubCommentResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateSubCommentRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo, parentCommentId: parentCommentId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateSubCommentResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateSubCommentResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -148,7 +148,7 @@ partial void ProcessCreateSubCommentResponseContent( string content, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CreateCommentRequest + var __request = new global::LangSmith.CreateCommentRequest { Content = content, }; @@ -157,7 +157,7 @@ partial void ProcessCreateSubCommentResponseContent( owner: owner, repo: repo, parentCommentId: parentCommentId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.GetComments.g.cs b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.GetComments.g.cs index 5a7ac4f2..03b650e3 100644 --- a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.GetComments.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.GetComments.g.cs @@ -48,9 +48,9 @@ partial void ProcessGetCommentsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetCommentsArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo, limit: ref limit, @@ -58,73 +58,73 @@ partial void ProcessGetCommentsResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/comments/{owner}/{repo}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("offset", offset?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetCommentsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo, limit: limit, offset: offset); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetCommentsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetCommentsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.GetSubComments.g.cs b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.GetSubComments.g.cs index f13db0f9..53e6ad62 100644 --- a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.GetSubComments.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.GetSubComments.g.cs @@ -52,9 +52,9 @@ partial void ProcessGetSubCommentsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetSubCommentsArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo, parentCommentId: ref parentCommentId, @@ -63,74 +63,74 @@ partial void ProcessGetSubCommentsResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/comments/{owner}/{repo}/{parentCommentId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("offset", offset?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetSubCommentsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo, parentCommentId: parentCommentId, limit: limit, offset: offset); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetSubCommentsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetSubCommentsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.LikeComment.g.cs b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.LikeComment.g.cs index 039130c5..b3980e64 100644 --- a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.LikeComment.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.LikeComment.g.cs @@ -40,77 +40,77 @@ partial void ProcessLikeCommentResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareLikeCommentArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo, parentCommentId: ref parentCommentId); var __pathBuilder = new PathBuilder( path: $"/api/v1/comments/{owner}/{repo}/{parentCommentId}/like", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareLikeCommentRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo, parentCommentId: parentCommentId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessLikeCommentResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessLikeCommentResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.UnlikeComment.g.cs b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.UnlikeComment.g.cs index da299b2a..970a4d1f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.UnlikeComment.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.UnlikeComment.g.cs @@ -40,77 +40,77 @@ partial void ProcessUnlikeCommentResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUnlikeCommentArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo, parentCommentId: ref parentCommentId); var __pathBuilder = new PathBuilder( path: $"/api/v1/comments/{owner}/{repo}/{parentCommentId}/like", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUnlikeCommentRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo, parentCommentId: parentCommentId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUnlikeCommentResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUnlikeCommentResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.g.cs index 420e6ac4..49ebcd7d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.CommentsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.CommentsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class CommentsClient : global::LangSmith.ICommentsClient, /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class CommentsClient : global::LangSmith.ICommentsClient, /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public CommentsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.CommitsClient.CreateCommit.g.cs b/src/libs/LangSmith/Generated/LangSmith.CommitsClient.CreateCommit.g.cs index 18424ab5..a22a1c8d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.CommitsClient.CreateCommit.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.CommitsClient.CreateCommit.g.cs @@ -43,34 +43,34 @@ partial void ProcessCreateCommitResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateCommitArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/commits/{owner}/{repo}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -78,48 +78,48 @@ partial void ProcessCreateCommitResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateCommitRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateCommitResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateCommitResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -146,7 +146,7 @@ partial void ProcessCreateCommitResponseContent( global::System.Collections.Generic.IList? exampleRunIds = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CreateRepoCommitRequest + var __request = new global::LangSmith.CreateRepoCommitRequest { Manifest = manifest, ParentCommit = parentCommit, @@ -156,7 +156,7 @@ partial void ProcessCreateCommitResponseContent( return await CreateCommitAsync( owner: owner, repo: repo, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.CommitsClient.GetCommit.g.cs b/src/libs/LangSmith/Generated/LangSmith.CommitsClient.GetCommit.g.cs index 14c24734..c4fd1979 100644 --- a/src/libs/LangSmith/Generated/LangSmith.CommitsClient.GetCommit.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.CommitsClient.GetCommit.g.cs @@ -59,9 +59,9 @@ partial void ProcessGetCommitResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetCommitArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo, commit: ref commit, @@ -71,39 +71,39 @@ partial void ProcessGetCommitResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/commits/{owner}/{repo}/{commit}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("get_examples", getExamples?.ToString()) .AddOptionalParameter("is_view", isView?.ToString()) .AddOptionalParameter("include_model", includeModel?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetCommitRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo, commit: commit, @@ -111,36 +111,36 @@ partial void ProcessGetCommitResponseContent( isView: isView, includeModel: includeModel); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetCommitResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetCommitResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.CommitsClient.ListCommits.g.cs b/src/libs/LangSmith/Generated/LangSmith.CommitsClient.ListCommits.g.cs index 9daea324..dfea6d60 100644 --- a/src/libs/LangSmith/Generated/LangSmith.CommitsClient.ListCommits.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.CommitsClient.ListCommits.g.cs @@ -49,9 +49,9 @@ partial void ProcessListCommitsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListCommitsArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo, limit: ref limit, @@ -59,73 +59,73 @@ partial void ProcessListCommitsResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/commits/{owner}/{repo}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("offset", offset?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListCommitsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo, limit: limit, offset: offset); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListCommitsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListCommitsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.CommitsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.CommitsClient.g.cs index 4783fb8b..ccc8e10f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.CommitsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.CommitsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class CommitsClient : global::LangSmith.ICommitsClient, gl /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class CommitsClient : global::LangSmith.ICommitsClient, gl /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public CommitsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.CloneDataset.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.CloneDataset.g.cs index b91ff640..879f4dcb 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.CloneDataset.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.CloneDataset.g.cs @@ -35,32 +35,32 @@ partial void ProcessCloneDatasetResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCloneDatasetArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/datasets/clone", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCloneDatasetResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCloneDatasetRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCloneDatasetResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCloneDatasetResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -134,7 +134,7 @@ partial void ProcessCloneDatasetResponseContent( global::System.Collections.Generic.IList? examples = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.BodyCloneDatasetApiV1DatasetsClonePost + var __request = new global::LangSmith.BodyCloneDatasetApiV1DatasetsClonePost { TargetDatasetId = targetDatasetId, SourceDatasetId = sourceDatasetId, @@ -143,7 +143,7 @@ partial void ProcessCloneDatasetResponseContent( }; return await CloneDatasetAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.CreateComparativeExperiment.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.CreateComparativeExperiment.g.cs index c43fc3a1..f439c830 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.CreateComparativeExperiment.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.CreateComparativeExperiment.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateComparativeExperimentResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateComparativeExperimentArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/datasets/comparative", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateComparativeExperimentResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateComparativeExperimentRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateComparativeExperimentResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateComparativeExperimentResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -140,7 +140,7 @@ partial void ProcessCreateComparativeExperimentResponseContent( object? extra = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.ComparativeExperimentCreate + var __request = new global::LangSmith.ComparativeExperimentCreate { Id = id, ExperimentIds = experimentIds, @@ -153,7 +153,7 @@ partial void ProcessCreateComparativeExperimentResponseContent( }; return await CreateComparativeExperimentAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.CreateDataset.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.CreateDataset.g.cs index 33b400af..154baa6d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.CreateDataset.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.CreateDataset.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateDatasetResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateDatasetArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/datasets", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateDatasetResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateDatasetRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateDatasetResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateDatasetResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -148,7 +148,7 @@ partial void ProcessCreateDatasetResponseContent( global::LangSmith.DataType? dataType = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.DatasetCreate + var __request = new global::LangSmith.DatasetCreate { Name = name, Description = description, @@ -163,7 +163,7 @@ partial void ProcessCreateDatasetResponseContent( }; return await CreateDatasetAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DatasetHandler.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DatasetHandler.g.cs index 76c08278..2c8277eb 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DatasetHandler.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DatasetHandler.g.cs @@ -34,32 +34,32 @@ partial void ProcessDatasetHandlerResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDatasetHandlerArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/datasets/playground_experiment/batch", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessDatasetHandlerResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDatasetHandlerRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDatasetHandlerResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDatasetHandlerResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -144,7 +144,7 @@ partial void ProcessDatasetHandlerResponseContent( int? repetitions = 1, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.PlaygroundRunOverDatasetRequestSchema + var __request = new global::LangSmith.PlaygroundRunOverDatasetRequestSchema { Manifest = manifest, Secrets = secrets, @@ -159,7 +159,7 @@ partial void ProcessDatasetHandlerResponseContent( }; return await DatasetHandlerAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DeleteComparativeExperiment.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DeleteComparativeExperiment.g.cs index f9400aa1..5edd1f98 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DeleteComparativeExperiment.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DeleteComparativeExperiment.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteComparativeExperimentResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteComparativeExperimentArguments( - httpClient: _httpClient, + httpClient: HttpClient, comparativeExperimentId: ref comparativeExperimentId); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/comparative/{comparativeExperimentId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteComparativeExperimentRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, comparativeExperimentId: comparativeExperimentId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteComparativeExperimentResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteComparativeExperimentResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DeleteDataset.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DeleteDataset.g.cs index 3a36c467..592d9486 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DeleteDataset.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DeleteDataset.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteDatasetResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteDatasetArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteDatasetRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteDatasetResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteDatasetResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DiffDatasetVersions.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DiffDatasetVersions.g.cs index 59a6910c..ddb21161 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DiffDatasetVersions.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DiffDatasetVersions.g.cs @@ -41,81 +41,81 @@ partial void ProcessDiffDatasetVersionsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDiffDatasetVersionsArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, fromVersion: ref fromVersion, toVersion: ref toVersion); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/versions/diff", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("from_version", fromVersion.ToString() ?? string.Empty) .AddRequiredParameter("to_version", toVersion.ToString() ?? string.Empty) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDiffDatasetVersionsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, fromVersion: fromVersion, toVersion: toVersion); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDiffDatasetVersionsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDiffDatasetVersionsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DownloadDatasetCsv.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DownloadDatasetCsv.g.cs index 74e1c0f3..c0248b31 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DownloadDatasetCsv.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DownloadDatasetCsv.g.cs @@ -39,78 +39,78 @@ partial void ProcessDownloadDatasetCsvResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDownloadDatasetCsvArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, asOf: ref asOf); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/csv", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("as_of", asOf?.ToString("yyyy-MM-ddTHH:mm:ssZ")) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDownloadDatasetCsvRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, asOf: asOf); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDownloadDatasetCsvResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDownloadDatasetCsvResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DownloadDatasetOpenai.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DownloadDatasetOpenai.g.cs index 094dcf1b..bdfafc0f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DownloadDatasetOpenai.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DownloadDatasetOpenai.g.cs @@ -39,78 +39,78 @@ partial void ProcessDownloadDatasetOpenaiResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDownloadDatasetOpenaiArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, asOf: ref asOf); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/openai", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("as_of", asOf?.ToString("yyyy-MM-ddTHH:mm:ssZ")) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDownloadDatasetOpenaiRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, asOf: asOf); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDownloadDatasetOpenaiResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDownloadDatasetOpenaiResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DownloadDatasetOpenaiFt.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DownloadDatasetOpenaiFt.g.cs index 2d643f9a..a0c4917a 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DownloadDatasetOpenaiFt.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.DownloadDatasetOpenaiFt.g.cs @@ -39,78 +39,78 @@ partial void ProcessDownloadDatasetOpenaiFtResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDownloadDatasetOpenaiFtArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, asOf: ref asOf); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/openai_ft", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("as_of", asOf?.ToString("yyyy-MM-ddTHH:mm:ssZ")) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDownloadDatasetOpenaiFtRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, asOf: asOf); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDownloadDatasetOpenaiFtResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDownloadDatasetOpenaiFtResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.Generate.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.Generate.g.cs index 2f285ed4..b86911c7 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.Generate.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.Generate.g.cs @@ -39,33 +39,33 @@ partial void ProcessGenerateResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGenerateArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/generate", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessGenerateResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGenerateRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGenerateResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGenerateResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -134,7 +134,7 @@ partial void ProcessGenerateResponseContent( global::System.Collections.Generic.IList? exampleIds = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.GenerateSyntheticExamplesBody + var __request = new global::LangSmith.GenerateSyntheticExamplesBody { ExampleIds = exampleIds, NumExamples = numExamples, @@ -142,7 +142,7 @@ partial void ProcessGenerateResponseContent( return await GenerateAsync( datasetId: datasetId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetDatasetSplits.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetDatasetSplits.g.cs index a8907f20..f6c60fba 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetDatasetSplits.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetDatasetSplits.g.cs @@ -39,78 +39,78 @@ partial void ProcessGetDatasetSplitsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetDatasetSplitsArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, asOf: ref asOf); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/splits", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("as_of", asOf?.ToString() ?? string.Empty) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetDatasetSplitsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, asOf: asOf); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetDatasetSplitsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetDatasetSplitsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetDatasetVersion.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetDatasetVersion.g.cs index 3191f660..128506c8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetDatasetVersion.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetDatasetVersion.g.cs @@ -41,81 +41,81 @@ partial void ProcessGetDatasetVersionResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetDatasetVersionArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, asOf: ref asOf, tag: ref tag); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/version", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("as_of", asOf?.ToString("yyyy-MM-ddTHH:mm:ssZ")) .AddOptionalParameter("tag", tag) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetDatasetVersionRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, asOf: asOf, tag: tag); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetDatasetVersionResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetDatasetVersionResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetDatasetVersions.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetDatasetVersions.g.cs index 5a36f233..7acee5ef 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetDatasetVersions.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetDatasetVersions.g.cs @@ -53,9 +53,9 @@ partial void ProcessGetDatasetVersionsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetDatasetVersionsArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, search: ref search, example: ref example, @@ -64,7 +64,7 @@ partial void ProcessGetDatasetVersionsResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/versions", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("search", search) .AddOptionalParameter("example", example?.ToString()) @@ -72,68 +72,68 @@ partial void ProcessGetDatasetVersionsResponseContent( .AddOptionalParameter("offset", offset?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetDatasetVersionsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, search: search, example: example, limit: limit, offset: offset); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetDatasetVersionsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetDatasetVersionsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetIndexInfo.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetIndexInfo.g.cs index 9d7264d0..b069302e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetIndexInfo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.GetIndexInfo.g.cs @@ -33,73 +33,73 @@ partial void ProcessGetIndexInfoResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetIndexInfoArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/index", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetIndexInfoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetIndexInfoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetIndexInfoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.Index.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.Index.g.cs index 4036fa81..97bfb557 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.Index.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.Index.g.cs @@ -39,33 +39,33 @@ partial void ProcessIndexResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareIndexArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/index", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessIndexResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareIndexRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessIndexResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessIndexResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -134,14 +134,14 @@ partial void ProcessIndexResponseContent( string? tag = "latest", global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.DatasetIndexRequest + var __request = new global::LangSmith.DatasetIndexRequest { Tag = tag, }; return await IndexAsync( datasetId: datasetId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadComparativeExperiments.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadComparativeExperiments.g.cs index 273d8d5d..21f2f577 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadComparativeExperiments.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadComparativeExperiments.g.cs @@ -69,9 +69,9 @@ partial void ProcessReadComparativeExperimentsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadComparativeExperimentsArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, name: ref name, nameContains: ref nameContains, @@ -83,7 +83,7 @@ partial void ProcessReadComparativeExperimentsResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/comparative", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("name", name) .AddOptionalParameter("name_contains", nameContains) @@ -94,32 +94,32 @@ partial void ProcessReadComparativeExperimentsResponseContent( .AddOptionalParameter("sort_by_desc", sortByDesc?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadComparativeExperimentsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, name: name, nameContains: nameContains, @@ -129,36 +129,36 @@ partial void ProcessReadComparativeExperimentsResponseContent( sortBy: sortBy, sortByDesc: sortByDesc); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadComparativeExperimentsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadComparativeExperimentsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDataset.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDataset.g.cs index 2aae964d..7bf8100d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDataset.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDataset.g.cs @@ -33,73 +33,73 @@ partial void ProcessReadDatasetResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadDatasetArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadDatasetRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadDatasetResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadDatasetResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDatasetShareState.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDatasetShareState.g.cs index 240a9a49..0a14de5c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDatasetShareState.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDatasetShareState.g.cs @@ -33,73 +33,73 @@ partial void ProcessReadDatasetShareStateResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadDatasetShareStateArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/share", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadDatasetShareStateRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadDatasetShareStateResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadDatasetShareStateResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDatasets.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDatasets.g.cs index 5460b637..d5e75be9 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDatasets.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDatasets.g.cs @@ -77,9 +77,9 @@ partial void ProcessReadDatasetsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadDatasetsArguments( - httpClient: _httpClient, + httpClient: HttpClient, id: id, dataType: ref dataType, name: ref name, @@ -93,7 +93,7 @@ partial void ProcessReadDatasetsResponseContent( var __pathBuilder = new PathBuilder( path: "/api/v1/datasets", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("id", id, selector: static x => x.ToString(), delimiter: ",", explode: true) .AddOptionalParameter("data_type", dataType?.ToString() ?? string.Empty) @@ -107,32 +107,32 @@ partial void ProcessReadDatasetsResponseContent( .AddOptionalParameter("tag_value_id", tagValueId, selector: static x => x.ToString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadDatasetsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, id: id, dataType: dataType, name: name, @@ -144,36 +144,36 @@ partial void ProcessReadDatasetsResponseContent( sortByDesc: sortByDesc, tagValueId: tagValueId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadDatasetsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadDatasetsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDelta.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDelta.g.cs index 0aef621e..c9598f78 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDelta.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadDelta.g.cs @@ -39,33 +39,33 @@ partial void ProcessReadDeltaResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadDeltaArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/runs/delta", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessReadDeltaResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadDeltaRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadDeltaResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadDeltaResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -150,7 +150,7 @@ partial void ProcessReadDeltaResponseContent( global::System.Guid? comparativeExperimentId = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.QueryFeedbackDelta + var __request = new global::LangSmith.QueryFeedbackDelta { BaselineSessionId = baselineSessionId, ComparisonSessionIds = comparisonSessionIds, @@ -163,7 +163,7 @@ partial void ProcessReadDeltaResponseContent( return await ReadDeltaAsync( datasetId: datasetId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadExamplesWithRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadExamplesWithRuns.g.cs index 775e97fa..349775c6 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadExamplesWithRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ReadExamplesWithRuns.g.cs @@ -39,33 +39,33 @@ partial void ProcessReadExamplesWithRunsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadExamplesWithRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/runs", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessReadExamplesWithRunsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadExamplesWithRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadExamplesWithRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadExamplesWithRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -146,7 +146,7 @@ partial void ProcessReadExamplesWithRunsResponseContent( int? limit = 20, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.QueryExampleSchemaWithRuns + var __request = new global::LangSmith.QueryExampleSchemaWithRuns { SessionIds = sessionIds, ComparativeExperimentId = comparativeExperimentId, @@ -157,7 +157,7 @@ partial void ProcessReadExamplesWithRunsResponseContent( return await ReadExamplesWithRunsAsync( datasetId: datasetId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.RemoveIndex.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.RemoveIndex.g.cs index 7e82d2ff..a7b0a727 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.RemoveIndex.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.RemoveIndex.g.cs @@ -33,73 +33,73 @@ partial void ProcessRemoveIndexResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareRemoveIndexArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/index", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareRemoveIndexRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessRemoveIndexResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessRemoveIndexResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.Search.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.Search.g.cs index 18531f97..47b26535 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.Search.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.Search.g.cs @@ -39,33 +39,33 @@ partial void ProcessSearchResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareSearchArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/search", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessSearchResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareSearchRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessSearchResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessSearchResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -144,7 +144,7 @@ partial void ProcessSearchResponseContent( string? filter = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.SearchDatasetRequest + var __request = new global::LangSmith.SearchDatasetRequest { Inputs = inputs, Limit = limit, @@ -154,7 +154,7 @@ partial void ProcessSearchResponseContent( return await SearchAsync( datasetId: datasetId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ShareDataset.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ShareDataset.g.cs index 7bdc0f67..c796a24b 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ShareDataset.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.ShareDataset.g.cs @@ -39,78 +39,78 @@ partial void ProcessShareDatasetResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareShareDatasetArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, shareProjects: ref shareProjects); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/share", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("share_projects", shareProjects?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareShareDatasetRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, shareProjects: shareProjects); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessShareDatasetResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessShareDatasetResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.StreamDatasetHandler.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.StreamDatasetHandler.g.cs index d3b119c6..f799611f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.StreamDatasetHandler.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.StreamDatasetHandler.g.cs @@ -34,32 +34,32 @@ partial void ProcessStreamDatasetHandlerResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareStreamDatasetHandlerArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/datasets/playground_experiment/stream", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessStreamDatasetHandlerResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareStreamDatasetHandlerRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessStreamDatasetHandlerResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessStreamDatasetHandlerResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -144,7 +144,7 @@ partial void ProcessStreamDatasetHandlerResponseContent( int? repetitions = 1, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.PlaygroundRunOverDatasetRequestSchema + var __request = new global::LangSmith.PlaygroundRunOverDatasetRequestSchema { Manifest = manifest, Secrets = secrets, @@ -159,7 +159,7 @@ partial void ProcessStreamDatasetHandlerResponseContent( }; return await StreamDatasetHandlerAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UnshareDataset.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UnshareDataset.g.cs index 9f513925..9a83b534 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UnshareDataset.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UnshareDataset.g.cs @@ -33,73 +33,73 @@ partial void ProcessUnshareDatasetResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUnshareDatasetArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/share", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUnshareDatasetRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUnshareDatasetResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUnshareDatasetResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UpdateDataset.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UpdateDataset.g.cs index 0d9ec5df..7f67290d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UpdateDataset.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UpdateDataset.g.cs @@ -39,33 +39,33 @@ partial void ProcessUpdateDatasetResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateDatasetArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessUpdateDatasetResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateDatasetRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateDatasetResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateDatasetResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -142,7 +142,7 @@ partial void ProcessUpdateDatasetResponseContent( global::System.Collections.Generic.Dictionary? patchExamples = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.DatasetUpdate + var __request = new global::LangSmith.DatasetUpdate { Name = name, Description = description, @@ -153,7 +153,7 @@ partial void ProcessUpdateDatasetResponseContent( return await UpdateDatasetAsync( datasetId: datasetId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UpdateDatasetSplits.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UpdateDatasetSplits.g.cs index 1aec0153..b4bad5f1 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UpdateDatasetSplits.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UpdateDatasetSplits.g.cs @@ -38,33 +38,33 @@ partial void ProcessUpdateDatasetSplitsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateDatasetSplitsArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/splits", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -72,47 +72,47 @@ partial void ProcessUpdateDatasetSplitsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateDatasetSplitsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateDatasetSplitsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateDatasetSplitsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -138,7 +138,7 @@ partial void ProcessUpdateDatasetSplitsResponseContent( bool? remove = false, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.BodyUpdateDatasetSplitsApiV1DatasetsDatasetIdSplitsPut + var __request = new global::LangSmith.BodyUpdateDatasetSplitsApiV1DatasetsDatasetIdSplitsPut { SplitName = splitName, Examples = examples, @@ -147,7 +147,7 @@ partial void ProcessUpdateDatasetSplitsResponseContent( return await UpdateDatasetSplitsAsync( datasetId: datasetId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UpdateDatasetVersion.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UpdateDatasetVersion.g.cs index db37b6d0..27341ee8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UpdateDatasetVersion.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UpdateDatasetVersion.g.cs @@ -39,33 +39,33 @@ partial void ProcessUpdateDatasetVersionResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateDatasetVersionArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/datasets/{datasetId}/tags", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessUpdateDatasetVersionResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateDatasetVersionRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateDatasetVersionResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateDatasetVersionResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -138,7 +138,7 @@ partial void ProcessUpdateDatasetVersionResponseContent( string tag, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.PutDatasetVersionsSchema + var __request = new global::LangSmith.PutDatasetVersionsSchema { AsOf = asOf, Tag = tag, @@ -146,7 +146,7 @@ partial void ProcessUpdateDatasetVersionResponseContent( return await UpdateDatasetVersionAsync( datasetId: datasetId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UploadCsvDataset.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UploadCsvDataset.g.cs index 91171e41..4aecf368 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UploadCsvDataset.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UploadCsvDataset.g.cs @@ -35,32 +35,32 @@ partial void ProcessUploadCsvDatasetResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUploadCsvDatasetArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/datasets/upload", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); @@ -101,46 +101,46 @@ partial void ProcessUploadCsvDatasetResponseContent( content: new global::System.Net.Http.StringContent($"{request.Description}"), name: "description"); } - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUploadCsvDatasetRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUploadCsvDatasetResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUploadCsvDatasetResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -173,7 +173,7 @@ partial void ProcessUploadCsvDatasetResponseContent( string? description = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.BodyUploadCsvDatasetApiV1DatasetsUploadPost + var __request = new global::LangSmith.BodyUploadCsvDatasetApiV1DatasetsUploadPost { File = file, Filename = filename, @@ -185,7 +185,7 @@ partial void ProcessUploadCsvDatasetResponseContent( }; return await UploadCsvDatasetAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UploadExperiment.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UploadExperiment.g.cs index 2b3a6916..2a5436db 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UploadExperiment.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.UploadExperiment.g.cs @@ -35,32 +35,32 @@ partial void ProcessUploadExperimentResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUploadExperimentArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/datasets/upload-experiment", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessUploadExperimentResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUploadExperimentRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUploadExperimentResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUploadExperimentResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -144,7 +144,7 @@ partial void ProcessUploadExperimentResponseContent( object? experimentMetadata = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.ExperimentResultsUpload + var __request = new global::LangSmith.ExperimentResultsUpload { ExperimentName = experimentName, ExperimentDescription = experimentDescription, @@ -159,7 +159,7 @@ partial void ProcessUploadExperimentResponseContent( }; return await UploadExperimentAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.g.cs index 7177a3e4..ce182a32 100644 --- a/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.DatasetsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class DatasetsClient : global::LangSmith.IDatasetsClient, /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class DatasetsClient : global::LangSmith.IDatasetsClient, /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// 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::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.EventsClient.CreateEvent.g.cs b/src/libs/LangSmith/Generated/LangSmith.EventsClient.CreateEvent.g.cs index 2d91824b..b428375e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.EventsClient.CreateEvent.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.EventsClient.CreateEvent.g.cs @@ -34,32 +34,32 @@ partial void ProcessCreateEventResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateEventArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/events", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessCreateEventResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateEventRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateEventResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateEventResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -128,7 +128,7 @@ partial void ProcessCreateEventResponseContent( string? commit = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CreateEventRequest + var __request = new global::LangSmith.CreateEventRequest { EventType = eventType, Owner = owner, @@ -137,7 +137,7 @@ partial void ProcessCreateEventResponseContent( }; return await CreateEventAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.EventsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.EventsClient.g.cs index a192b50c..5a56d764 100644 --- a/src/libs/LangSmith/Generated/LangSmith.EventsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.EventsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class EventsClient : global::LangSmith.IEventsClient, glob /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class EventsClient : global::LangSmith.IEventsClient, glob /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public EventsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.CountExamples.g.cs b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.CountExamples.g.cs index 6223d77e..7f6a470d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.CountExamples.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.CountExamples.g.cs @@ -60,9 +60,9 @@ partial void ProcessCountExamplesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCountExamplesArguments( - httpClient: _httpClient, + httpClient: HttpClient, id: id, asOf: ref asOf, metadata: ref metadata, @@ -73,7 +73,7 @@ partial void ProcessCountExamplesResponseContent( var __pathBuilder = new PathBuilder( path: "/api/v1/examples/count", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("id", id, selector: static x => x.ToString(), delimiter: ",", explode: true) .AddOptionalParameter("as_of", asOf?.ToString() ?? string.Empty) @@ -84,32 +84,32 @@ partial void ProcessCountExamplesResponseContent( .AddOptionalParameter("filter", filter) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCountExamplesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, id: id, asOf: asOf, metadata: metadata, @@ -118,36 +118,36 @@ partial void ProcessCountExamplesResponseContent( dataset: dataset, filter: filter); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCountExamplesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCountExamplesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.CreateExample.g.cs b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.CreateExample.g.cs index 26969f3d..bb9cd174 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.CreateExample.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.CreateExample.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateExampleResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateExampleArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/examples", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateExampleResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateExampleRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateExampleResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateExampleResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -146,7 +146,7 @@ partial void ProcessCreateExampleResponseContent( global::System.DateTime? createdAt = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.ExampleCreate + var __request = new global::LangSmith.ExampleCreate { Outputs = outputs, DatasetId = datasetId, @@ -160,7 +160,7 @@ partial void ProcessCreateExampleResponseContent( }; return await CreateExampleAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.CreateExamples.g.cs b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.CreateExamples.g.cs index 5dd8c577..fb3d48dd 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.CreateExamples.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.CreateExamples.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateExamplesResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateExamplesArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/examples/bulk", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateExamplesResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateExamplesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateExamplesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateExamplesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.DeleteExample.g.cs b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.DeleteExample.g.cs index d969f1b4..5510d3e2 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.DeleteExample.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.DeleteExample.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteExampleResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteExampleArguments( - httpClient: _httpClient, + httpClient: HttpClient, exampleId: ref exampleId); var __pathBuilder = new PathBuilder( path: $"/api/v1/examples/{exampleId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteExampleRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, exampleId: exampleId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteExampleResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteExampleResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.DeleteExamples.g.cs b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.DeleteExamples.g.cs index 50ff6463..15b796e3 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.DeleteExamples.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.DeleteExamples.g.cs @@ -33,76 +33,76 @@ partial void ProcessDeleteExamplesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteExamplesArguments( - httpClient: _httpClient, + httpClient: HttpClient, exampleIds: exampleIds); var __pathBuilder = new PathBuilder( path: "/api/v1/examples", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("example_ids", exampleIds, selector: static x => x.ToString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteExamplesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, exampleIds: exampleIds); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteExamplesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteExamplesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.ReadExample.g.cs b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.ReadExample.g.cs index c349936c..fa29372b 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.ReadExample.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.ReadExample.g.cs @@ -40,78 +40,78 @@ partial void ProcessReadExampleResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadExampleArguments( - httpClient: _httpClient, + httpClient: HttpClient, exampleId: ref exampleId, asOf: ref asOf); var __pathBuilder = new PathBuilder( path: $"/api/v1/examples/{exampleId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("as_of", asOf?.ToString() ?? string.Empty) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadExampleRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, exampleId: exampleId, asOf: asOf); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadExampleResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadExampleResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.ReadExamples.g.cs b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.ReadExamples.g.cs index 36ec40ea..ab00778f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.ReadExamples.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.ReadExamples.g.cs @@ -86,9 +86,9 @@ partial void ProcessReadExamplesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadExamplesArguments( - httpClient: _httpClient, + httpClient: HttpClient, id: id, asOf: ref asOf, metadata: ref metadata, @@ -104,7 +104,7 @@ partial void ProcessReadExamplesResponseContent( var __pathBuilder = new PathBuilder( path: "/api/v1/examples", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("id", id, selector: static x => x.ToString(), delimiter: ",", explode: true) .AddOptionalParameter("as_of", asOf?.ToString() ?? string.Empty) @@ -119,32 +119,32 @@ partial void ProcessReadExamplesResponseContent( .AddOptionalParameter("filter", filter) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadExamplesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, id: id, asOf: asOf, metadata: metadata, @@ -158,36 +158,36 @@ partial void ProcessReadExamplesResponseContent( select: select, filter: filter); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadExamplesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadExamplesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UpdateExample.g.cs b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UpdateExample.g.cs index e98431e1..79df1288 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UpdateExample.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UpdateExample.g.cs @@ -39,33 +39,33 @@ partial void ProcessUpdateExampleResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateExampleArguments( - httpClient: _httpClient, + httpClient: HttpClient, exampleId: ref exampleId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/examples/{exampleId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessUpdateExampleResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateExampleRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, exampleId: exampleId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateExampleResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateExampleResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -140,7 +140,7 @@ partial void ProcessUpdateExampleResponseContent( global::LangSmith.AnyOf, string>? split = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.ExampleUpdate + var __request = new global::LangSmith.ExampleUpdate { DatasetId = datasetId, Inputs = inputs, @@ -151,7 +151,7 @@ partial void ProcessUpdateExampleResponseContent( return await UpdateExampleAsync( exampleId: exampleId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UpdateExamples.g.cs b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UpdateExamples.g.cs index de8d1881..6c154b49 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UpdateExamples.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UpdateExamples.g.cs @@ -35,32 +35,32 @@ partial void ProcessUpdateExamplesResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateExamplesArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/examples/bulk", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessUpdateExamplesResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateExamplesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateExamplesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateExamplesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UploadExamples.g.cs b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UploadExamples.g.cs index 17170a39..28bb8922 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UploadExamples.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UploadExamples.g.cs @@ -39,33 +39,33 @@ partial void ProcessUploadExamplesResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUploadExamplesArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/examples/upload/{datasetId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent(); @@ -91,47 +91,47 @@ partial void ProcessUploadExamplesResponseContent( content: new global::System.Net.Http.StringContent($"[{string.Join(",", global::System.Linq.Enumerable.Select(request.OutputKeys, x => x))}]"), name: "output_keys"); } - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUploadExamplesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUploadExamplesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUploadExamplesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -158,7 +158,7 @@ partial void ProcessUploadExamplesResponseContent( global::System.Collections.Generic.IList? outputKeys = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.BodyUploadExamplesApiV1ExamplesUploadDatasetIdPost + var __request = new global::LangSmith.BodyUploadExamplesApiV1ExamplesUploadDatasetIdPost { File = file, Filename = filename, @@ -168,7 +168,7 @@ partial void ProcessUploadExamplesResponseContent( return await UploadExamplesAsync( datasetId: datasetId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.g.cs index dab10e81..5f45d647 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ExamplesClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class ExamplesClient : global::LangSmith.IExamplesClient, /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class ExamplesClient : global::LangSmith.IExamplesClient, /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public ExamplesClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedback.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedback.g.cs index 863fb74d..e2d348f6 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedback.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedback.g.cs @@ -39,36 +39,36 @@ partial void ProcessCreateFeedbackResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateFeedbackArguments( - httpClient: _httpClient, + httpClient: HttpClient, error: ref error, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/feedback", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("error", error?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -76,47 +76,47 @@ partial void ProcessCreateFeedbackResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateFeedbackRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, error: error, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateFeedbackResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateFeedbackResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -163,7 +163,7 @@ partial void ProcessCreateFeedbackResponseContent( global::LangSmith.FeedbackConfig? feedbackConfig = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.FeedbackCreateSchema + var __request = new global::LangSmith.FeedbackCreateSchema { CreatedAt = createdAt, ModifiedAt = modifiedAt, @@ -183,7 +183,7 @@ partial void ProcessCreateFeedbackResponseContent( return await CreateFeedbackAsync( error: error, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedbackIngestToken.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedbackIngestToken.g.cs index f607983b..2a08f715 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedbackIngestToken.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedbackIngestToken.g.cs @@ -33,32 +33,32 @@ partial void ProcessCreateFeedbackIngestTokenResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateFeedbackIngestTokenArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/feedback/tokens", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -66,46 +66,46 @@ partial void ProcessCreateFeedbackIngestTokenResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateFeedbackIngestTokenRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateFeedbackIngestTokenResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateFeedbackIngestTokenResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -122,12 +122,12 @@ partial void ProcessCreateFeedbackIngestTokenResponseContent( public async global::System.Threading.Tasks.Task>> CreateFeedbackIngestTokenAsync( global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.AnyOf> + var __request = new global::LangSmith.AnyOf> { }; return await CreateFeedbackIngestTokenAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedbackWithTokenGet.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedbackWithTokenGet.g.cs index c33458b8..0fe14ba3 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedbackWithTokenGet.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedbackWithTokenGet.g.cs @@ -49,9 +49,9 @@ partial void ProcessCreateFeedbackWithTokenGetResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateFeedbackWithTokenGetArguments( - httpClient: _httpClient, + httpClient: HttpClient, token: ref token, score: ref score, value: ref value, @@ -60,7 +60,7 @@ partial void ProcessCreateFeedbackWithTokenGetResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/feedback/tokens/{token}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("score", score?.ToString() ?? string.Empty) .AddOptionalParameter("value", value?.ToString() ?? string.Empty) @@ -68,68 +68,68 @@ partial void ProcessCreateFeedbackWithTokenGetResponseContent( .AddOptionalParameter("correction", correction) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateFeedbackWithTokenGetRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, token: token, score: score, value: value, comment: comment, correction: correction); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateFeedbackWithTokenGetResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateFeedbackWithTokenGetResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedbackWithTokenPost.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedbackWithTokenPost.g.cs index eec044ca..214fa241 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedbackWithTokenPost.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.CreateFeedbackWithTokenPost.g.cs @@ -39,33 +39,33 @@ partial void ProcessCreateFeedbackWithTokenPostResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateFeedbackWithTokenPostArguments( - httpClient: _httpClient, + httpClient: HttpClient, token: ref token, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/feedback/tokens/{token}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessCreateFeedbackWithTokenPostResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateFeedbackWithTokenPostRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, token: token, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateFeedbackWithTokenPostResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateFeedbackWithTokenPostResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -140,7 +140,7 @@ partial void ProcessCreateFeedbackWithTokenPostResponseContent( object? metadata = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.FeedbackCreateWithTokenExtendedSchema + var __request = new global::LangSmith.FeedbackCreateWithTokenExtendedSchema { Score = score, Value = value, @@ -151,7 +151,7 @@ partial void ProcessCreateFeedbackWithTokenPostResponseContent( return await CreateFeedbackWithTokenPostAsync( token: token, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.DeleteFeedback.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.DeleteFeedback.g.cs index f1838212..cfa7c6e0 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.DeleteFeedback.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.DeleteFeedback.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteFeedbackResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteFeedbackArguments( - httpClient: _httpClient, + httpClient: HttpClient, feedbackId: ref feedbackId); var __pathBuilder = new PathBuilder( path: $"/api/v1/feedback/{feedbackId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteFeedbackRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, feedbackId: feedbackId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteFeedbackResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteFeedbackResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.EagerlyCreateFeedback.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.EagerlyCreateFeedback.g.cs index 8d44d818..4e18b667 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.EagerlyCreateFeedback.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.EagerlyCreateFeedback.g.cs @@ -37,32 +37,32 @@ partial void ProcessEagerlyCreateFeedbackResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareEagerlyCreateFeedbackArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/feedback/eager", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -70,46 +70,46 @@ partial void ProcessEagerlyCreateFeedbackResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareEagerlyCreateFeedbackRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessEagerlyCreateFeedbackResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessEagerlyCreateFeedbackResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -156,7 +156,7 @@ partial void ProcessEagerlyCreateFeedbackResponseContent( global::LangSmith.FeedbackConfig? feedbackConfig = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.FeedbackCreateSchema + var __request = new global::LangSmith.FeedbackCreateSchema { CreatedAt = createdAt, ModifiedAt = modifiedAt, @@ -175,7 +175,7 @@ partial void ProcessEagerlyCreateFeedbackResponseContent( }; return await EagerlyCreateFeedbackAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.ListFeedbackIngestTokens.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.ListFeedbackIngestTokens.g.cs index 49f2b174..b8f61f0e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.ListFeedbackIngestTokens.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.ListFeedbackIngestTokens.g.cs @@ -33,76 +33,76 @@ partial void ProcessListFeedbackIngestTokensResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListFeedbackIngestTokensArguments( - httpClient: _httpClient, + httpClient: HttpClient, runId: ref runId); var __pathBuilder = new PathBuilder( path: "/api/v1/feedback/tokens", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("run_id", runId.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListFeedbackIngestTokensRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, runId: runId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListFeedbackIngestTokensResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListFeedbackIngestTokensResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.ReadFeedback.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.ReadFeedback.g.cs index ab142413..d28bc0e1 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.ReadFeedback.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.ReadFeedback.g.cs @@ -33,73 +33,73 @@ partial void ProcessReadFeedbackResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadFeedbackArguments( - httpClient: _httpClient, + httpClient: HttpClient, feedbackId: ref feedbackId); var __pathBuilder = new PathBuilder( path: $"/api/v1/feedback/{feedbackId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadFeedbackRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, feedbackId: feedbackId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadFeedbackResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadFeedbackResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.ReadFeedbacks.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.ReadFeedbacks.g.cs index 03a523d9..9b68e37c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.ReadFeedbacks.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.ReadFeedbacks.g.cs @@ -83,9 +83,9 @@ partial void ProcessReadFeedbacksResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadFeedbacksArguments( - httpClient: _httpClient, + httpClient: HttpClient, run: run, key: key, session: session, @@ -101,7 +101,7 @@ partial void ProcessReadFeedbacksResponseContent( var __pathBuilder = new PathBuilder( path: "/api/v1/feedback", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("run", run, selector: static x => x.ToString(), delimiter: ",", explode: true) .AddOptionalParameter("key", key, delimiter: ",", explode: true) @@ -116,32 +116,32 @@ partial void ProcessReadFeedbacksResponseContent( .AddOptionalParameter("min_created_at", minCreatedAt?.ToString("yyyy-MM-ddTHH:mm:ssZ")) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadFeedbacksRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, run: run, key: key, session: session, @@ -155,36 +155,36 @@ partial void ProcessReadFeedbacksResponseContent( maxCreatedAt: maxCreatedAt, minCreatedAt: minCreatedAt); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadFeedbacksResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadFeedbacksResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.UpdateFeedback.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.UpdateFeedback.g.cs index defc2772..fda7c811 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.UpdateFeedback.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.UpdateFeedback.g.cs @@ -39,33 +39,33 @@ partial void ProcessUpdateFeedbackResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateFeedbackArguments( - httpClient: _httpClient, + httpClient: HttpClient, feedbackId: ref feedbackId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/feedback/{feedbackId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessUpdateFeedbackResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateFeedbackRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, feedbackId: feedbackId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateFeedbackResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateFeedbackResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -142,7 +142,7 @@ partial void ProcessUpdateFeedbackResponseContent( global::LangSmith.FeedbackConfig? feedbackConfig = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.FeedbackUpdateSchema + var __request = new global::LangSmith.FeedbackUpdateSchema { Score = score, Value = value, @@ -153,7 +153,7 @@ partial void ProcessUpdateFeedbackResponseContent( return await UpdateFeedbackAsync( feedbackId: feedbackId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.g.cs index a525cdde..859ebc5e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class FeedbackClient : global::LangSmith.IFeedbackClient, /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class FeedbackClient : global::LangSmith.IFeedbackClient, /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public FeedbackClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.CreateFeedbackConfigEndpoint.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.CreateFeedbackConfigEndpoint.g.cs index faacf34d..2c0d942f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.CreateFeedbackConfigEndpoint.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.CreateFeedbackConfigEndpoint.g.cs @@ -34,32 +34,32 @@ partial void ProcessCreateFeedbackConfigEndpointResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateFeedbackConfigEndpointArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/feedback-configs", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessCreateFeedbackConfigEndpointResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateFeedbackConfigEndpointRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateFeedbackConfigEndpointResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateFeedbackConfigEndpointResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -130,7 +130,7 @@ partial void ProcessCreateFeedbackConfigEndpointResponseContent( bool? isLowerScoreBetter = false, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CreateFeedbackConfigSchema + var __request = new global::LangSmith.CreateFeedbackConfigSchema { FeedbackKey = feedbackKey, FeedbackConfig = feedbackConfig, @@ -138,7 +138,7 @@ partial void ProcessCreateFeedbackConfigEndpointResponseContent( }; return await CreateFeedbackConfigEndpointAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.ListFeedbackConfigsEndpoint.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.ListFeedbackConfigsEndpoint.g.cs index d17cae89..bf642d7c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.ListFeedbackConfigsEndpoint.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.ListFeedbackConfigsEndpoint.g.cs @@ -32,76 +32,76 @@ partial void ProcessListFeedbackConfigsEndpointResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListFeedbackConfigsEndpointArguments( - httpClient: _httpClient, + httpClient: HttpClient, key: key); var __pathBuilder = new PathBuilder( path: "/api/v1/feedback-configs", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("key", key, delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListFeedbackConfigsEndpointRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, key: key); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListFeedbackConfigsEndpointResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListFeedbackConfigsEndpointResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.UpdateFeedbackConfigEndpoint.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.UpdateFeedbackConfigEndpoint.g.cs index 4b34506e..b1448cb3 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.UpdateFeedbackConfigEndpoint.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.UpdateFeedbackConfigEndpoint.g.cs @@ -34,32 +34,32 @@ partial void ProcessUpdateFeedbackConfigEndpointResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateFeedbackConfigEndpointArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/feedback-configs", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessUpdateFeedbackConfigEndpointResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateFeedbackConfigEndpointRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateFeedbackConfigEndpointResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateFeedbackConfigEndpointResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -128,7 +128,7 @@ partial void ProcessUpdateFeedbackConfigEndpointResponseContent( bool? isLowerScoreBetter = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.UpdateFeedbackConfigSchema + var __request = new global::LangSmith.UpdateFeedbackConfigSchema { FeedbackKey = feedbackKey, FeedbackConfig = feedbackConfig, @@ -136,7 +136,7 @@ partial void ProcessUpdateFeedbackConfigEndpointResponseContent( }; return await UpdateFeedbackConfigEndpointAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.g.cs index cf88fdd9..1a6f0843 100644 --- a/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.FeedbackConfigsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class FeedbackConfigsClient : global::LangSmith.IFeedbackC /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class FeedbackConfigsClient : global::LangSmith.IFeedbackC /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public FeedbackConfigsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.IAceClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IAceClient.g.cs index b24d3156..21b3edba 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IAceClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IAceClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IAceClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IAnnotationQueuesClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IAnnotationQueuesClient.g.cs index 12041168..9391c864 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IAnnotationQueuesClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IAnnotationQueuesClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IAnnotationQueuesClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IApiKeyClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IApiKeyClient.g.cs index 26b05103..60917c84 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IApiKeyClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IApiKeyClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IApiKeyClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IAuthClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IAuthClient.g.cs index bc7c15d7..f1ad4d45 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IAuthClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IAuthClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IAuthClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IBulkExportsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IBulkExportsClient.g.cs index 18614270..cae26025 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IBulkExportsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IBulkExportsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IBulkExportsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IChartsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IChartsClient.g.cs index 78f1cb10..4248cf03 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IChartsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IChartsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IChartsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.ICommentsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ICommentsClient.g.cs index 0a5a8633..3c63f506 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ICommentsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ICommentsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface ICommentsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.ICommitsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ICommitsClient.g.cs index bf7f0369..c3c6840c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ICommitsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ICommitsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface ICommitsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IDatasetsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IDatasetsClient.g.cs index 21987a46..2fd9cf59 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IDatasetsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IDatasetsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IDatasetsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IEventsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IEventsClient.g.cs index 43442268..8521a288 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IEventsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IEventsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IEventsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IExamplesClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IExamplesClient.g.cs index 6ab1b362..3bce3e0f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IExamplesClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IExamplesClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IExamplesClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IFeedbackClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IFeedbackClient.g.cs index 17cb3367..30de6c16 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IFeedbackClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IFeedbackClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IFeedbackClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IFeedbackConfigsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IFeedbackConfigsClient.g.cs index 0f7cef43..a8ab6383 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IFeedbackConfigsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IFeedbackConfigsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IFeedbackConfigsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IInfoClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IInfoClient.g.cs index 9709dd36..91875a92 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IInfoClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IInfoClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IInfoClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.ILangSmithApi.g.cs b/src/libs/LangSmith/Generated/LangSmith.ILangSmithApi.g.cs index 3b802023..2deaec35 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ILangSmithApi.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ILangSmithApi.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface ILangSmithApi : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.ILikesClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ILikesClient.g.cs index dfe607cc..fe839db0 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ILikesClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ILikesClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface ILikesClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IModelPriceMapClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IModelPriceMapClient.g.cs index be77a46e..56345ecf 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IModelPriceMapClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IModelPriceMapClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IModelPriceMapClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IOrgsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IOrgsClient.g.cs index f4891513..924ad45f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IOrgsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IOrgsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IOrgsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IPlaygroundSettingsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IPlaygroundSettingsClient.g.cs index 777c9fb3..14769e8b 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IPlaygroundSettingsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IPlaygroundSettingsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IPlaygroundSettingsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IPromptsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IPromptsClient.g.cs index ffaffeda..c4b49185 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IPromptsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IPromptsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IPromptsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IPublicClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IPublicClient.g.cs index 44455364..28a8893f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IPublicClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IPublicClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IPublicClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IReposClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IReposClient.g.cs index 7c8e4197..91d3a998 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IReposClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IReposClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IReposClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IRunClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IRunClient.g.cs index a11501ca..95b3d5ac 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IRunClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IRunClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IRunClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IServiceAccountsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IServiceAccountsClient.g.cs index dfae27b7..c5b1225b 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IServiceAccountsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IServiceAccountsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IServiceAccountsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.ISettingsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ISettingsClient.g.cs index a516901f..7b4c51a4 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ISettingsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ISettingsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface ISettingsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.ITagsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ITagsClient.g.cs index 2553e2c8..2d2a1ab1 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ITagsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ITagsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface ITagsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.ITenantClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ITenantClient.g.cs index ab7405af..9555dedf 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ITenantClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ITenantClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface ITenantClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.ITracerSessionsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ITracerSessionsClient.g.cs index d99f96f5..61d97989 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ITracerSessionsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ITracerSessionsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface ITracerSessionsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.ITtlSettingsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ITtlSettingsClient.g.cs index 108f8b12..d9fd5ebd 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ITtlSettingsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ITtlSettingsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface ITtlSettingsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IUsageLimitsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IUsageLimitsClient.g.cs index f2d48f01..01a4b849 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IUsageLimitsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IUsageLimitsClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IUsageLimitsClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.IWorkspacesClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.IWorkspacesClient.g.cs index caa93788..bdf60da5 100644 --- a/src/libs/LangSmith/Generated/LangSmith.IWorkspacesClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.IWorkspacesClient.g.cs @@ -9,6 +9,21 @@ namespace LangSmith /// public partial interface IWorkspacesClient : global::System.IDisposable { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.InfoClient.GetServerInfo.g.cs b/src/libs/LangSmith/Generated/LangSmith.InfoClient.GetServerInfo.g.cs index 19896315..76614681 100644 --- a/src/libs/LangSmith/Generated/LangSmith.InfoClient.GetServerInfo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.InfoClient.GetServerInfo.g.cs @@ -29,71 +29,71 @@ partial void ProcessGetServerInfoResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetServerInfoArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/info", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetServerInfoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetServerInfoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetServerInfoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.InfoClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.InfoClient.g.cs index b961285b..9885e65b 100644 --- a/src/libs/LangSmith/Generated/LangSmith.InfoClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.InfoClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class InfoClient : global::LangSmith.IInfoClient, global:: /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class InfoClient : global::LangSmith.IInfoClient, global:: /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public InfoClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Authorizations.ApiKeyInHeader.g.cs b/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Authorizations.ApiKeyInHeader.g.cs index e89f6beb..b40f380f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Authorizations.ApiKeyInHeader.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Authorizations.ApiKeyInHeader.g.cs @@ -14,8 +14,8 @@ public void AuthorizeUsingApiKeyInHeader( { apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey)); - _authorizations.Clear(); - _authorizations.Add(new global::LangSmith.EndPointAuthorization + Authorizations.Clear(); + Authorizations.Add(new global::LangSmith.EndPointAuthorization { Type = "ApiKey", Location = "Header", diff --git a/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Constructors..g.cs b/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Constructors..g.cs index c7d88ef5..d3c32e35 100644 --- a/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Constructors..g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Constructors..g.cs @@ -5,18 +5,19 @@ namespace LangSmith { public sealed partial class LangSmithApi { - /// + /// public LangSmithApi( string apiKey, global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) : this(httpClient, baseUri, authorizations) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) : this(httpClient, baseUri, authorizations, disposeHttpClient) { - Authorizing(_httpClient, ref apiKey); + Authorizing(HttpClient, ref apiKey); AuthorizeUsingApiKeyInHeader(apiKey); - Authorized(_httpClient); + Authorized(HttpClient); } partial void Authorizing( diff --git a/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Health.g.cs b/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Health.g.cs index 80836592..acb4c1f4 100644 --- a/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Health.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Health.g.cs @@ -28,71 +28,71 @@ partial void ProcessHealthResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareHealthArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/health", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareHealthRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessHealthResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessHealthResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Ok.g.cs b/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Ok.g.cs index e49ca181..8ee3a541 100644 --- a/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Ok.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.Ok.g.cs @@ -28,71 +28,71 @@ partial void ProcessOkResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareOkArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/ok", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareOkRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessOkResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessOkResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.g.cs b/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.g.cs index 6ede9d6d..a72b238a 100644 --- a/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.LangSmithApi.g.cs @@ -12,10 +12,18 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -26,7 +34,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public TracerSessionsClient TracerSessions => new TracerSessionsClient(_httpClient, authorizations: _authorizations) + public TracerSessionsClient TracerSessions => new TracerSessionsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -34,7 +42,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public OrgsClient Orgs => new OrgsClient(_httpClient, authorizations: _authorizations) + public OrgsClient Orgs => new OrgsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -42,7 +50,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public AuthClient Auth => new AuthClient(_httpClient, authorizations: _authorizations) + public AuthClient Auth => new AuthClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -50,7 +58,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public ApiKeyClient ApiKey => new ApiKeyClient(_httpClient, authorizations: _authorizations) + public ApiKeyClient ApiKey => new ApiKeyClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -58,7 +66,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public ExamplesClient Examples => new ExamplesClient(_httpClient, authorizations: _authorizations) + public ExamplesClient Examples => new ExamplesClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -66,7 +74,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public DatasetsClient Datasets => new DatasetsClient(_httpClient, authorizations: _authorizations) + public DatasetsClient Datasets => new DatasetsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -74,7 +82,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public RunClient Run => new RunClient(_httpClient, authorizations: _authorizations) + public RunClient Run => new RunClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -82,7 +90,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public FeedbackClient Feedback => new FeedbackClient(_httpClient, authorizations: _authorizations) + public FeedbackClient Feedback => new FeedbackClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -90,7 +98,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public PublicClient Public => new PublicClient(_httpClient, authorizations: _authorizations) + public PublicClient Public => new PublicClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -98,7 +106,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public AnnotationQueuesClient AnnotationQueues => new AnnotationQueuesClient(_httpClient, authorizations: _authorizations) + public AnnotationQueuesClient AnnotationQueues => new AnnotationQueuesClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -106,7 +114,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public AceClient Ace => new AceClient(_httpClient, authorizations: _authorizations) + public AceClient Ace => new AceClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -114,7 +122,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public BulkExportsClient BulkExports => new BulkExportsClient(_httpClient, authorizations: _authorizations) + public BulkExportsClient BulkExports => new BulkExportsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -122,7 +130,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public TenantClient Tenant => new TenantClient(_httpClient, authorizations: _authorizations) + public TenantClient Tenant => new TenantClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -130,7 +138,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public InfoClient Info => new InfoClient(_httpClient, authorizations: _authorizations) + public InfoClient Info => new InfoClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -138,7 +146,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public FeedbackConfigsClient FeedbackConfigs => new FeedbackConfigsClient(_httpClient, authorizations: _authorizations) + public FeedbackConfigsClient FeedbackConfigs => new FeedbackConfigsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -146,7 +154,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public ModelPriceMapClient ModelPriceMap => new ModelPriceMapClient(_httpClient, authorizations: _authorizations) + public ModelPriceMapClient ModelPriceMap => new ModelPriceMapClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -154,7 +162,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public UsageLimitsClient UsageLimits => new UsageLimitsClient(_httpClient, authorizations: _authorizations) + public UsageLimitsClient UsageLimits => new UsageLimitsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -162,7 +170,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public TtlSettingsClient TtlSettings => new TtlSettingsClient(_httpClient, authorizations: _authorizations) + public TtlSettingsClient TtlSettings => new TtlSettingsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -170,7 +178,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public PromptsClient Prompts => new PromptsClient(_httpClient, authorizations: _authorizations) + public PromptsClient Prompts => new PromptsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -178,7 +186,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public WorkspacesClient Workspaces => new WorkspacesClient(_httpClient, authorizations: _authorizations) + public WorkspacesClient Workspaces => new WorkspacesClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -186,7 +194,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public PlaygroundSettingsClient PlaygroundSettings => new PlaygroundSettingsClient(_httpClient, authorizations: _authorizations) + public PlaygroundSettingsClient PlaygroundSettings => new PlaygroundSettingsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -194,7 +202,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public ServiceAccountsClient ServiceAccounts => new ServiceAccountsClient(_httpClient, authorizations: _authorizations) + public ServiceAccountsClient ServiceAccounts => new ServiceAccountsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -202,7 +210,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public ChartsClient Charts => new ChartsClient(_httpClient, authorizations: _authorizations) + public ChartsClient Charts => new ChartsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -210,7 +218,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public ReposClient Repos => new ReposClient(_httpClient, authorizations: _authorizations) + public ReposClient Repos => new ReposClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -218,7 +226,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public LikesClient Likes => new LikesClient(_httpClient, authorizations: _authorizations) + public LikesClient Likes => new LikesClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -226,7 +234,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public CommitsClient Commits => new CommitsClient(_httpClient, authorizations: _authorizations) + public CommitsClient Commits => new CommitsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -234,7 +242,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public SettingsClient Settings => new SettingsClient(_httpClient, authorizations: _authorizations) + public SettingsClient Settings => new SettingsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -242,7 +250,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public EventsClient Events => new EventsClient(_httpClient, authorizations: _authorizations) + public EventsClient Events => new EventsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -250,7 +258,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public CommentsClient Comments => new CommentsClient(_httpClient, authorizations: _authorizations) + public CommentsClient Comments => new CommentsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -258,7 +266,7 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// /// /// - public TagsClient Tags => new TagsClient(_httpClient, authorizations: _authorizations) + public TagsClient Tags => new TagsClient(HttpClient, authorizations: Authorizations) { JsonSerializerContext = JsonSerializerContext, }; @@ -268,25 +276,31 @@ public sealed partial class LangSmithApi : global::LangSmith.ILangSmithApi, glob /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public LangSmithApi( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.LikesClient.LikeRepo.g.cs b/src/libs/LangSmith/Generated/LangSmith.LikesClient.LikeRepo.g.cs index bc895246..b2e488ba 100644 --- a/src/libs/LangSmith/Generated/LangSmith.LikesClient.LikeRepo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.LikesClient.LikeRepo.g.cs @@ -43,34 +43,34 @@ partial void ProcessLikeRepoResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareLikeRepoArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/likes/{owner}/{repo}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -78,48 +78,48 @@ partial void ProcessLikeRepoResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareLikeRepoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessLikeRepoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessLikeRepoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -142,7 +142,7 @@ partial void ProcessLikeRepoResponseContent( bool like, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.LikeRepoRequest + var __request = new global::LangSmith.LikeRepoRequest { Like = like, }; @@ -150,7 +150,7 @@ partial void ProcessLikeRepoResponseContent( return await LikeRepoAsync( owner: owner, repo: repo, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.LikesClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.LikesClient.g.cs index 2a977608..78852ab5 100644 --- a/src/libs/LangSmith/Generated/LangSmith.LikesClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.LikesClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class LikesClient : global::LangSmith.ILikesClient, global /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class LikesClient : global::LangSmith.ILikesClient, global /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public LikesClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.CreateNewModelPrice.g.cs b/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.CreateNewModelPrice.g.cs index e6569168..f0f0e322 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.CreateNewModelPrice.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.CreateNewModelPrice.g.cs @@ -34,32 +34,32 @@ partial void ProcessCreateNewModelPriceResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateNewModelPriceArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/model-price-map", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessCreateNewModelPriceResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateNewModelPriceRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateNewModelPriceResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateNewModelPriceResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -136,7 +136,7 @@ partial void ProcessCreateNewModelPriceResponseContent( string? provider = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.ModelPriceMapCreateSchema + var __request = new global::LangSmith.ModelPriceMapCreateSchema { Name = name, StartTime = startTime, @@ -148,7 +148,7 @@ partial void ProcessCreateNewModelPriceResponseContent( }; return await CreateNewModelPriceAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.DeleteModelPrice.g.cs b/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.DeleteModelPrice.g.cs index c016c945..ccbdcc76 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.DeleteModelPrice.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.DeleteModelPrice.g.cs @@ -32,73 +32,73 @@ partial void ProcessDeleteModelPriceResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteModelPriceArguments( - httpClient: _httpClient, + httpClient: HttpClient, id: ref id); var __pathBuilder = new PathBuilder( path: $"/api/v1/model-price-map/{id}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteModelPriceRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, id: id); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteModelPriceResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteModelPriceResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.ReadModelPriceMap.g.cs b/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.ReadModelPriceMap.g.cs index 2357c1c3..39a3748f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.ReadModelPriceMap.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.ReadModelPriceMap.g.cs @@ -28,71 +28,71 @@ partial void ProcessReadModelPriceMapResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadModelPriceMapArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/model-price-map", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadModelPriceMapRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadModelPriceMapResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadModelPriceMapResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.UpdateModelPrice.g.cs b/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.UpdateModelPrice.g.cs index 16d23ba6..f7cceb77 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.UpdateModelPrice.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.UpdateModelPrice.g.cs @@ -38,33 +38,33 @@ partial void ProcessUpdateModelPriceResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateModelPriceArguments( - httpClient: _httpClient, + httpClient: HttpClient, id: ref id, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/model-price-map/{id}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -72,47 +72,47 @@ partial void ProcessUpdateModelPriceResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateModelPriceRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, id: id, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateModelPriceResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateModelPriceResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -144,7 +144,7 @@ partial void ProcessUpdateModelPriceResponseContent( string? provider = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.ModelPriceMapUpdateSchema + var __request = new global::LangSmith.ModelPriceMapUpdateSchema { Name = name, StartTime = startTime, @@ -157,7 +157,7 @@ partial void ProcessUpdateModelPriceResponseContent( return await UpdateModelPriceAsync( id: id, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.g.cs index 4c16895d..837925cc 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ModelPriceMapClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class ModelPriceMapClient : global::LangSmith.IModelPriceM /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class ModelPriceMapClient : global::LangSmith.IModelPriceM /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public ModelPriceMapClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.Models.RepoTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.Models.RepoTag.g.cs index b4a5a473..90a23c62 100644 --- a/src/libs/LangSmith/Generated/LangSmith.Models.RepoTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.Models.RepoTag.g.cs @@ -29,6 +29,13 @@ public sealed partial class RepoTag [global::System.Text.Json.Serialization.JsonRequired] public required global::System.Guid CommitId { get; set; } + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("commit_hash")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CommitHash { get; set; } + /// /// /// diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.AddBasicAuthMembersToCurrentOrg.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.AddBasicAuthMembersToCurrentOrg.g.cs index b228de3e..137d1e5c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.AddBasicAuthMembersToCurrentOrg.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.AddBasicAuthMembersToCurrentOrg.g.cs @@ -35,32 +35,32 @@ partial void ProcessAddBasicAuthMembersToCurrentOrgResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareAddBasicAuthMembersToCurrentOrgArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/members/basic/batch", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessAddBasicAuthMembersToCurrentOrgResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareAddBasicAuthMembersToCurrentOrgRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessAddBasicAuthMembersToCurrentOrgResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessAddBasicAuthMembersToCurrentOrgResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.AddMemberToCurrentOrg.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.AddMemberToCurrentOrg.g.cs index 610d0d65..fe0c2cca 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.AddMemberToCurrentOrg.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.AddMemberToCurrentOrg.g.cs @@ -34,32 +34,32 @@ partial void ProcessAddMemberToCurrentOrgResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareAddMemberToCurrentOrgArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/members", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessAddMemberToCurrentOrgResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareAddMemberToCurrentOrgRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessAddMemberToCurrentOrgResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessAddMemberToCurrentOrgResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -138,7 +138,7 @@ partial void ProcessAddMemberToCurrentOrgResponseContent( string? fullName = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.PendingIdentityCreate + var __request = new global::LangSmith.PendingIdentityCreate { Email = email, ReadOnly = readOnly, @@ -150,7 +150,7 @@ partial void ProcessAddMemberToCurrentOrgResponseContent( }; return await AddMemberToCurrentOrgAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.AddMembersToCurrentOrgBatch.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.AddMembersToCurrentOrgBatch.g.cs index c1ec8fbe..a7ac161f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.AddMembersToCurrentOrgBatch.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.AddMembersToCurrentOrgBatch.g.cs @@ -35,32 +35,32 @@ partial void ProcessAddMembersToCurrentOrgBatchResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareAddMembersToCurrentOrgBatchArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/members/batch", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessAddMembersToCurrentOrgBatchResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareAddMembersToCurrentOrgBatchRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessAddMembersToCurrentOrgBatchResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessAddMembersToCurrentOrgBatchResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ChangePaymentPlan.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ChangePaymentPlan.g.cs index 481bb85c..310d177c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ChangePaymentPlan.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ChangePaymentPlan.g.cs @@ -34,32 +34,32 @@ partial void ProcessChangePaymentPlanResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareChangePaymentPlanArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/plan", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessChangePaymentPlanResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareChangePaymentPlanRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessChangePaymentPlanResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessChangePaymentPlanResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -124,13 +124,13 @@ partial void ProcessChangePaymentPlanResponseContent( global::LangSmith.ChangePaymentPlanReq tier, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.ChangePaymentPlanSchema + var __request = new global::LangSmith.ChangePaymentPlanSchema { Tier = tier, }; return await ChangePaymentPlanAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ClaimPendingOrganizationInvite.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ClaimPendingOrganizationInvite.g.cs index 9b613417..289bbc0e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ClaimPendingOrganizationInvite.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ClaimPendingOrganizationInvite.g.cs @@ -32,73 +32,73 @@ partial void ProcessClaimPendingOrganizationInviteResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareClaimPendingOrganizationInviteArguments( - httpClient: _httpClient, + httpClient: HttpClient, organizationId: ref organizationId); var __pathBuilder = new PathBuilder( path: $"/api/v1/orgs/pending/{organizationId}/claim", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareClaimPendingOrganizationInviteRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, organizationId: organizationId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessClaimPendingOrganizationInviteResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessClaimPendingOrganizationInviteResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateCustomersAndGetStripeSetupIntent.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateCustomersAndGetStripeSetupIntent.g.cs index fe440243..93089f7c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateCustomersAndGetStripeSetupIntent.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateCustomersAndGetStripeSetupIntent.g.cs @@ -28,71 +28,71 @@ partial void ProcessCreateCustomersAndGetStripeSetupIntentResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateCustomersAndGetStripeSetupIntentArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/setup", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateCustomersAndGetStripeSetupIntentRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateCustomersAndGetStripeSetupIntentResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateCustomersAndGetStripeSetupIntentResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateOrganization.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateOrganization.g.cs index e667bf0e..05b55cff 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateOrganization.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateOrganization.g.cs @@ -34,32 +34,32 @@ partial void ProcessCreateOrganizationResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateOrganizationArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessCreateOrganizationResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateOrganizationRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateOrganizationResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateOrganizationResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -126,14 +126,14 @@ partial void ProcessCreateOrganizationResponseContent( bool isPersonal, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.OrganizationCreate + var __request = new global::LangSmith.OrganizationCreate { DisplayName = displayName, IsPersonal = isPersonal, }; return await CreateOrganizationAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateOrganizationRoles.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateOrganizationRoles.g.cs index 6acc31c8..a725f07b 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateOrganizationRoles.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateOrganizationRoles.g.cs @@ -34,32 +34,32 @@ partial void ProcessCreateOrganizationRolesResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateOrganizationRolesArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/roles", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessCreateOrganizationRolesResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateOrganizationRolesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateOrganizationRolesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateOrganizationRolesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -128,7 +128,7 @@ partial void ProcessCreateOrganizationRolesResponseContent( global::System.Collections.Generic.IList permissions, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CreateRoleRequest + var __request = new global::LangSmith.CreateRoleRequest { DisplayName = displayName, Description = description, @@ -136,7 +136,7 @@ partial void ProcessCreateOrganizationRolesResponseContent( }; return await CreateOrganizationRolesAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateSsoSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateSsoSettings.g.cs index df48c2f0..e1a9b4ad 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateSsoSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.CreateSsoSettings.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateSsoSettingsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateSsoSettingsArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/sso-settings", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateSsoSettingsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateSsoSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateSsoSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateSsoSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -134,7 +134,7 @@ partial void ProcessCreateSsoSettingsResponseContent( global::System.Collections.Generic.Dictionary? attributeMapping = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.SSOSettingsCreate + var __request = new global::LangSmith.SSOSettingsCreate { DefaultWorkspaceRoleId = defaultWorkspaceRoleId, DefaultWorkspaceIds = defaultWorkspaceIds, @@ -144,7 +144,7 @@ partial void ProcessCreateSsoSettingsResponseContent( }; return await CreateSsoSettingsAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeleteCurrentOrgPendingMember.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeleteCurrentOrgPendingMember.g.cs index 1838ed1f..76d9fb40 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeleteCurrentOrgPendingMember.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeleteCurrentOrgPendingMember.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteCurrentOrgPendingMemberResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteCurrentOrgPendingMemberArguments( - httpClient: _httpClient, + httpClient: HttpClient, identityId: ref identityId); var __pathBuilder = new PathBuilder( path: $"/api/v1/orgs/current/members/{identityId}/pending", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteCurrentOrgPendingMemberRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, identityId: identityId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteCurrentOrgPendingMemberResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteCurrentOrgPendingMemberResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeleteOrganizationRoles.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeleteOrganizationRoles.g.cs index 84c76826..eb4da88b 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeleteOrganizationRoles.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeleteOrganizationRoles.g.cs @@ -32,73 +32,73 @@ partial void ProcessDeleteOrganizationRolesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteOrganizationRolesArguments( - httpClient: _httpClient, + httpClient: HttpClient, roleId: ref roleId); var __pathBuilder = new PathBuilder( path: $"/api/v1/orgs/current/roles/{roleId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteOrganizationRolesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, roleId: roleId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteOrganizationRolesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteOrganizationRolesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeletePendingOrganizationInvite.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeletePendingOrganizationInvite.g.cs index 6314eefb..642644c5 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeletePendingOrganizationInvite.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeletePendingOrganizationInvite.g.cs @@ -32,73 +32,73 @@ partial void ProcessDeletePendingOrganizationInviteResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeletePendingOrganizationInviteArguments( - httpClient: _httpClient, + httpClient: HttpClient, organizationId: ref organizationId); var __pathBuilder = new PathBuilder( path: $"/api/v1/orgs/pending/{organizationId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeletePendingOrganizationInviteRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, organizationId: organizationId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeletePendingOrganizationInviteResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeletePendingOrganizationInviteResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeleteSsoSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeleteSsoSettings.g.cs index a78ad9aa..ab2555a0 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeleteSsoSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.DeleteSsoSettings.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteSsoSettingsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteSsoSettingsArguments( - httpClient: _httpClient, + httpClient: HttpClient, id: ref id); var __pathBuilder = new PathBuilder( path: $"/api/v1/orgs/current/sso-settings/{id}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteSsoSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, id: id); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteSsoSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteSsoSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCompanyInfo.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCompanyInfo.g.cs index 7b80b561..fd726c7f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCompanyInfo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCompanyInfo.g.cs @@ -28,71 +28,71 @@ partial void ProcessGetCompanyInfoResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetCompanyInfoArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/business-info", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetCompanyInfoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetCompanyInfoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetCompanyInfoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentOrgMembers.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentOrgMembers.g.cs index 7ba83c08..bd00d651 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentOrgMembers.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentOrgMembers.g.cs @@ -28,71 +28,71 @@ partial void ProcessGetCurrentOrgMembersResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetCurrentOrgMembersArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/members", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetCurrentOrgMembersRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetCurrentOrgMembersResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetCurrentOrgMembersResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentOrganizationInfo.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentOrganizationInfo.g.cs index d48eb93c..ae44112e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentOrganizationInfo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentOrganizationInfo.g.cs @@ -28,71 +28,71 @@ partial void ProcessGetCurrentOrganizationInfoResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetCurrentOrganizationInfoArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/info", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetCurrentOrganizationInfoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetCurrentOrganizationInfoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetCurrentOrganizationInfoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentSsoSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentSsoSettings.g.cs index ec559b62..877b8b9c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentSsoSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentSsoSettings.g.cs @@ -29,71 +29,71 @@ partial void ProcessGetCurrentSsoSettingsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetCurrentSsoSettingsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/sso-settings", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetCurrentSsoSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetCurrentSsoSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetCurrentSsoSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentUserLoginMethods.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentUserLoginMethods.g.cs index 81e3298f..a7e221ff 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentUserLoginMethods.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetCurrentUserLoginMethods.g.cs @@ -29,71 +29,71 @@ partial void ProcessGetCurrentUserLoginMethodsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetCurrentUserLoginMethodsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/user/login-methods", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetCurrentUserLoginMethodsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetCurrentUserLoginMethodsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetCurrentUserLoginMethodsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetDashboard.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetDashboard.g.cs index 0156cd5e..560e3b82 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetDashboard.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetDashboard.g.cs @@ -40,79 +40,79 @@ partial void ProcessGetDashboardResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetDashboardArguments( - httpClient: _httpClient, + httpClient: HttpClient, type: ref type, colorScheme: ref colorScheme); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/dashboard", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("type", type.ToValueString()) .AddRequiredParameter("color_scheme", colorScheme.ToValueString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetDashboardRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, type: type, colorScheme: colorScheme); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetDashboardResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetDashboardResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetOrganizationBillingInfo.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetOrganizationBillingInfo.g.cs index 7599cb76..2bde5ddb 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetOrganizationBillingInfo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetOrganizationBillingInfo.g.cs @@ -28,71 +28,71 @@ partial void ProcessGetOrganizationBillingInfoResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetOrganizationBillingInfoArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/billing", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetOrganizationBillingInfoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetOrganizationBillingInfoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetOrganizationBillingInfoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetOrganizationInfo.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetOrganizationInfo.g.cs index 4ca7f058..5bc03f84 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetOrganizationInfo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.GetOrganizationInfo.g.cs @@ -28,71 +28,71 @@ partial void ProcessGetOrganizationInfoResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetOrganizationInfoArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetOrganizationInfoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetOrganizationInfoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetOrganizationInfoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListOrganizationRoles.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListOrganizationRoles.g.cs index cda53c86..ce2645b1 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListOrganizationRoles.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListOrganizationRoles.g.cs @@ -28,71 +28,71 @@ partial void ProcessListOrganizationRolesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListOrganizationRolesArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/roles", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListOrganizationRolesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListOrganizationRolesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListOrganizationRolesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListOrganizations.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListOrganizations.g.cs index b693354a..0a51b4a2 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListOrganizations.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListOrganizations.g.cs @@ -35,76 +35,76 @@ partial void ProcessListOrganizationsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListOrganizationsArguments( - httpClient: _httpClient, + httpClient: HttpClient, skipCreate: ref skipCreate); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("skip_create", skipCreate?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListOrganizationsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, skipCreate: skipCreate); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListOrganizationsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListOrganizationsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListPendingOrganizationInvites.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListPendingOrganizationInvites.g.cs index 204257ed..0cf833a9 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListPendingOrganizationInvites.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListPendingOrganizationInvites.g.cs @@ -29,71 +29,71 @@ partial void ProcessListPendingOrganizationInvitesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListPendingOrganizationInvitesArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/pending", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListPendingOrganizationInvitesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListPendingOrganizationInvitesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListPendingOrganizationInvitesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListPermissions.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListPermissions.g.cs index fe1eb525..4553ec8f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListPermissions.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListPermissions.g.cs @@ -28,71 +28,71 @@ partial void ProcessListPermissionsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListPermissionsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/permissions", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListPermissionsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListPermissionsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListPermissionsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListTtlSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListTtlSettings.g.cs index 871a16d0..f0039119 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListTtlSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.ListTtlSettings.g.cs @@ -29,71 +29,71 @@ partial void ProcessListTtlSettingsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListTtlSettingsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/ttl-settings", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListTtlSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListTtlSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListTtlSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.OnPaymentMethodCreated.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.OnPaymentMethodCreated.g.cs index 26ce2377..2a97278b 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.OnPaymentMethodCreated.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.OnPaymentMethodCreated.g.cs @@ -34,32 +34,32 @@ partial void ProcessOnPaymentMethodCreatedResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareOnPaymentMethodCreatedArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/payment-method", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessOnPaymentMethodCreatedResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareOnPaymentMethodCreatedRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessOnPaymentMethodCreatedResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessOnPaymentMethodCreatedResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -126,14 +126,14 @@ partial void ProcessOnPaymentMethodCreatedResponseContent( string setupIntent, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.StripePaymentInformation + var __request = new global::LangSmith.StripePaymentInformation { BillingInfo = billingInfo, SetupIntent = setupIntent, }; return await OnPaymentMethodCreatedAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.RemoveMemberFromCurrentOrg.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.RemoveMemberFromCurrentOrg.g.cs index 6a7b85e7..58e83a15 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.RemoveMemberFromCurrentOrg.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.RemoveMemberFromCurrentOrg.g.cs @@ -33,73 +33,73 @@ partial void ProcessRemoveMemberFromCurrentOrgResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareRemoveMemberFromCurrentOrgArguments( - httpClient: _httpClient, + httpClient: HttpClient, identityId: ref identityId); var __pathBuilder = new PathBuilder( path: $"/api/v1/orgs/current/members/{identityId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareRemoveMemberFromCurrentOrgRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, identityId: identityId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessRemoveMemberFromCurrentOrgResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessRemoveMemberFromCurrentOrgResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.SetCompanyInfo.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.SetCompanyInfo.g.cs index 1178fc5b..85b69a5d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.SetCompanyInfo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.SetCompanyInfo.g.cs @@ -34,32 +34,32 @@ partial void ProcessSetCompanyInfoResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareSetCompanyInfoArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/business-info", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessSetCompanyInfoResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareSetCompanyInfoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessSetCompanyInfoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessSetCompanyInfoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -134,7 +134,7 @@ partial void ProcessSetCompanyInfoResponseContent( bool? isBusiness = false, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.StripeBusinessInfoInput + var __request = new global::LangSmith.StripeBusinessInfoInput { CompanyInfo = companyInfo, TaxId = taxId, @@ -143,7 +143,7 @@ partial void ProcessSetCompanyInfoResponseContent( }; return await SetCompanyInfoAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateAllowedLoginMethods.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateAllowedLoginMethods.g.cs index aa08891d..b2119b70 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateAllowedLoginMethods.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateAllowedLoginMethods.g.cs @@ -35,32 +35,32 @@ partial void ProcessUpdateAllowedLoginMethodsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateAllowedLoginMethodsArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/login-methods", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessUpdateAllowedLoginMethodsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateAllowedLoginMethodsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateAllowedLoginMethodsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateAllowedLoginMethodsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -124,13 +124,13 @@ partial void ProcessUpdateAllowedLoginMethodsResponseContent( bool ssoOnly, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.AllowedLoginMethodsUpdate + var __request = new global::LangSmith.AllowedLoginMethodsUpdate { SsoOnly = ssoOnly, }; return await UpdateAllowedLoginMethodsAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateCurrentOrgMember.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateCurrentOrgMember.g.cs index 8b930f4e..33905803 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateCurrentOrgMember.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateCurrentOrgMember.g.cs @@ -39,33 +39,33 @@ partial void ProcessUpdateCurrentOrgMemberResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateCurrentOrgMemberArguments( - httpClient: _httpClient, + httpClient: HttpClient, identityId: ref identityId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/orgs/current/members/{identityId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessUpdateCurrentOrgMemberResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateCurrentOrgMemberRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, identityId: identityId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateCurrentOrgMemberResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateCurrentOrgMemberResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -136,7 +136,7 @@ partial void ProcessUpdateCurrentOrgMemberResponseContent( global::System.Guid? roleId = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.OrgIdentityPatch + var __request = new global::LangSmith.OrgIdentityPatch { Password = password, FullName = fullName, @@ -145,7 +145,7 @@ partial void ProcessUpdateCurrentOrgMemberResponseContent( return await UpdateCurrentOrgMemberAsync( identityId: identityId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateCurrentOrganizationInfo.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateCurrentOrganizationInfo.g.cs index 3b576e1c..a3acaf35 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateCurrentOrganizationInfo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateCurrentOrganizationInfo.g.cs @@ -34,32 +34,32 @@ partial void ProcessUpdateCurrentOrganizationInfoResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateCurrentOrganizationInfoArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/current/info", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessUpdateCurrentOrganizationInfoResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateCurrentOrganizationInfoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateCurrentOrganizationInfoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateCurrentOrganizationInfoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -124,13 +124,13 @@ partial void ProcessUpdateCurrentOrganizationInfoResponseContent( string? displayName = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.OrganizationUpdate + var __request = new global::LangSmith.OrganizationUpdate { DisplayName = displayName, }; return await UpdateCurrentOrganizationInfoAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateCurrentUser.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateCurrentUser.g.cs index 32c74f11..f931ee8d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateCurrentUser.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateCurrentUser.g.cs @@ -35,32 +35,32 @@ partial void ProcessUpdateCurrentUserResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateCurrentUserArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/members/basic", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessUpdateCurrentUserResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateCurrentUserRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateCurrentUserResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateCurrentUserResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -126,14 +126,14 @@ partial void ProcessUpdateCurrentUserResponseContent( string? fullName = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.BasicAuthUserPatch + var __request = new global::LangSmith.BasicAuthUserPatch { Password = password, FullName = fullName, }; return await UpdateCurrentUserAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateOrganizationRoles.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateOrganizationRoles.g.cs index e2020e4f..a046e4b3 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateOrganizationRoles.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateOrganizationRoles.g.cs @@ -38,33 +38,33 @@ partial void ProcessUpdateOrganizationRolesResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateOrganizationRolesArguments( - httpClient: _httpClient, + httpClient: HttpClient, roleId: ref roleId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/orgs/current/roles/{roleId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -72,47 +72,47 @@ partial void ProcessUpdateOrganizationRolesResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateOrganizationRolesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, roleId: roleId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateOrganizationRolesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateOrganizationRolesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -136,7 +136,7 @@ partial void ProcessUpdateOrganizationRolesResponseContent( global::System.Collections.Generic.IList permissions, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.UpdateRoleRequest + var __request = new global::LangSmith.UpdateRoleRequest { DisplayName = displayName, Description = description, @@ -145,7 +145,7 @@ partial void ProcessUpdateOrganizationRolesResponseContent( return await UpdateOrganizationRolesAsync( roleId: roleId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateSsoSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateSsoSettings.g.cs index 2cce1c57..bf34cc7a 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateSsoSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpdateSsoSettings.g.cs @@ -39,33 +39,33 @@ partial void ProcessUpdateSsoSettingsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateSsoSettingsArguments( - httpClient: _httpClient, + httpClient: HttpClient, id: ref id, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/orgs/current/sso-settings/{id}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessUpdateSsoSettingsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateSsoSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, id: id, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateSsoSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateSsoSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -140,7 +140,7 @@ partial void ProcessUpdateSsoSettingsResponseContent( string? metadataXml = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.SSOSettingsUpdate + var __request = new global::LangSmith.SSOSettingsUpdate { DefaultWorkspaceRoleId = defaultWorkspaceRoleId, DefaultWorkspaceIds = defaultWorkspaceIds, @@ -150,7 +150,7 @@ partial void ProcessUpdateSsoSettingsResponseContent( return await UpdateSsoSettingsAsync( id: id, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpsertTtlSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpsertTtlSettings.g.cs index 9c69c72b..34ddbf21 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpsertTtlSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.UpsertTtlSettings.g.cs @@ -34,32 +34,32 @@ partial void ProcessUpsertTtlSettingsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpsertTtlSettingsArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/orgs/ttl-settings", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessUpsertTtlSettingsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpsertTtlSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpsertTtlSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpsertTtlSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -130,7 +130,7 @@ partial void ProcessUpsertTtlSettingsResponseContent( bool? applyToAllProjects = false, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.UpsertTTLSettingsRequest + var __request = new global::LangSmith.UpsertTTLSettingsRequest { TenantId = tenantId, DefaultTraceTier = defaultTraceTier, @@ -138,7 +138,7 @@ partial void ProcessUpsertTtlSettingsResponseContent( }; return await UpsertTtlSettingsAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.g.cs index 5ddb0dd9..d67e0d1b 100644 --- a/src/libs/LangSmith/Generated/LangSmith.OrgsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.OrgsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class OrgsClient : global::LangSmith.IOrgsClient, global:: /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class OrgsClient : global::LangSmith.IOrgsClient, global:: /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public OrgsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.CreatePlaygroundSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.CreatePlaygroundSettings.g.cs index c190a887..5e321021 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.CreatePlaygroundSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.CreatePlaygroundSettings.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreatePlaygroundSettingsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreatePlaygroundSettingsArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/playground-settings", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreatePlaygroundSettingsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreatePlaygroundSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreatePlaygroundSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreatePlaygroundSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -128,14 +128,14 @@ partial void ProcessCreatePlaygroundSettingsResponseContent( string? name = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.PlaygroundSettingsCreateRequest + var __request = new global::LangSmith.PlaygroundSettingsCreateRequest { Settings = settings, Name = name, }; return await CreatePlaygroundSettingsAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.DeletePlaygroundSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.DeletePlaygroundSettings.g.cs index 26e0bab9..d6d3968d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.DeletePlaygroundSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.DeletePlaygroundSettings.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeletePlaygroundSettingsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeletePlaygroundSettingsArguments( - httpClient: _httpClient, + httpClient: HttpClient, playgroundSettingsId: ref playgroundSettingsId); var __pathBuilder = new PathBuilder( path: $"/api/v1/playground-settings/{playgroundSettingsId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeletePlaygroundSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, playgroundSettingsId: playgroundSettingsId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeletePlaygroundSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeletePlaygroundSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.ListPlaygroundSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.ListPlaygroundSettings.g.cs index 31056ef4..a167a771 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.ListPlaygroundSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.ListPlaygroundSettings.g.cs @@ -29,71 +29,71 @@ partial void ProcessListPlaygroundSettingsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListPlaygroundSettingsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/playground-settings", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListPlaygroundSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListPlaygroundSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListPlaygroundSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.UpdatePlaygroundSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.UpdatePlaygroundSettings.g.cs index 3251ce4f..ce23be66 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.UpdatePlaygroundSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.UpdatePlaygroundSettings.g.cs @@ -39,33 +39,33 @@ partial void ProcessUpdatePlaygroundSettingsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdatePlaygroundSettingsArguments( - httpClient: _httpClient, + httpClient: HttpClient, playgroundSettingsId: ref playgroundSettingsId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/playground-settings/{playgroundSettingsId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessUpdatePlaygroundSettingsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdatePlaygroundSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, playgroundSettingsId: playgroundSettingsId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdatePlaygroundSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdatePlaygroundSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -134,14 +134,14 @@ partial void ProcessUpdatePlaygroundSettingsResponseContent( string? name = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.PlaygroundSettingsUpdateRequest + var __request = new global::LangSmith.PlaygroundSettingsUpdateRequest { Name = name, }; return await UpdatePlaygroundSettingsAsync( playgroundSettingsId: playgroundSettingsId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.g.cs index dc828e50..f527e643 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PlaygroundSettingsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class PlaygroundSettingsClient : global::LangSmith.IPlaygr /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class PlaygroundSettingsClient : global::LangSmith.IPlaygr /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public PlaygroundSettingsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.PromptsClient.InvokePrompt.g.cs b/src/libs/LangSmith/Generated/LangSmith.PromptsClient.InvokePrompt.g.cs index 7bf42243..0564ef28 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PromptsClient.InvokePrompt.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PromptsClient.InvokePrompt.g.cs @@ -34,32 +34,32 @@ partial void ProcessInvokePromptResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareInvokePromptArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/prompts/invoke_prompt", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessInvokePromptResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareInvokePromptRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessInvokePromptResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessInvokePromptResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -126,7 +126,7 @@ partial void ProcessInvokePromptResponseContent( object inputs, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.InvokePromptPayload + var __request = new global::LangSmith.InvokePromptPayload { Messages = messages, TemplateFormat = templateFormat, @@ -134,7 +134,7 @@ partial void ProcessInvokePromptResponseContent( }; return await InvokePromptAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.PromptsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.PromptsClient.g.cs index 81c7b4be..e71acf33 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PromptsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PromptsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class PromptsClient : global::LangSmith.IPromptsClient, gl /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class PromptsClient : global::LangSmith.IPromptsClient, gl /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// 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::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.CountSharedExamples.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.CountSharedExamples.g.cs index 60b4df60..24a5ab1c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.CountSharedExamples.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.CountSharedExamples.g.cs @@ -52,9 +52,9 @@ partial void ProcessCountSharedExamplesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCountSharedExamplesArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, id: id, asOf: ref asOf, @@ -63,7 +63,7 @@ partial void ProcessCountSharedExamplesResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/examples/count", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("id", id, selector: static x => x.ToString(), delimiter: ",", explode: true) .AddOptionalParameter("as_of", asOf?.ToString() ?? string.Empty) @@ -71,68 +71,68 @@ partial void ProcessCountSharedExamplesResponseContent( .AddOptionalParameter("filter", filter) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCountSharedExamplesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, id: id, asOf: asOf, metadata: metadata, filter: filter); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCountSharedExamplesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCountSharedExamplesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.GenerateQueryForSharedDatasetRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.GenerateQueryForSharedDatasetRuns.g.cs index 6c7e5643..8427706e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.GenerateQueryForSharedDatasetRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.GenerateQueryForSharedDatasetRuns.g.cs @@ -39,33 +39,33 @@ partial void ProcessGenerateQueryForSharedDatasetRunsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGenerateQueryForSharedDatasetRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/datasets/runs/generate-query", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessGenerateQueryForSharedDatasetRunsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGenerateQueryForSharedDatasetRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGenerateQueryForSharedDatasetRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGenerateQueryForSharedDatasetRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -136,7 +136,7 @@ partial void ProcessGenerateQueryForSharedDatasetRunsResponseContent( global::System.Collections.Generic.IList? feedbackKeys = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.RequestBodyForRunsGenerateQuery + var __request = new global::LangSmith.RequestBodyForRunsGenerateQuery { Query = query, FeedbackKeys = feedbackKeys, @@ -144,7 +144,7 @@ partial void ProcessGenerateQueryForSharedDatasetRunsResponseContent( return await GenerateQueryForSharedDatasetRunsAsync( shareToken: shareToken, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.GetMessageJsonSchema.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.GetMessageJsonSchema.g.cs index eee6a5b7..82d258ac 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.GetMessageJsonSchema.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.GetMessageJsonSchema.g.cs @@ -32,73 +32,73 @@ partial void ProcessGetMessageJsonSchemaResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetMessageJsonSchemaArguments( - httpClient: _httpClient, + httpClient: HttpClient, version: ref version); var __pathBuilder = new PathBuilder( path: $"/api/v1/public/schemas/{version}/message.json", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetMessageJsonSchemaRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, version: version); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetMessageJsonSchemaResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetMessageJsonSchemaResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.GetSharedRun.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.GetSharedRun.g.cs index 02be634d..f8a41ac0 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.GetSharedRun.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.GetSharedRun.g.cs @@ -39,78 +39,78 @@ partial void ProcessGetSharedRunResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetSharedRunArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, excludeS3StoredAttributes: ref excludeS3StoredAttributes); var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/run", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("exclude_s3_stored_attributes", excludeS3StoredAttributes?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetSharedRunRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, excludeS3StoredAttributes: excludeS3StoredAttributes); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetSharedRunResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetSharedRunResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.GetSharedRunById.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.GetSharedRunById.g.cs index dbb5a851..81858973 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.GetSharedRunById.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.GetSharedRunById.g.cs @@ -43,80 +43,80 @@ partial void ProcessGetSharedRunByIdResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetSharedRunByIdArguments( - httpClient: _httpClient, + httpClient: HttpClient, id: ref id, shareToken: ref shareToken, excludeS3StoredAttributes: ref excludeS3StoredAttributes); var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/run/{id}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("exclude_s3_stored_attributes", excludeS3StoredAttributes?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetSharedRunByIdRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, id: id, shareToken: shareToken, excludeS3StoredAttributes: excludeS3StoredAttributes); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetSharedRunByIdResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetSharedRunByIdResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.QuerySharedDatasetRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.QuerySharedDatasetRuns.g.cs index 9fef843f..b0b36dbc 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.QuerySharedDatasetRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.QuerySharedDatasetRuns.g.cs @@ -39,33 +39,33 @@ partial void ProcessQuerySharedDatasetRunsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareQuerySharedDatasetRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/datasets/runs/query", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessQuerySharedDatasetRunsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareQuerySharedDatasetRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessQuerySharedDatasetRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessQuerySharedDatasetRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -182,7 +182,7 @@ partial void ProcessQuerySharedDatasetRunsResponseContent( global::LangSmith.RunDateOrder? order = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.BodyParamsForRunSchema + var __request = new global::LangSmith.BodyParamsForRunSchema { Id = id, Trace = trace, @@ -208,7 +208,7 @@ partial void ProcessQuerySharedDatasetRunsResponseContent( return await QuerySharedDatasetRunsAsync( shareToken: shareToken, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.QuerySharedRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.QuerySharedRuns.g.cs index a1807ca3..7849cb70 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.QuerySharedRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.QuerySharedRuns.g.cs @@ -39,33 +39,33 @@ partial void ProcessQuerySharedRunsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareQuerySharedRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/runs/query", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessQuerySharedRunsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareQuerySharedRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessQuerySharedRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessQuerySharedRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -134,14 +134,14 @@ partial void ProcessQuerySharedRunsResponseContent( global::System.Collections.Generic.IList? id = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.QueryParamsForPublicRunSchema + var __request = new global::LangSmith.QueryParamsForPublicRunSchema { Id = id, }; return await QuerySharedRunsAsync( shareToken: shareToken, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedComparativeExperiments.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedComparativeExperiments.g.cs index 3b2eb499..64ab5dea 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedComparativeExperiments.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedComparativeExperiments.g.cs @@ -65,9 +65,9 @@ partial void ProcessReadSharedComparativeExperimentsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadSharedComparativeExperimentsArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, name: ref name, nameContains: ref nameContains, @@ -78,7 +78,7 @@ partial void ProcessReadSharedComparativeExperimentsResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/datasets/comparative", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("name", name) .AddOptionalParameter("name_contains", nameContains) @@ -88,32 +88,32 @@ partial void ProcessReadSharedComparativeExperimentsResponseContent( .AddOptionalParameter("sort_by_desc", sortByDesc?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadSharedComparativeExperimentsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, name: name, nameContains: nameContains, @@ -122,36 +122,36 @@ partial void ProcessReadSharedComparativeExperimentsResponseContent( sortBy: sortBy, sortByDesc: sortByDesc); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadSharedComparativeExperimentsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadSharedComparativeExperimentsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDataset.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDataset.g.cs index 62dd9ed6..f277dd2e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDataset.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDataset.g.cs @@ -57,9 +57,9 @@ partial void ProcessReadSharedDatasetResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadSharedDatasetArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, offset: ref offset, limit: ref limit, @@ -68,7 +68,7 @@ partial void ProcessReadSharedDatasetResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/datasets", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("offset", offset?.ToString()) .AddOptionalParameter("limit", limit?.ToString()) @@ -76,68 +76,68 @@ partial void ProcessReadSharedDatasetResponseContent( .AddOptionalParameter("sort_by_desc", sortByDesc?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadSharedDatasetRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, offset: offset, limit: limit, sortBy: sortBy, sortByDesc: sortByDesc); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadSharedDatasetResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadSharedDatasetResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetExamplesWithRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetExamplesWithRuns.g.cs index 42828b95..18580885 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetExamplesWithRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetExamplesWithRuns.g.cs @@ -39,33 +39,33 @@ partial void ProcessReadSharedDatasetExamplesWithRunsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadSharedDatasetExamplesWithRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/examples/runs", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessReadSharedDatasetExamplesWithRunsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadSharedDatasetExamplesWithRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadSharedDatasetExamplesWithRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadSharedDatasetExamplesWithRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -146,7 +146,7 @@ partial void ProcessReadSharedDatasetExamplesWithRunsResponseContent( int? limit = 20, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.QueryExampleSchemaWithRuns + var __request = new global::LangSmith.QueryExampleSchemaWithRuns { SessionIds = sessionIds, ComparativeExperimentId = comparativeExperimentId, @@ -157,7 +157,7 @@ partial void ProcessReadSharedDatasetExamplesWithRunsResponseContent( return await ReadSharedDatasetExamplesWithRunsAsync( shareToken: shareToken, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetFeedback.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetFeedback.g.cs index 5c522ec1..a9b887e2 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetFeedback.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetFeedback.g.cs @@ -79,9 +79,9 @@ partial void ProcessReadSharedDatasetFeedbackResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadSharedDatasetFeedbackArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, run: run, key: key, @@ -96,7 +96,7 @@ partial void ProcessReadSharedDatasetFeedbackResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/datasets/feedback", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("run", run, selector: static x => x.ToString(), delimiter: ",", explode: true) .AddOptionalParameter("key", key, delimiter: ",", explode: true) @@ -109,32 +109,32 @@ partial void ProcessReadSharedDatasetFeedbackResponseContent( .AddOptionalParameter("level", level?.ToValueString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadSharedDatasetFeedbackRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, run: run, key: key, @@ -147,36 +147,36 @@ partial void ProcessReadSharedDatasetFeedbackResponseContent( hasScore: hasScore, level: level); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadSharedDatasetFeedbackResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadSharedDatasetFeedbackResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetRun.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetRun.g.cs index d6d3c39c..efb7554e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetRun.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetRun.g.cs @@ -43,80 +43,80 @@ partial void ProcessReadSharedDatasetRunResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadSharedDatasetRunArguments( - httpClient: _httpClient, + httpClient: HttpClient, runId: ref runId, shareToken: ref shareToken, excludeS3StoredAttributes: ref excludeS3StoredAttributes); var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/datasets/runs/{runId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("exclude_s3_stored_attributes", excludeS3StoredAttributes?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadSharedDatasetRunRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, runId: runId, shareToken: shareToken, excludeS3StoredAttributes: excludeS3StoredAttributes); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadSharedDatasetRunResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadSharedDatasetRunResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetTracerSessions.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetTracerSessions.g.cs index d2c1aceb..36f022ad 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetTracerSessions.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDatasetTracerSessions.g.cs @@ -85,9 +85,9 @@ partial void ProcessReadSharedDatasetTracerSessionsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadSharedDatasetTracerSessionsArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, id: id, name: ref name, @@ -103,7 +103,7 @@ partial void ProcessReadSharedDatasetTracerSessionsResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/datasets/sessions", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("id", id, selector: static x => x.ToString(), delimiter: ",", explode: true) .AddOptionalParameter("name", name) @@ -117,38 +117,38 @@ partial void ProcessReadSharedDatasetTracerSessionsResponseContent( .AddOptionalParameter("facets", facets?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } if (accept != default) { - httpRequest.Headers.TryAddWithoutValidation("accept", accept.ToString()); + __httpRequest.Headers.TryAddWithoutValidation("accept", accept.ToString()); } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadSharedDatasetTracerSessionsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, id: id, name: name, @@ -162,36 +162,36 @@ partial void ProcessReadSharedDatasetTracerSessionsResponseContent( facets: facets, accept: accept); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadSharedDatasetTracerSessionsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadSharedDatasetTracerSessionsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDelta.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDelta.g.cs index 76cf0eb4..15873c91 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDelta.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedDelta.g.cs @@ -39,33 +39,33 @@ partial void ProcessReadSharedDeltaResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadSharedDeltaArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/datasets/runs/delta", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessReadSharedDeltaResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadSharedDeltaRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadSharedDeltaResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadSharedDeltaResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -150,7 +150,7 @@ partial void ProcessReadSharedDeltaResponseContent( global::System.Guid? comparativeExperimentId = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.QueryFeedbackDelta + var __request = new global::LangSmith.QueryFeedbackDelta { BaselineSessionId = baselineSessionId, ComparisonSessionIds = comparisonSessionIds, @@ -163,7 +163,7 @@ partial void ProcessReadSharedDeltaResponseContent( return await ReadSharedDeltaAsync( shareToken: shareToken, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedExamples.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedExamples.g.cs index a9fb152a..9889858c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedExamples.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedExamples.g.cs @@ -70,9 +70,9 @@ partial void ProcessReadSharedExamplesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadSharedExamplesArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, id: id, asOf: ref asOf, @@ -84,7 +84,7 @@ partial void ProcessReadSharedExamplesResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/examples", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("id", id, selector: static x => x.ToString(), delimiter: ",", explode: true) .AddOptionalParameter("as_of", asOf?.ToString() ?? string.Empty) @@ -94,32 +94,32 @@ partial void ProcessReadSharedExamplesResponseContent( .AddOptionalParameter("filter", filter) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadSharedExamplesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, id: id, asOf: asOf, @@ -129,36 +129,36 @@ partial void ProcessReadSharedExamplesResponseContent( select: select, filter: filter); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadSharedExamplesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadSharedExamplesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedFeedbacks.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedFeedbacks.g.cs index cb29d058..8443939d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedFeedbacks.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.ReadSharedFeedbacks.g.cs @@ -78,9 +78,9 @@ partial void ProcessReadSharedFeedbacksResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadSharedFeedbacksArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, run: run, key: key, @@ -95,7 +95,7 @@ partial void ProcessReadSharedFeedbacksResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/feedbacks", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("run", run, selector: static x => x.ToString(), delimiter: ",", explode: true) .AddOptionalParameter("key", key, delimiter: ",", explode: true) @@ -108,32 +108,32 @@ partial void ProcessReadSharedFeedbacksResponseContent( .AddOptionalParameter("level", level?.ToValueString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadSharedFeedbacksRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, run: run, key: key, @@ -146,36 +146,36 @@ partial void ProcessReadSharedFeedbacksResponseContent( hasScore: hasScore, level: level); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadSharedFeedbacksResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadSharedFeedbacksResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.StatsSharedDatasetRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.StatsSharedDatasetRuns.g.cs index 5f6c4636..55334ea8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.StatsSharedDatasetRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.StatsSharedDatasetRuns.g.cs @@ -39,33 +39,33 @@ partial void ProcessStatsSharedDatasetRunsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareStatsSharedDatasetRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, shareToken: ref shareToken, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/public/{shareToken}/datasets/runs/stats", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessStatsSharedDatasetRunsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareStatsSharedDatasetRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, shareToken: shareToken, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessStatsSharedDatasetRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessStatsSharedDatasetRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -168,7 +168,7 @@ partial void ProcessStatsSharedDatasetRunsResponseContent( global::LangSmith.RunsFilterDataSourceTypeEnum? dataSourceType = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.FilterQueryParamsForRunSchema + var __request = new global::LangSmith.FilterQueryParamsForRunSchema { Id = id, Trace = trace, @@ -190,7 +190,7 @@ partial void ProcessStatsSharedDatasetRunsResponseContent( return await StatsSharedDatasetRunsAsync( shareToken: shareToken, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.PublicClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.PublicClient.g.cs index 92df11ac..78a657ae 100644 --- a/src/libs/LangSmith/Generated/LangSmith.PublicClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.PublicClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class PublicClient : global::LangSmith.IPublicClient, glob /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class PublicClient : global::LangSmith.IPublicClient, glob /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public PublicClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.ReposClient.CreateRepo.g.cs b/src/libs/LangSmith/Generated/LangSmith.ReposClient.CreateRepo.g.cs index d690c9b4..5db65b9e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ReposClient.CreateRepo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ReposClient.CreateRepo.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateRepoResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateRepoArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/repos", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateRepoResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateRepoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateRepoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateRepoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -134,7 +134,7 @@ partial void ProcessCreateRepoResponseContent( global::System.Collections.Generic.IList? tags = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CreateRepoRequest + var __request = new global::LangSmith.CreateRepoRequest { RepoHandle = repoHandle, Description = description, @@ -144,7 +144,7 @@ partial void ProcessCreateRepoResponseContent( }; return await CreateRepoAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ReposClient.DeleteRepo.g.cs b/src/libs/LangSmith/Generated/LangSmith.ReposClient.DeleteRepo.g.cs index 3037af3f..0e511cdf 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ReposClient.DeleteRepo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ReposClient.DeleteRepo.g.cs @@ -37,75 +37,75 @@ partial void ProcessDeleteRepoResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteRepoArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo); var __pathBuilder = new PathBuilder( path: $"/api/v1/repos/{owner}/{repo}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteRepoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteRepoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteRepoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.ReposClient.ForkRepo.g.cs b/src/libs/LangSmith/Generated/LangSmith.ReposClient.ForkRepo.g.cs index 38d4231d..68ac7284 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ReposClient.ForkRepo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ReposClient.ForkRepo.g.cs @@ -43,34 +43,34 @@ partial void ProcessForkRepoResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareForkRepoArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/repos/{owner}/{repo}/fork", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -78,48 +78,48 @@ partial void ProcessForkRepoResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareForkRepoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessForkRepoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessForkRepoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -150,7 +150,7 @@ partial void ProcessForkRepoResponseContent( bool? isPublic = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.ForkRepoRequest + var __request = new global::LangSmith.ForkRepoRequest { RepoHandle = repoHandle, Readme = readme, @@ -162,7 +162,7 @@ partial void ProcessForkRepoResponseContent( return await ForkRepoAsync( owner: owner, repo: repo, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ReposClient.GetRepo.g.cs b/src/libs/LangSmith/Generated/LangSmith.ReposClient.GetRepo.g.cs index 38aa91b4..098b7da0 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ReposClient.GetRepo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ReposClient.GetRepo.g.cs @@ -37,75 +37,75 @@ partial void ProcessGetRepoResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetRepoArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo); var __pathBuilder = new PathBuilder( path: $"/api/v1/repos/{owner}/{repo}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetRepoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetRepoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetRepoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ReposClient.ListRepoTags.g.cs b/src/libs/LangSmith/Generated/LangSmith.ReposClient.ListRepoTags.g.cs index c704ab12..b2eeaf7c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ReposClient.ListRepoTags.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ReposClient.ListRepoTags.g.cs @@ -87,9 +87,9 @@ partial void ProcessListRepoTagsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListRepoTagsArguments( - httpClient: _httpClient, + httpClient: HttpClient, limit: ref limit, offset: ref offset, tenantHandle: ref tenantHandle, @@ -106,7 +106,7 @@ partial void ProcessListRepoTagsResponseContent( var __pathBuilder = new PathBuilder( path: "/api/v1/repos/tags", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("offset", offset?.ToString()) @@ -123,32 +123,32 @@ partial void ProcessListRepoTagsResponseContent( .AddOptionalParameter("tag_value_id", tagValueId, selector: static x => x.ToString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListRepoTagsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, limit: limit, offset: offset, tenantHandle: tenantHandle, @@ -163,36 +163,36 @@ partial void ProcessListRepoTagsResponseContent( matchPrefix: matchPrefix, tagValueId: tagValueId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListRepoTagsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListRepoTagsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ReposClient.ListRepos.g.cs b/src/libs/LangSmith/Generated/LangSmith.ReposClient.ListRepos.g.cs index 463bd12c..76ba004c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ReposClient.ListRepos.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ReposClient.ListRepos.g.cs @@ -101,9 +101,9 @@ partial void ProcessListReposResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListReposArguments( - httpClient: _httpClient, + httpClient: HttpClient, withLatestManifest: ref withLatestManifest, limit: ref limit, offset: ref offset, @@ -123,7 +123,7 @@ partial void ProcessListReposResponseContent( var __pathBuilder = new PathBuilder( path: "/api/v1/repos", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("with_latest_manifest", withLatestManifest?.ToString()) .AddOptionalParameter("limit", limit?.ToString()) @@ -143,32 +143,32 @@ partial void ProcessListReposResponseContent( .AddOptionalParameter("sort_direction", sortDirection?.ToString() ?? string.Empty) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListReposRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, withLatestManifest: withLatestManifest, limit: limit, offset: offset, @@ -186,36 +186,36 @@ partial void ProcessListReposResponseContent( sortField: sortField, sortDirection: sortDirection); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListReposResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListReposResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ReposClient.OptimizePrompt.g.cs b/src/libs/LangSmith/Generated/LangSmith.ReposClient.OptimizePrompt.g.cs index fcad2d2e..91fc51a4 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ReposClient.OptimizePrompt.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ReposClient.OptimizePrompt.g.cs @@ -35,32 +35,32 @@ partial void ProcessOptimizePromptResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareOptimizePromptArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/repos/optimize", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessOptimizePromptResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareOptimizePromptRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessOptimizePromptResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessOptimizePromptResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -132,7 +132,7 @@ partial void ProcessOptimizePromptResponseContent( string? overallFeedback, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.OptimizePromptRequest + var __request = new global::LangSmith.OptimizePromptRequest { Prompt = prompt, Metaprompt = metaprompt, @@ -141,7 +141,7 @@ partial void ProcessOptimizePromptResponseContent( }; return await OptimizePromptAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ReposClient.UpdateRepo.g.cs b/src/libs/LangSmith/Generated/LangSmith.ReposClient.UpdateRepo.g.cs index 0c516a77..b92278b7 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ReposClient.UpdateRepo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ReposClient.UpdateRepo.g.cs @@ -43,34 +43,34 @@ partial void ProcessUpdateRepoResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateRepoArguments( - httpClient: _httpClient, + httpClient: HttpClient, owner: ref owner, repo: ref repo, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/repos/{owner}/{repo}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -78,48 +78,48 @@ partial void ProcessUpdateRepoResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateRepoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, owner: owner, repo: repo, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateRepoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateRepoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -150,7 +150,7 @@ partial void ProcessUpdateRepoResponseContent( bool? isArchived = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.UpdateRepoRequest + var __request = new global::LangSmith.UpdateRepoRequest { Description = description, Readme = readme, @@ -162,7 +162,7 @@ partial void ProcessUpdateRepoResponseContent( return await UpdateRepoAsync( owner: owner, repo: repo, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ReposClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ReposClient.g.cs index 7b20041d..ecf8ec3c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ReposClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ReposClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class ReposClient : global::LangSmith.IReposClient, global /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class ReposClient : global::LangSmith.IReposClient, global /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public ReposClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.BatchIngestRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.BatchIngestRuns.g.cs index 762eba3b..3f4571a2 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.BatchIngestRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.BatchIngestRuns.g.cs @@ -35,32 +35,32 @@ partial void ProcessBatchIngestRunsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareBatchIngestRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/runs/batch", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessBatchIngestRunsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareBatchIngestRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessBatchIngestRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessBatchIngestRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -126,14 +126,14 @@ partial void ProcessBatchIngestRunsResponseContent( global::System.Collections.Generic.IList? patch = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.BatchIngestRunsRequest + var __request = new global::LangSmith.BatchIngestRunsRequest { Post = post, Patch = patch, }; return await BatchIngestRunsAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.CreateRule.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.CreateRule.g.cs index 024b6f6f..0444c20f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.CreateRule.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.CreateRule.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateRuleResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateRuleArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/runs/rules", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateRuleResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateRuleRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateRuleResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateRuleResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -170,7 +170,7 @@ partial void ProcessCreateRuleResponseContent( global::System.Collections.Generic.IList? webhooks = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.RunRulesCreateSchema + var __request = new global::LangSmith.RunRulesCreateSchema { DisplayName = displayName, SessionId = sessionId, @@ -194,7 +194,7 @@ partial void ProcessCreateRuleResponseContent( }; return await CreateRuleAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.CreateRun.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.CreateRun.g.cs index 2b5a698e..aaa15bc4 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.CreateRun.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.CreateRun.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateRunResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateRunArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/runs", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateRunResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateRunRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateRunResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateRunResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -162,7 +162,7 @@ partial void ProcessCreateRunResponseContent( object? outputAttachments = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.CreateRunRequest + var __request = new global::LangSmith.CreateRunRequest { Name = name, Inputs = inputs, @@ -187,7 +187,7 @@ partial void ProcessCreateRunResponseContent( }; return await CreateRunAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.DeleteRule.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.DeleteRule.g.cs index adbaf2ce..608d1640 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.DeleteRule.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.DeleteRule.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteRuleResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteRuleArguments( - httpClient: _httpClient, + httpClient: HttpClient, ruleId: ref ruleId); var __pathBuilder = new PathBuilder( path: $"/api/v1/runs/rules/{ruleId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteRuleRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, ruleId: ruleId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteRuleResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteRuleResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.GenerateQueryForRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.GenerateQueryForRuns.g.cs index a78d03e7..6ad92395 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.GenerateQueryForRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.GenerateQueryForRuns.g.cs @@ -35,32 +35,32 @@ partial void ProcessGenerateQueryForRunsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGenerateQueryForRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/runs/generate-query", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessGenerateQueryForRunsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGenerateQueryForRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGenerateQueryForRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGenerateQueryForRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -128,14 +128,14 @@ partial void ProcessGenerateQueryForRunsResponseContent( global::System.Collections.Generic.IList? feedbackKeys = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.RequestBodyForRunsGenerateQuery + var __request = new global::LangSmith.RequestBodyForRunsGenerateQuery { Query = query, FeedbackKeys = feedbackKeys, }; return await GenerateQueryForRunsAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.GroupRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.GroupRuns.g.cs index 3be8840c..ab2794b3 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.GroupRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.GroupRuns.g.cs @@ -39,39 +39,39 @@ partial void ProcessGroupRunsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGroupRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, accept: ref accept, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/runs/group", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } if (accept != default) { - httpRequest.Headers.TryAddWithoutValidation("accept", accept.ToString()); + __httpRequest.Headers.TryAddWithoutValidation("accept", accept.ToString()); } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -79,47 +79,47 @@ partial void ProcessGroupRunsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGroupRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, accept: accept, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGroupRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGroupRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -154,7 +154,7 @@ partial void ProcessGroupRunsResponseContent( int? limit = 10, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.RunGroupRequest + var __request = new global::LangSmith.RunGroupRequest { SessionId = sessionId, GroupBy = groupBy, @@ -167,7 +167,7 @@ partial void ProcessGroupRunsResponseContent( return await GroupRunsAsync( accept: accept, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.ListRuleLogs.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.ListRuleLogs.g.cs index d2675917..7c35836c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.ListRuleLogs.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.ListRuleLogs.g.cs @@ -53,9 +53,9 @@ partial void ProcessListRuleLogsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListRuleLogsArguments( - httpClient: _httpClient, + httpClient: HttpClient, ruleId: ref ruleId, limit: ref limit, offset: ref offset, @@ -64,7 +64,7 @@ partial void ProcessListRuleLogsResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/runs/rules/{ruleId}/logs", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("offset", offset?.ToString()) @@ -72,68 +72,68 @@ partial void ProcessListRuleLogsResponseContent( .AddOptionalParameter("end_time", endTime?.ToString("yyyy-MM-ddTHH:mm:ssZ")) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListRuleLogsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, ruleId: ruleId, limit: limit, offset: offset, startTime: startTime, endTime: endTime); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListRuleLogsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListRuleLogsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.ListRules.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.ListRules.g.cs index 8763059b..ef15d2e2 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.ListRules.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.ListRules.g.cs @@ -45,9 +45,9 @@ partial void ProcessListRulesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListRulesArguments( - httpClient: _httpClient, + httpClient: HttpClient, datasetId: ref datasetId, sessionId: ref sessionId, type: ref type, @@ -55,7 +55,7 @@ partial void ProcessListRulesResponseContent( var __pathBuilder = new PathBuilder( path: "/api/v1/runs/rules", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("dataset_id", datasetId?.ToString()) .AddOptionalParameter("session_id", sessionId?.ToString()) @@ -63,67 +63,67 @@ partial void ProcessListRulesResponseContent( .AddOptionalParameter("name_contains", nameContains) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListRulesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, datasetId: datasetId, sessionId: sessionId, type: type, nameContains: nameContains); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListRulesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListRulesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.MonitorTracerSession.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.MonitorTracerSession.g.cs index 89ade115..e3180de1 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.MonitorTracerSession.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.MonitorTracerSession.g.cs @@ -35,32 +35,32 @@ partial void ProcessMonitorTracerSessionResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareMonitorTracerSessionArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/runs/monitor", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessMonitorTracerSessionResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareMonitorTracerSessionRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessMonitorTracerSessionResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessMonitorTracerSessionResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -138,7 +138,7 @@ partial void ProcessMonitorTracerSessionResponseContent( global::LangSmith.TimedeltaInput? stride = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.MonitorRequest + var __request = new global::LangSmith.MonitorRequest { Timezone = timezone, Groups = groups, @@ -147,7 +147,7 @@ partial void ProcessMonitorTracerSessionResponseContent( }; return await MonitorTracerSessionAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.MultipartIngestRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.MultipartIngestRuns.g.cs index 07388f07..2d6f4a1e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.MultipartIngestRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.MultipartIngestRuns.g.cs @@ -29,71 +29,71 @@ partial void ProcessMultipartIngestRunsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareMultipartIngestRunsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/runs/multipart", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareMultipartIngestRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessMultipartIngestRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessMultipartIngestRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.QueryRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.QueryRuns.g.cs index 3335bf78..574ad686 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.QueryRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.QueryRuns.g.cs @@ -34,32 +34,32 @@ partial void ProcessQueryRunsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareQueryRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/runs/query", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessQueryRunsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareQueryRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessQueryRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessQueryRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -172,7 +172,7 @@ partial void ProcessQueryRunsResponseContent( global::LangSmith.RunDateOrder? order = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.BodyParamsForRunSchema + var __request = new global::LangSmith.BodyParamsForRunSchema { Id = id, Trace = trace, @@ -197,7 +197,7 @@ partial void ProcessQueryRunsResponseContent( }; return await QueryRunsAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.ReadRun.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.ReadRun.g.cs index 63a02d88..7d339db1 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.ReadRun.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.ReadRun.g.cs @@ -39,78 +39,78 @@ partial void ProcessReadRunResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadRunArguments( - httpClient: _httpClient, + httpClient: HttpClient, runId: ref runId, excludeS3StoredAttributes: ref excludeS3StoredAttributes); var __pathBuilder = new PathBuilder( path: $"/api/v1/runs/{runId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("exclude_s3_stored_attributes", excludeS3StoredAttributes?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadRunRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, runId: runId, excludeS3StoredAttributes: excludeS3StoredAttributes); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadRunResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadRunResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.ReadRunShareState.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.ReadRunShareState.g.cs index 6598e4cf..61104768 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.ReadRunShareState.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.ReadRunShareState.g.cs @@ -33,73 +33,73 @@ partial void ProcessReadRunShareStateResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadRunShareStateArguments( - httpClient: _httpClient, + httpClient: HttpClient, runId: ref runId); var __pathBuilder = new PathBuilder( path: $"/api/v1/runs/{runId}/share", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadRunShareStateRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, runId: runId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadRunShareStateResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadRunShareStateResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.ShareRun.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.ShareRun.g.cs index a59b0d16..259e4ae4 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.ShareRun.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.ShareRun.g.cs @@ -33,73 +33,73 @@ partial void ProcessShareRunResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareShareRunArguments( - httpClient: _httpClient, + httpClient: HttpClient, runId: ref runId); var __pathBuilder = new PathBuilder( path: $"/api/v1/runs/{runId}/share", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareShareRunRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, runId: runId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessShareRunResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessShareRunResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.StatsGroupRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.StatsGroupRuns.g.cs index d18e0f2b..fd4a1ec8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.StatsGroupRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.StatsGroupRuns.g.cs @@ -35,32 +35,32 @@ partial void ProcessStatsGroupRunsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareStatsGroupRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/runs/group/stats", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessStatsGroupRunsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareStatsGroupRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessStatsGroupRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessStatsGroupRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -142,7 +142,7 @@ partial void ProcessStatsGroupRunsResponseContent( int? limit = 10, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.RunGroupRequest + var __request = new global::LangSmith.RunGroupRequest { SessionId = sessionId, GroupBy = groupBy, @@ -154,7 +154,7 @@ partial void ProcessStatsGroupRunsResponseContent( }; return await StatsGroupRunsAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.StatsRuns.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.StatsRuns.g.cs index 5d194414..d97f9b37 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.StatsRuns.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.StatsRuns.g.cs @@ -35,32 +35,32 @@ partial void ProcessStatsRunsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareStatsRunsArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/runs/stats", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessStatsRunsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareStatsRunsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessStatsRunsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessStatsRunsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -160,7 +160,7 @@ partial void ProcessStatsRunsResponseContent( global::LangSmith.RunsFilterDataSourceTypeEnum? dataSourceType = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.FilterQueryParamsForRunSchema + var __request = new global::LangSmith.FilterQueryParamsForRunSchema { Id = id, Trace = trace, @@ -181,7 +181,7 @@ partial void ProcessStatsRunsResponseContent( }; return await StatsRunsAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.TriggerRule.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.TriggerRule.g.cs index 0986735f..0af7c941 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.TriggerRule.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.TriggerRule.g.cs @@ -33,73 +33,73 @@ partial void ProcessTriggerRuleResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareTriggerRuleArguments( - httpClient: _httpClient, + httpClient: HttpClient, ruleId: ref ruleId); var __pathBuilder = new PathBuilder( path: $"/api/v1/runs/rules/{ruleId}/trigger", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareTriggerRuleRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, ruleId: ruleId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessTriggerRuleResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessTriggerRuleResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.TriggerRules.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.TriggerRules.g.cs index 98f10dc7..b5f332ee 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.TriggerRules.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.TriggerRules.g.cs @@ -35,32 +35,32 @@ partial void ProcessTriggerRulesResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareTriggerRulesArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/runs/rules/trigger", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessTriggerRulesResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareTriggerRulesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessTriggerRulesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessTriggerRulesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -126,14 +126,14 @@ partial void ProcessTriggerRulesResponseContent( global::System.Guid? datasetId = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.TriggerRulesRequest + var __request = new global::LangSmith.TriggerRulesRequest { RuleIds = ruleIds, DatasetId = datasetId, }; return await TriggerRulesAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.UnshareRun.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.UnshareRun.g.cs index d5aef8b1..e239d239 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.UnshareRun.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.UnshareRun.g.cs @@ -33,73 +33,73 @@ partial void ProcessUnshareRunResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUnshareRunArguments( - httpClient: _httpClient, + httpClient: HttpClient, runId: ref runId); var __pathBuilder = new PathBuilder( path: $"/api/v1/runs/{runId}/share", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUnshareRunRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, runId: runId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUnshareRunResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUnshareRunResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.UpdateRule.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.UpdateRule.g.cs index c36bf21e..c6e312a0 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.UpdateRule.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.UpdateRule.g.cs @@ -39,33 +39,33 @@ partial void ProcessUpdateRuleResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateRuleArguments( - httpClient: _httpClient, + httpClient: HttpClient, ruleId: ref ruleId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/runs/rules/{ruleId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessUpdateRuleResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateRuleRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, ruleId: ruleId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateRuleResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateRuleResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -178,7 +178,7 @@ partial void ProcessUpdateRuleResponseContent( global::System.Collections.Generic.IList? webhooks = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.RunRulesCreateSchema + var __request = new global::LangSmith.RunRulesCreateSchema { DisplayName = displayName, SessionId = sessionId, @@ -203,7 +203,7 @@ partial void ProcessUpdateRuleResponseContent( return await UpdateRuleAsync( ruleId: ruleId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.UpdateRun.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.UpdateRun.g.cs index 6b35b578..86142f7a 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.UpdateRun.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.UpdateRun.g.cs @@ -39,33 +39,33 @@ partial void ProcessUpdateRunResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateRunArguments( - httpClient: _httpClient, + httpClient: HttpClient, runId: ref runId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/runs/{runId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessUpdateRunResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateRunRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, runId: runId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateRunResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateRunResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -158,7 +158,7 @@ partial void ProcessUpdateRunResponseContent( string? sessionName = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.UpdateRunRequest + var __request = new global::LangSmith.UpdateRunRequest { TraceId = traceId, DottedOrder = dottedOrder, @@ -178,7 +178,7 @@ partial void ProcessUpdateRunResponseContent( return await UpdateRunAsync( runId: runId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.RunClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.RunClient.g.cs index cfb3b043..dd11ae43 100644 --- a/src/libs/LangSmith/Generated/LangSmith.RunClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.RunClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class RunClient : global::LangSmith.IRunClient, global::Sy /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class RunClient : global::LangSmith.IRunClient, global::Sy /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public RunClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.CreateServiceAccount.g.cs b/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.CreateServiceAccount.g.cs index 9cdd5e89..3e43f94e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.CreateServiceAccount.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.CreateServiceAccount.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateServiceAccountResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateServiceAccountArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/service-accounts", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateServiceAccountResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateServiceAccountRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateServiceAccountResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateServiceAccountResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -126,13 +126,13 @@ partial void ProcessCreateServiceAccountResponseContent( string name, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.ServiceAccountCreateRequest + var __request = new global::LangSmith.ServiceAccountCreateRequest { Name = name, }; return await CreateServiceAccountAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.DeleteServiceAccount.g.cs b/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.DeleteServiceAccount.g.cs index 825961f8..83ce6019 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.DeleteServiceAccount.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.DeleteServiceAccount.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteServiceAccountResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteServiceAccountArguments( - httpClient: _httpClient, + httpClient: HttpClient, serviceAccountId: ref serviceAccountId); var __pathBuilder = new PathBuilder( path: $"/api/v1/service-accounts/{serviceAccountId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteServiceAccountRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, serviceAccountId: serviceAccountId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteServiceAccountResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteServiceAccountResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.GetServiceAccounts.g.cs b/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.GetServiceAccounts.g.cs index 4ed6f146..4f163115 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.GetServiceAccounts.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.GetServiceAccounts.g.cs @@ -29,71 +29,71 @@ partial void ProcessGetServiceAccountsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetServiceAccountsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/service-accounts", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetServiceAccountsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetServiceAccountsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetServiceAccountsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.g.cs index 04c8d9b9..aeadfebc 100644 --- a/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.ServiceAccountsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class ServiceAccountsClient : global::LangSmith.IServiceAc /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class ServiceAccountsClient : global::LangSmith.IServiceAc /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public ServiceAccountsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.SettingsClient.GetSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.SettingsClient.GetSettings.g.cs index d1d9bef3..d3087eca 100644 --- a/src/libs/LangSmith/Generated/LangSmith.SettingsClient.GetSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.SettingsClient.GetSettings.g.cs @@ -29,71 +29,71 @@ partial void ProcessGetSettingsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetSettingsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/settings", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.SettingsClient.SetTenantHandle.g.cs b/src/libs/LangSmith/Generated/LangSmith.SettingsClient.SetTenantHandle.g.cs index a0579e57..d6b8cf6a 100644 --- a/src/libs/LangSmith/Generated/LangSmith.SettingsClient.SetTenantHandle.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.SettingsClient.SetTenantHandle.g.cs @@ -35,32 +35,32 @@ partial void ProcessSetTenantHandleResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareSetTenantHandleArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/settings/handle", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessSetTenantHandleResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareSetTenantHandleRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessSetTenantHandleResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessSetTenantHandleResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -126,13 +126,13 @@ partial void ProcessSetTenantHandleResponseContent( string tenantHandle, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.SetTenantHandleRequest + var __request = new global::LangSmith.SetTenantHandleRequest { TenantHandle = tenantHandle, }; return await SetTenantHandleAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.SettingsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.SettingsClient.g.cs index 13002a68..6544359e 100644 --- a/src/libs/LangSmith/Generated/LangSmith.SettingsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.SettingsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class SettingsClient : global::LangSmith.ISettingsClient, /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class SettingsClient : global::LangSmith.ISettingsClient, /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public SettingsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.TagsClient.CreateTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.TagsClient.CreateTag.g.cs index b2a8c7db..b9c9abaf 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TagsClient.CreateTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TagsClient.CreateTag.g.cs @@ -38,33 +38,33 @@ partial void ProcessCreateTagResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateTagArguments( - httpClient: _httpClient, + httpClient: HttpClient, repo: ref repo, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/repos/{owner}/{repo}/tags", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -72,47 +72,47 @@ partial void ProcessCreateTagResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateTagRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, repo: repo, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateTagResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateTagResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -134,7 +134,7 @@ partial void ProcessCreateTagResponseContent( global::System.Guid commitId, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.RepoTagRequest + var __request = new global::LangSmith.RepoTagRequest { TagName = tagName, CommitId = commitId, @@ -142,7 +142,7 @@ partial void ProcessCreateTagResponseContent( return await CreateTagAsync( repo: repo, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.TagsClient.DeleteTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.TagsClient.DeleteTag.g.cs index 5664f869..a31dff31 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TagsClient.DeleteTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TagsClient.DeleteTag.g.cs @@ -36,75 +36,75 @@ partial void ProcessDeleteTagResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteTagArguments( - httpClient: _httpClient, + httpClient: HttpClient, repo: ref repo, tagName: ref tagName); var __pathBuilder = new PathBuilder( path: $"/api/v1/repos/{owner}/{repo}/tags/{tagName}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteTagRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, repo: repo, tagName: tagName); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteTagResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteTagResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTag.g.cs index 99a8c0af..cc47266d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTag.g.cs @@ -36,75 +36,75 @@ partial void ProcessGetTagResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetTagArguments( - httpClient: _httpClient, + httpClient: HttpClient, repo: ref repo, tagName: ref tagName); var __pathBuilder = new PathBuilder( path: $"/api/v1/repos/{owner}/{repo}/tags/{tagName}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetTagRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, repo: repo, tagName: tagName); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetTagResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetTagResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTags.g.cs b/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTags.g.cs index 09b77e00..951d3779 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTags.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TagsClient.GetTags.g.cs @@ -32,73 +32,73 @@ partial void ProcessGetTagsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetTagsArguments( - httpClient: _httpClient, + httpClient: HttpClient, repo: ref repo); var __pathBuilder = new PathBuilder( path: $"/api/v1/repos/{owner}/{repo}/tags", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetTagsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, repo: repo); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetTagsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetTagsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.TagsClient.UpdateTag.g.cs b/src/libs/LangSmith/Generated/LangSmith.TagsClient.UpdateTag.g.cs index 02779d3a..3f2b42e8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TagsClient.UpdateTag.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TagsClient.UpdateTag.g.cs @@ -42,34 +42,34 @@ partial void ProcessUpdateTagResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateTagArguments( - httpClient: _httpClient, + httpClient: HttpClient, repo: ref repo, tagName: ref tagName, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/repos/{owner}/{repo}/tags/{tagName}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -77,48 +77,48 @@ partial void ProcessUpdateTagResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateTagRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, repo: repo, tagName: tagName, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateTagResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateTagResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -140,7 +140,7 @@ partial void ProcessUpdateTagResponseContent( global::System.Guid commitId, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.RepoUpdateTagRequest + var __request = new global::LangSmith.RepoUpdateTagRequest { CommitId = commitId, }; @@ -148,7 +148,7 @@ partial void ProcessUpdateTagResponseContent( return await UpdateTagAsync( repo: repo, tagName: tagName, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.TagsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.TagsClient.g.cs index 79203d59..7f9cde2c 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TagsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TagsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class TagsClient : global::LangSmith.ITagsClient, global:: /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class TagsClient : global::LangSmith.ITagsClient, global:: /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public TagsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.TenantClient.CreateTenant.g.cs b/src/libs/LangSmith/Generated/LangSmith.TenantClient.CreateTenant.g.cs index abbca17c..4bfcf0c8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TenantClient.CreateTenant.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TenantClient.CreateTenant.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateTenantResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateTenantArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/tenants", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateTenantResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateTenantRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateTenantResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateTenantResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -136,7 +136,7 @@ partial void ProcessCreateTenantResponseContent( bool? isPersonal = false, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.TenantCreate + var __request = new global::LangSmith.TenantCreate { Id = id, OrganizationId = organizationId, @@ -146,7 +146,7 @@ partial void ProcessCreateTenantResponseContent( }; return await CreateTenantAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.TenantClient.ListTenants.g.cs b/src/libs/LangSmith/Generated/LangSmith.TenantClient.ListTenants.g.cs index d4fe210c..de2bed33 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TenantClient.ListTenants.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TenantClient.ListTenants.g.cs @@ -35,76 +35,76 @@ partial void ProcessListTenantsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListTenantsArguments( - httpClient: _httpClient, + httpClient: HttpClient, skipCreate: ref skipCreate); var __pathBuilder = new PathBuilder( path: "/api/v1/tenants", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("skip_create", skipCreate?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListTenantsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, skipCreate: skipCreate); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListTenantsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListTenantsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.TenantClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.TenantClient.g.cs index 2e3211cc..0f574622 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TenantClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TenantClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class TenantClient : global::LangSmith.ITenantClient, glob /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class TenantClient : global::LangSmith.ITenantClient, glob /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public TenantClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.CreateFilterView.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.CreateFilterView.g.cs index 6dd05296..d00de663 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.CreateFilterView.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.CreateFilterView.g.cs @@ -39,33 +39,33 @@ partial void ProcessCreateFilterViewResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateFilterViewArguments( - httpClient: _httpClient, + httpClient: HttpClient, sessionId: ref sessionId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/sessions/{sessionId}/views", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessCreateFilterViewResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateFilterViewRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sessionId: sessionId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateFilterViewResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateFilterViewResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -142,7 +142,7 @@ partial void ProcessCreateFilterViewResponseContent( string? description = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.FilterViewCreate + var __request = new global::LangSmith.FilterViewCreate { FilterString = filterString, TraceFilterString = traceFilterString, @@ -153,7 +153,7 @@ partial void ProcessCreateFilterViewResponseContent( return await CreateFilterViewAsync( sessionId: sessionId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.CreateTracerSession.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.CreateTracerSession.g.cs index 81c699ee..f6597e07 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.CreateTracerSession.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.CreateTracerSession.g.cs @@ -41,36 +41,36 @@ partial void ProcessCreateTracerSessionResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateTracerSessionArguments( - httpClient: _httpClient, + httpClient: HttpClient, upsert: ref upsert, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/sessions", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("upsert", upsert?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -78,47 +78,47 @@ partial void ProcessCreateTracerSessionResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateTracerSessionRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, upsert: upsert, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateTracerSessionResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateTracerSessionResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -157,7 +157,7 @@ partial void ProcessCreateTracerSessionResponseContent( global::System.Guid? id = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.TracerSessionCreate + var __request = new global::LangSmith.TracerSessionCreate { StartTime = startTime, EndTime = endTime, @@ -172,7 +172,7 @@ partial void ProcessCreateTracerSessionResponseContent( return await CreateTracerSessionAsync( upsert: upsert, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.DeleteFilterView.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.DeleteFilterView.g.cs index fa35ac91..fd43d2bc 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.DeleteFilterView.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.DeleteFilterView.g.cs @@ -37,75 +37,75 @@ partial void ProcessDeleteFilterViewResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteFilterViewArguments( - httpClient: _httpClient, + httpClient: HttpClient, sessionId: ref sessionId, viewId: ref viewId); var __pathBuilder = new PathBuilder( path: $"/api/v1/sessions/{sessionId}/views/{viewId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteFilterViewRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sessionId: sessionId, viewId: viewId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteFilterViewResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteFilterViewResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.DeleteTracerSession.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.DeleteTracerSession.g.cs index c26732e9..62e103ca 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.DeleteTracerSession.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.DeleteTracerSession.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteTracerSessionResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteTracerSessionArguments( - httpClient: _httpClient, + httpClient: HttpClient, sessionId: ref sessionId); var __pathBuilder = new PathBuilder( path: $"/api/v1/sessions/{sessionId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteTracerSessionRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sessionId: sessionId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteTracerSessionResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteTracerSessionResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.DeleteTracerSessions.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.DeleteTracerSessions.g.cs index ac271474..a842008d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.DeleteTracerSessions.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.DeleteTracerSessions.g.cs @@ -33,76 +33,76 @@ partial void ProcessDeleteTracerSessionsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteTracerSessionsArguments( - httpClient: _httpClient, + httpClient: HttpClient, sessionIds: sessionIds); var __pathBuilder = new PathBuilder( path: "/api/v1/sessions", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("session_ids", sessionIds, selector: static x => x.ToString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteTracerSessionsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sessionIds: sessionIds); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteTracerSessionsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteTracerSessionsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadFilterView.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadFilterView.g.cs index b8594afa..cafe34fa 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadFilterView.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadFilterView.g.cs @@ -37,75 +37,75 @@ partial void ProcessReadFilterViewResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadFilterViewArguments( - httpClient: _httpClient, + httpClient: HttpClient, sessionId: ref sessionId, viewId: ref viewId); var __pathBuilder = new PathBuilder( path: $"/api/v1/sessions/{sessionId}/views/{viewId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadFilterViewRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sessionId: sessionId, viewId: viewId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadFilterViewResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadFilterViewResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadFilterViews.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadFilterViews.g.cs index d57cde42..7752bcdf 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadFilterViews.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadFilterViews.g.cs @@ -33,73 +33,73 @@ partial void ProcessReadFilterViewsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadFilterViewsArguments( - httpClient: _httpClient, + httpClient: HttpClient, sessionId: ref sessionId); var __pathBuilder = new PathBuilder( path: $"/api/v1/sessions/{sessionId}/views", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadFilterViewsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sessionId: sessionId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadFilterViewsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadFilterViewsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadTracerSession.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadTracerSession.g.cs index 1846391e..2fb96554 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadTracerSession.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadTracerSession.g.cs @@ -43,86 +43,86 @@ partial void ProcessReadTracerSessionResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadTracerSessionArguments( - httpClient: _httpClient, + httpClient: HttpClient, sessionId: ref sessionId, includeStats: ref includeStats, accept: ref accept); var __pathBuilder = new PathBuilder( path: $"/api/v1/sessions/{sessionId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("include_stats", includeStats?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } if (accept != default) { - httpRequest.Headers.TryAddWithoutValidation("accept", accept.ToString()); + __httpRequest.Headers.TryAddWithoutValidation("accept", accept.ToString()); } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadTracerSessionRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sessionId: sessionId, includeStats: includeStats, accept: accept); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadTracerSessionResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadTracerSessionResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadTracerSessions.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadTracerSessions.g.cs index a8e1e303..79806bc0 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadTracerSessions.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadTracerSessions.g.cs @@ -101,9 +101,9 @@ partial void ProcessReadTracerSessionsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadTracerSessionsArguments( - httpClient: _httpClient, + httpClient: HttpClient, referenceFree: ref referenceFree, referenceDataset: referenceDataset, id: id, @@ -123,7 +123,7 @@ partial void ProcessReadTracerSessionsResponseContent( var __pathBuilder = new PathBuilder( path: "/api/v1/sessions", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("reference_free", referenceFree?.ToString()) .AddOptionalParameter("reference_dataset", referenceDataset, selector: static x => x.ToString(), delimiter: ",", explode: true) @@ -142,38 +142,38 @@ partial void ProcessReadTracerSessionsResponseContent( .AddOptionalParameter("filter", filter) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } if (accept != default) { - httpRequest.Headers.TryAddWithoutValidation("accept", accept.ToString()); + __httpRequest.Headers.TryAddWithoutValidation("accept", accept.ToString()); } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadTracerSessionsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, referenceFree: referenceFree, referenceDataset: referenceDataset, id: id, @@ -191,36 +191,36 @@ partial void ProcessReadTracerSessionsResponseContent( filter: filter, accept: accept); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadTracerSessionsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadTracerSessionsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadTracerSessionsRunsMetadata.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadTracerSessionsRunsMetadata.g.cs index 8188986a..8f4bc3b3 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadTracerSessionsRunsMetadata.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.ReadTracerSessionsRunsMetadata.g.cs @@ -53,9 +53,9 @@ partial void ProcessReadTracerSessionsRunsMetadataResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareReadTracerSessionsRunsMetadataArguments( - httpClient: _httpClient, + httpClient: HttpClient, sessionId: ref sessionId, metadataKeys: metadataKeys, startTime: ref startTime, @@ -64,7 +64,7 @@ partial void ProcessReadTracerSessionsRunsMetadataResponseContent( var __pathBuilder = new PathBuilder( path: $"/api/v1/sessions/{sessionId}/metadata", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("metadata_keys", metadataKeys, delimiter: ",", explode: true) .AddOptionalParameter("start_time", startTime?.ToString("yyyy-MM-ddTHH:mm:ssZ")) @@ -72,68 +72,68 @@ partial void ProcessReadTracerSessionsRunsMetadataResponseContent( .AddOptionalParameter("root_runs_only", rootRunsOnly?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareReadTracerSessionsRunsMetadataRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sessionId: sessionId, metadataKeys: metadataKeys, startTime: startTime, k: k, rootRunsOnly: rootRunsOnly); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessReadTracerSessionsRunsMetadataResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessReadTracerSessionsRunsMetadataResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.UpdateFilterView.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.UpdateFilterView.g.cs index 9d04b00b..4ac36ac5 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.UpdateFilterView.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.UpdateFilterView.g.cs @@ -43,34 +43,34 @@ partial void ProcessUpdateFilterViewResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateFilterViewArguments( - httpClient: _httpClient, + httpClient: HttpClient, sessionId: ref sessionId, viewId: ref viewId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/sessions/{sessionId}/views/{viewId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -78,48 +78,48 @@ partial void ProcessUpdateFilterViewResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateFilterViewRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sessionId: sessionId, viewId: viewId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateFilterViewResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateFilterViewResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -150,7 +150,7 @@ partial void ProcessUpdateFilterViewResponseContent( string? treeFilterString = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.FilterViewUpdate + var __request = new global::LangSmith.FilterViewUpdate { FilterString = filterString, DisplayName = displayName, @@ -162,7 +162,7 @@ partial void ProcessUpdateFilterViewResponseContent( return await UpdateFilterViewAsync( sessionId: sessionId, viewId: viewId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.UpdateTracerSession.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.UpdateTracerSession.g.cs index e43a30d4..af41cf37 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.UpdateTracerSession.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.UpdateTracerSession.g.cs @@ -39,33 +39,33 @@ partial void ProcessUpdateTracerSessionResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateTracerSessionArguments( - httpClient: _httpClient, + httpClient: HttpClient, sessionId: ref sessionId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/sessions/{sessionId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -73,47 +73,47 @@ partial void ProcessUpdateTracerSessionResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateTracerSessionRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, sessionId: sessionId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateTracerSessionResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateTracerSessionResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -144,7 +144,7 @@ partial void ProcessUpdateTracerSessionResponseContent( global::LangSmith.TraceTier? traceTier = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.TracerSessionUpdate + var __request = new global::LangSmith.TracerSessionUpdate { Name = name, Description = description, @@ -156,7 +156,7 @@ partial void ProcessUpdateTracerSessionResponseContent( return await UpdateTracerSessionAsync( sessionId: sessionId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.g.cs index bc515a48..60317c97 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TracerSessionsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class TracerSessionsClient : global::LangSmith.ITracerSess /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class TracerSessionsClient : global::LangSmith.ITracerSess /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public TracerSessionsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.TtlSettingsClient.ListTtlSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.TtlSettingsClient.ListTtlSettings.g.cs index ef5be5bc..4f7728eb 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TtlSettingsClient.ListTtlSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TtlSettingsClient.ListTtlSettings.g.cs @@ -29,71 +29,71 @@ partial void ProcessListTtlSettingsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListTtlSettingsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/ttl-settings", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListTtlSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListTtlSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListTtlSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.TtlSettingsClient.UpsertTtlSettings.g.cs b/src/libs/LangSmith/Generated/LangSmith.TtlSettingsClient.UpsertTtlSettings.g.cs index fb0b5a3a..8a552a45 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TtlSettingsClient.UpsertTtlSettings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TtlSettingsClient.UpsertTtlSettings.g.cs @@ -34,32 +34,32 @@ partial void ProcessUpsertTtlSettingsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpsertTtlSettingsArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/ttl-settings", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessUpsertTtlSettingsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpsertTtlSettingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpsertTtlSettingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpsertTtlSettingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -130,7 +130,7 @@ partial void ProcessUpsertTtlSettingsResponseContent( bool? applyToAllProjects = false, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.UpsertTTLSettingsRequest + var __request = new global::LangSmith.UpsertTTLSettingsRequest { TenantId = tenantId, DefaultTraceTier = defaultTraceTier, @@ -138,7 +138,7 @@ partial void ProcessUpsertTtlSettingsResponseContent( }; return await UpsertTtlSettingsAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.TtlSettingsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.TtlSettingsClient.g.cs index 7f3d0ba5..446ceebc 100644 --- a/src/libs/LangSmith/Generated/LangSmith.TtlSettingsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.TtlSettingsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class TtlSettingsClient : global::LangSmith.ITtlSettingsCl /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class TtlSettingsClient : global::LangSmith.ITtlSettingsCl /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public TtlSettingsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.DeleteUsageLimit.g.cs b/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.DeleteUsageLimit.g.cs index a0d90848..8614077d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.DeleteUsageLimit.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.DeleteUsageLimit.g.cs @@ -33,73 +33,73 @@ partial void ProcessDeleteUsageLimitResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteUsageLimitArguments( - httpClient: _httpClient, + httpClient: HttpClient, usageLimitId: ref usageLimitId); var __pathBuilder = new PathBuilder( path: $"/api/v1/usage-limits/{usageLimitId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteUsageLimitRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, usageLimitId: usageLimitId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteUsageLimitResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteUsageLimitResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.ListOrgUsageLimits.g.cs b/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.ListOrgUsageLimits.g.cs index 7e61953a..d16a05f0 100644 --- a/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.ListOrgUsageLimits.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.ListOrgUsageLimits.g.cs @@ -29,71 +29,71 @@ partial void ProcessListOrgUsageLimitsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListOrgUsageLimitsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/usage-limits/org", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListOrgUsageLimitsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListOrgUsageLimitsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListOrgUsageLimitsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.ListUsageLimits.g.cs b/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.ListUsageLimits.g.cs index fa86eb81..cbbdbcbf 100644 --- a/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.ListUsageLimits.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.ListUsageLimits.g.cs @@ -29,71 +29,71 @@ partial void ProcessListUsageLimitsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListUsageLimitsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/usage-limits", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListUsageLimitsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListUsageLimitsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListUsageLimitsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.UpsertUsageLimit.g.cs b/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.UpsertUsageLimit.g.cs index 20ae6fab..a8d9b1dd 100644 --- a/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.UpsertUsageLimit.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.UpsertUsageLimit.g.cs @@ -35,32 +35,32 @@ partial void ProcessUpsertUsageLimitResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpsertUsageLimitArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/usage-limits", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Put, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessUpsertUsageLimitResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpsertUsageLimitRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpsertUsageLimitResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpsertUsageLimitResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -132,7 +132,7 @@ partial void ProcessUpsertUsageLimitResponseContent( global::System.Guid? id = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.UpsertUsageLimit + var __request = new global::LangSmith.UpsertUsageLimit { LimitType = limitType, LimitValue = limitValue, @@ -140,7 +140,7 @@ partial void ProcessUpsertUsageLimitResponseContent( }; return await UpsertUsageLimitAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.g.cs index 40709b86..08e22a14 100644 --- a/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.UsageLimitsClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class UsageLimitsClient : global::LangSmith.IUsageLimitsCl /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class UsageLimitsClient : global::LangSmith.IUsageLimitsCl /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public UsageLimitsClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.AddMemberToCurrentWorkspace.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.AddMemberToCurrentWorkspace.g.cs index cbe76e63..1c7c574b 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.AddMemberToCurrentWorkspace.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.AddMemberToCurrentWorkspace.g.cs @@ -35,32 +35,32 @@ partial void ProcessAddMemberToCurrentWorkspaceResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareAddMemberToCurrentWorkspaceArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/members", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessAddMemberToCurrentWorkspaceResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareAddMemberToCurrentWorkspaceRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessAddMemberToCurrentWorkspaceResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessAddMemberToCurrentWorkspaceResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -130,7 +130,7 @@ partial void ProcessAddMemberToCurrentWorkspaceResponseContent( global::System.Guid? roleId = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.IdentityCreate + var __request = new global::LangSmith.IdentityCreate { UserId = userId, ReadOnly = readOnly, @@ -138,7 +138,7 @@ partial void ProcessAddMemberToCurrentWorkspaceResponseContent( }; return await AddMemberToCurrentWorkspaceAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.AddMembersToCurrentWorkspaceBatch.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.AddMembersToCurrentWorkspaceBatch.g.cs index 72b5c6bc..c71f72aa 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.AddMembersToCurrentWorkspaceBatch.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.AddMembersToCurrentWorkspaceBatch.g.cs @@ -35,32 +35,32 @@ partial void ProcessAddMembersToCurrentWorkspaceBatchResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareAddMembersToCurrentWorkspaceBatchArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/members/batch", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessAddMembersToCurrentWorkspaceBatchResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareAddMembersToCurrentWorkspaceBatchRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessAddMembersToCurrentWorkspaceBatchResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessAddMembersToCurrentWorkspaceBatchResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.BulkUnshareEntities.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.BulkUnshareEntities.g.cs index 61d7fad7..4c112747 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.BulkUnshareEntities.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.BulkUnshareEntities.g.cs @@ -35,32 +35,32 @@ partial void ProcessBulkUnshareEntitiesResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareBulkUnshareEntitiesArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/shared", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessBulkUnshareEntitiesResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareBulkUnshareEntitiesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessBulkUnshareEntitiesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessBulkUnshareEntitiesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -124,13 +124,13 @@ partial void ProcessBulkUnshareEntitiesResponseContent( global::System.Collections.Generic.IList? shareTokens = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.TenantBulkUnshareRequest + var __request = new global::LangSmith.TenantBulkUnshareRequest { ShareTokens = shareTokens, }; return await BulkUnshareEntitiesAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateTagKey.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateTagKey.g.cs index b156cf85..e6106ce5 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateTagKey.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateTagKey.g.cs @@ -34,32 +34,32 @@ partial void ProcessCreateTagKeyResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateTagKeyArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/tag-keys", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessCreateTagKeyResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateTagKeyRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateTagKeyResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateTagKeyResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -126,14 +126,14 @@ partial void ProcessCreateTagKeyResponseContent( string? description = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.TagKeyCreate + var __request = new global::LangSmith.TagKeyCreate { Key = key, Description = description, }; return await CreateTagKeyAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateTagValue.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateTagValue.g.cs index 5cb2e3d6..2497fa09 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateTagValue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateTagValue.g.cs @@ -38,33 +38,33 @@ partial void ProcessCreateTagValueResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateTagValueArguments( - httpClient: _httpClient, + httpClient: HttpClient, tagKeyId: ref tagKeyId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/current/tag-keys/{tagKeyId}/tag-values", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -72,47 +72,47 @@ partial void ProcessCreateTagValueResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateTagValueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, tagKeyId: tagKeyId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateTagValueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateTagValueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -134,7 +134,7 @@ partial void ProcessCreateTagValueResponseContent( string? description = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.TagValueCreate + var __request = new global::LangSmith.TagValueCreate { Value = value, Description = description, @@ -142,7 +142,7 @@ partial void ProcessCreateTagValueResponseContent( return await CreateTagValueAsync( tagKeyId: tagKeyId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateTagging.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateTagging.g.cs index 073289be..b8944f15 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateTagging.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateTagging.g.cs @@ -34,32 +34,32 @@ partial void ProcessCreateTaggingResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateTaggingArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/taggings", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessCreateTaggingResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateTaggingRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateTaggingResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateTaggingResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -128,7 +128,7 @@ partial void ProcessCreateTaggingResponseContent( global::System.Guid resourceId, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.TaggingCreate + var __request = new global::LangSmith.TaggingCreate { TagValueId = tagValueId, ResourceType = resourceType, @@ -136,7 +136,7 @@ partial void ProcessCreateTaggingResponseContent( }; return await CreateTaggingAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateWorkspace.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateWorkspace.g.cs index 67548833..512c5d11 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateWorkspace.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.CreateWorkspace.g.cs @@ -35,32 +35,32 @@ partial void ProcessCreateWorkspaceResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareCreateWorkspaceArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -68,46 +68,46 @@ partial void ProcessCreateWorkspaceResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareCreateWorkspaceRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessCreateWorkspaceResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessCreateWorkspaceResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -130,7 +130,7 @@ partial void ProcessCreateWorkspaceResponseContent( string? tenantHandle = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.WorkspaceCreate + var __request = new global::LangSmith.WorkspaceCreate { Id = id, DisplayName = displayName, @@ -138,7 +138,7 @@ partial void ProcessCreateWorkspaceResponseContent( }; return await CreateWorkspaceAsync( - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteCurrentWorkspaceMember.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteCurrentWorkspaceMember.g.cs index 139202b0..c2d2e8fe 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteCurrentWorkspaceMember.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteCurrentWorkspaceMember.g.cs @@ -32,73 +32,73 @@ partial void ProcessDeleteCurrentWorkspaceMemberResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteCurrentWorkspaceMemberArguments( - httpClient: _httpClient, + httpClient: HttpClient, identityId: ref identityId); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/current/members/{identityId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteCurrentWorkspaceMemberRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, identityId: identityId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteCurrentWorkspaceMemberResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteCurrentWorkspaceMemberResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteCurrentWorkspacePendingMember.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteCurrentWorkspacePendingMember.g.cs index 92114a7d..af0bcdda 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteCurrentWorkspacePendingMember.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteCurrentWorkspacePendingMember.g.cs @@ -32,73 +32,73 @@ partial void ProcessDeleteCurrentWorkspacePendingMemberResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteCurrentWorkspacePendingMemberArguments( - httpClient: _httpClient, + httpClient: HttpClient, identityId: ref identityId); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/current/members/{identityId}/pending", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteCurrentWorkspacePendingMemberRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, identityId: identityId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteCurrentWorkspacePendingMemberResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteCurrentWorkspacePendingMemberResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeletePendingWorkspaceInvite.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeletePendingWorkspaceInvite.g.cs index bf775d35..21631be2 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeletePendingWorkspaceInvite.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeletePendingWorkspaceInvite.g.cs @@ -32,73 +32,73 @@ partial void ProcessDeletePendingWorkspaceInviteResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeletePendingWorkspaceInviteArguments( - httpClient: _httpClient, + httpClient: HttpClient, id: ref id); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/pending/{id}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeletePendingWorkspaceInviteRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, id: id); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeletePendingWorkspaceInviteResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeletePendingWorkspaceInviteResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteTagKey.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteTagKey.g.cs index 4d0ed276..c7683012 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteTagKey.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteTagKey.g.cs @@ -32,73 +32,73 @@ partial void ProcessDeleteTagKeyResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteTagKeyArguments( - httpClient: _httpClient, + httpClient: HttpClient, tagKeyId: ref tagKeyId); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/current/tag-keys/{tagKeyId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteTagKeyRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, tagKeyId: tagKeyId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteTagKeyResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteTagKeyResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteTagValue.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteTagValue.g.cs index cb856a54..af5ea07d 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteTagValue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteTagValue.g.cs @@ -36,75 +36,75 @@ partial void ProcessDeleteTagValueResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteTagValueArguments( - httpClient: _httpClient, + httpClient: HttpClient, tagKeyId: ref tagKeyId, tagValueId: ref tagValueId); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/current/tag-keys/{tagKeyId}/tag-values/{tagValueId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteTagValueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, tagKeyId: tagKeyId, tagValueId: tagValueId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteTagValueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteTagValueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteTagging.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteTagging.g.cs index 0e206178..d378e7e2 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteTagging.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.DeleteTagging.g.cs @@ -32,73 +32,73 @@ partial void ProcessDeleteTaggingResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareDeleteTaggingArguments( - httpClient: _httpClient, + httpClient: HttpClient, taggingId: ref taggingId); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/current/taggings/{taggingId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Delete, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareDeleteTaggingRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, taggingId: taggingId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessDeleteTaggingResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessDeleteTaggingResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetCurrentWorkspaceMembers.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetCurrentWorkspaceMembers.g.cs index 09191a08..02d96b58 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetCurrentWorkspaceMembers.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetCurrentWorkspaceMembers.g.cs @@ -28,71 +28,71 @@ partial void ProcessGetCurrentWorkspaceMembersResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetCurrentWorkspaceMembersArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/members", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetCurrentWorkspaceMembersRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetCurrentWorkspaceMembersResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetCurrentWorkspaceMembersResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetCurrentWorkspaceStats.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetCurrentWorkspaceStats.g.cs index 68b281e4..73c49f5f 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetCurrentWorkspaceStats.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetCurrentWorkspaceStats.g.cs @@ -32,76 +32,76 @@ partial void ProcessGetCurrentWorkspaceStatsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetCurrentWorkspaceStatsArguments( - httpClient: _httpClient, + httpClient: HttpClient, tagValueId: tagValueId); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/stats", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("tag_value_id", tagValueId, selector: static x => x.ToString(), delimiter: ",", explode: true) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetCurrentWorkspaceStatsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, tagValueId: tagValueId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetCurrentWorkspaceStatsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetCurrentWorkspaceStatsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetCurrentWorkspaceUsageLimitsInfo.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetCurrentWorkspaceUsageLimitsInfo.g.cs index 2fa50183..83753ac1 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetCurrentWorkspaceUsageLimitsInfo.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetCurrentWorkspaceUsageLimitsInfo.g.cs @@ -28,71 +28,71 @@ partial void ProcessGetCurrentWorkspaceUsageLimitsInfoResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetCurrentWorkspaceUsageLimitsInfoArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/usage_limits", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetCurrentWorkspaceUsageLimitsInfoRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetCurrentWorkspaceUsageLimitsInfoResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetCurrentWorkspaceUsageLimitsInfoResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetSharedTokens.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetSharedTokens.g.cs index c6963daa..afe8c608 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetSharedTokens.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetSharedTokens.g.cs @@ -41,79 +41,79 @@ partial void ProcessGetSharedTokensResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetSharedTokensArguments( - httpClient: _httpClient, + httpClient: HttpClient, limit: ref limit, offset: ref offset); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/shared", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("limit", limit?.ToString()) .AddOptionalParameter("offset", offset?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetSharedTokensRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, limit: limit, offset: offset); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetSharedTokensResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetSharedTokensResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetTagKey.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetTagKey.g.cs index 828f8028..5544a5d8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetTagKey.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetTagKey.g.cs @@ -32,73 +32,73 @@ partial void ProcessGetTagKeyResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetTagKeyArguments( - httpClient: _httpClient, + httpClient: HttpClient, tagKeyId: ref tagKeyId); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/current/tag-keys/{tagKeyId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetTagKeyRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, tagKeyId: tagKeyId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetTagKeyResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetTagKeyResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetTagValue.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetTagValue.g.cs index 786e4de1..c4136120 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetTagValue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.GetTagValue.g.cs @@ -36,75 +36,75 @@ partial void ProcessGetTagValueResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareGetTagValueArguments( - httpClient: _httpClient, + httpClient: HttpClient, tagKeyId: ref tagKeyId, tagValueId: ref tagValueId); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/current/tag-keys/{tagKeyId}/tag-values/{tagValueId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareGetTagValueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, tagKeyId: tagKeyId, tagValueId: tagValueId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessGetTagValueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessGetTagValueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListCurrentWorkspaceSecrets.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListCurrentWorkspaceSecrets.g.cs index 27c678be..a35ad1d0 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListCurrentWorkspaceSecrets.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListCurrentWorkspaceSecrets.g.cs @@ -28,71 +28,71 @@ partial void ProcessListCurrentWorkspaceSecretsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListCurrentWorkspaceSecretsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/secrets", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListCurrentWorkspaceSecretsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListCurrentWorkspaceSecretsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListCurrentWorkspaceSecretsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListPendingWorkspaceInvites.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListPendingWorkspaceInvites.g.cs index e2c9e783..0fecd67b 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListPendingWorkspaceInvites.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListPendingWorkspaceInvites.g.cs @@ -29,71 +29,71 @@ partial void ProcessListPendingWorkspaceInvitesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListPendingWorkspaceInvitesArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/pending", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListPendingWorkspaceInvitesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListPendingWorkspaceInvitesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListPendingWorkspaceInvitesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTagKeys.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTagKeys.g.cs index 3b7689ef..0eb927e7 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTagKeys.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTagKeys.g.cs @@ -28,71 +28,71 @@ partial void ProcessListTagKeysResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListTagKeysArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/tag-keys", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListTagKeysRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListTagKeysResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListTagKeysResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTagValues.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTagValues.g.cs index 0e779f3f..8eb15755 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTagValues.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTagValues.g.cs @@ -32,73 +32,73 @@ partial void ProcessListTagValuesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListTagValuesArguments( - httpClient: _httpClient, + httpClient: HttpClient, tagKeyId: ref tagKeyId); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/current/tag-keys/{tagKeyId}/tag-values", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListTagValuesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, tagKeyId: tagKeyId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListTagValuesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListTagValuesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTaggings.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTaggings.g.cs index fe78dd42..6d4c9e5a 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTaggings.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTaggings.g.cs @@ -32,76 +32,76 @@ partial void ProcessListTaggingsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListTaggingsArguments( - httpClient: _httpClient, + httpClient: HttpClient, tagValueId: ref tagValueId); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/taggings", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddOptionalParameter("tag_value_id", tagValueId?.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListTaggingsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, tagValueId: tagValueId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListTaggingsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListTaggingsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTags.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTags.g.cs index bcd294eb..7ce60889 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTags.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTags.g.cs @@ -28,71 +28,71 @@ partial void ProcessListTagsResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListTagsArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/tags", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListTagsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListTagsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListTagsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTagsForResource.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTagsForResource.g.cs index 6456f7cf..39f1e6a1 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTagsForResource.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListTagsForResource.g.cs @@ -36,79 +36,79 @@ partial void ProcessListTagsForResourceResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListTagsForResourceArguments( - httpClient: _httpClient, + httpClient: HttpClient, resourceType: ref resourceType, resourceId: ref resourceId); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/tags/resource", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); __pathBuilder .AddRequiredParameter("resource_type", resourceType.ToValueString()) .AddRequiredParameter("resource_id", resourceId.ToString()) ; var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListTagsForResourceRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, resourceType: resourceType, resourceId: resourceId); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListTagsForResourceResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListTagsForResourceResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListWorkspaces.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListWorkspaces.g.cs index bc988446..1a8ea2f3 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListWorkspaces.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.ListWorkspaces.g.cs @@ -29,71 +29,71 @@ partial void ProcessListWorkspacesResponseContent( global::System.Threading.CancellationToken cancellationToken = default) { PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareListWorkspacesArguments( - httpClient: _httpClient); + httpClient: HttpClient); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Get, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareListWorkspacesRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest); + httpClient: HttpClient, + httpRequestMessage: __httpRequest); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessListWorkspacesResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessListWorkspacesResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.PatchCurrentWorkspaceMember.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.PatchCurrentWorkspaceMember.g.cs index 14490807..e5de8413 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.PatchCurrentWorkspaceMember.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.PatchCurrentWorkspaceMember.g.cs @@ -38,33 +38,33 @@ partial void ProcessPatchCurrentWorkspaceMemberResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PreparePatchCurrentWorkspaceMemberArguments( - httpClient: _httpClient, + httpClient: HttpClient, identityId: ref identityId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/current/members/{identityId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -72,47 +72,47 @@ partial void ProcessPatchCurrentWorkspaceMemberResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PreparePatchCurrentWorkspaceMemberRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, identityId: identityId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessPatchCurrentWorkspaceMemberResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessPatchCurrentWorkspaceMemberResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; @@ -132,7 +132,7 @@ partial void ProcessPatchCurrentWorkspaceMemberResponseContent( bool? readOnly = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.IdentityPatch + var __request = new global::LangSmith.IdentityPatch { ReadOnly = readOnly, RoleId = roleId, @@ -140,7 +140,7 @@ partial void ProcessPatchCurrentWorkspaceMemberResponseContent( return await PatchCurrentWorkspaceMemberAsync( identityId: identityId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.PatchWorkspace.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.PatchWorkspace.g.cs index 4ba1c863..7e2c83fd 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.PatchWorkspace.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.PatchWorkspace.g.cs @@ -38,33 +38,33 @@ partial void ProcessPatchWorkspaceResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PreparePatchWorkspaceArguments( - httpClient: _httpClient, + httpClient: HttpClient, workspaceId: ref workspaceId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/{workspaceId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -72,47 +72,47 @@ partial void ProcessPatchWorkspaceResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PreparePatchWorkspaceRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, workspaceId: workspaceId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessPatchWorkspaceResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessPatchWorkspaceResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -132,14 +132,14 @@ partial void ProcessPatchWorkspaceResponseContent( string displayName, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.WorkspacePatch + var __request = new global::LangSmith.WorkspacePatch { DisplayName = displayName, }; return await PatchWorkspaceAsync( workspaceId: workspaceId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.UpdateTagKey.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.UpdateTagKey.g.cs index 18a90d0f..bd7b56b5 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.UpdateTagKey.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.UpdateTagKey.g.cs @@ -38,33 +38,33 @@ partial void ProcessUpdateTagKeyResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateTagKeyArguments( - httpClient: _httpClient, + httpClient: HttpClient, tagKeyId: ref tagKeyId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/current/tag-keys/{tagKeyId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -72,47 +72,47 @@ partial void ProcessUpdateTagKeyResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateTagKeyRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, tagKeyId: tagKeyId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateTagKeyResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateTagKeyResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -134,7 +134,7 @@ partial void ProcessUpdateTagKeyResponseContent( string? description = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.TagKeyUpdate + var __request = new global::LangSmith.TagKeyUpdate { Key = key, Description = description, @@ -142,7 +142,7 @@ partial void ProcessUpdateTagKeyResponseContent( return await UpdateTagKeyAsync( tagKeyId: tagKeyId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.UpdateTagValue.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.UpdateTagValue.g.cs index 32013c5a..2263ace8 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.UpdateTagValue.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.UpdateTagValue.g.cs @@ -42,34 +42,34 @@ partial void ProcessUpdateTagValueResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpdateTagValueArguments( - httpClient: _httpClient, + httpClient: HttpClient, tagKeyId: ref tagKeyId, tagValueId: ref tagValueId, request: request); var __pathBuilder = new PathBuilder( path: $"/api/v1/workspaces/current/tag-keys/{tagKeyId}/tag-values/{tagValueId}", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: new global::System.Net.Http.HttpMethod("PATCH"), requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = request.ToJson(JsonSerializerContext); @@ -77,48 +77,48 @@ partial void ProcessUpdateTagValueResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpdateTagValueRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, tagKeyId: tagKeyId, tagValueId: tagValueId, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpdateTagValueResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpdateTagValueResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return @@ -142,7 +142,7 @@ partial void ProcessUpdateTagValueResponseContent( string? description = default, global::System.Threading.CancellationToken cancellationToken = default) { - var request = new global::LangSmith.TagValueUpdate + var __request = new global::LangSmith.TagValueUpdate { Value = value, Description = description, @@ -151,7 +151,7 @@ partial void ProcessUpdateTagValueResponseContent( return await UpdateTagValueAsync( tagKeyId: tagKeyId, tagValueId: tagValueId, - request: request, + request: __request, cancellationToken: cancellationToken).ConfigureAwait(false); } } diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.UpsertCurrentWorkspaceSecrets.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.UpsertCurrentWorkspaceSecrets.g.cs index 8232daf6..9e2c95ab 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.UpsertCurrentWorkspaceSecrets.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.UpsertCurrentWorkspaceSecrets.g.cs @@ -34,32 +34,32 @@ partial void ProcessUpsertCurrentWorkspaceSecretsResponseContent( request = request ?? throw new global::System.ArgumentNullException(nameof(request)); PrepareArguments( - client: _httpClient); + client: HttpClient); PrepareUpsertCurrentWorkspaceSecretsArguments( - httpClient: _httpClient, + httpClient: HttpClient, request: request); var __pathBuilder = new PathBuilder( path: "/api/v1/workspaces/current/secrets", - baseUri: _httpClient.BaseAddress); + baseUri: HttpClient.BaseAddress); var __path = __pathBuilder.ToString(); - using var httpRequest = new global::System.Net.Http.HttpRequestMessage( + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( method: global::System.Net.Http.HttpMethod.Post, requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); - foreach (var _authorization in _authorizations) + foreach (var __authorization in Authorizations) { - if (_authorization.Type == "Http" || - _authorization.Type == "OAuth2") + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") { - httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( - scheme: _authorization.Name, - parameter: _authorization.Value); + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); } - else if (_authorization.Type == "ApiKey" && - _authorization.Location == "Header") + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") { - httpRequest.Headers.Add(_authorization.Name, _authorization.Value); + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext); @@ -67,46 +67,46 @@ partial void ProcessUpsertCurrentWorkspaceSecretsResponseContent( content: __httpRequestContentBody, encoding: global::System.Text.Encoding.UTF8, mediaType: "application/json"); - httpRequest.Content = __httpRequestContent; + __httpRequest.Content = __httpRequestContent; PrepareRequest( - client: _httpClient, - request: httpRequest); + client: HttpClient, + request: __httpRequest); PrepareUpsertCurrentWorkspaceSecretsRequest( - httpClient: _httpClient, - httpRequestMessage: httpRequest, + httpClient: HttpClient, + httpRequestMessage: __httpRequest, request: request); - using var response = await _httpClient.SendAsync( - request: httpRequest, + using var __response = await HttpClient.SendAsync( + request: __httpRequest, completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, cancellationToken: cancellationToken).ConfigureAwait(false); ProcessResponse( - client: _httpClient, - response: response); + client: HttpClient, + response: __response); ProcessUpsertCurrentWorkspaceSecretsResponse( - httpClient: _httpClient, - httpResponseMessage: response); + httpClient: HttpClient, + httpResponseMessage: __response); - var __content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ProcessResponseContent( - client: _httpClient, - response: response, + client: HttpClient, + response: __response, content: ref __content); ProcessUpsertCurrentWorkspaceSecretsResponseContent( - httpClient: _httpClient, - httpResponseMessage: response, + httpClient: HttpClient, + httpResponseMessage: __response, content: ref __content); try { - response.EnsureSuccessStatusCode(); + __response.EnsureSuccessStatusCode(); } - catch (global::System.Net.Http.HttpRequestException ex) + catch (global::System.Net.Http.HttpRequestException __ex) { - throw new global::System.InvalidOperationException(__content, ex); + throw new global::System.InvalidOperationException(__content, __ex); } return __content; diff --git a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.g.cs b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.g.cs index f0e2a4d8..e218b0ad 100644 --- a/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.g.cs +++ b/src/libs/LangSmith/Generated/LangSmith.WorkspacesClient.g.cs @@ -12,10 +12,18 @@ public sealed partial class WorkspacesClient : global::LangSmith.IWorkspacesClie /// /// /// - public const string BaseUrl = "https://api.smith.langchain.com"; + public const string DefaultBaseUrl = "https://api.smith.langchain.com"; - private readonly global::System.Net.Http.HttpClient _httpClient; - private global::System.Collections.Generic.List _authorizations; + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } /// /// @@ -28,25 +36,31 @@ public sealed partial class WorkspacesClient : global::LangSmith.IWorkspacesClie /// If no httpClient is provided, a new one will be created. /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. /// - /// - /// - /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. public WorkspacesClient( global::System.Net.Http.HttpClient? httpClient = null, global::System.Uri? baseUri = null, - global::System.Collections.Generic.List? authorizations = null) + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) { - _httpClient = httpClient ?? new global::System.Net.Http.HttpClient(); - _httpClient.BaseAddress ??= baseUri ?? new global::System.Uri(BaseUrl); - _authorizations = authorizations ?? new global::System.Collections.Generic.List(); + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; - Initialized(_httpClient); + Initialized(HttpClient); } /// public void Dispose() { - _httpClient.Dispose(); + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } } partial void Initialized( diff --git a/src/libs/LangSmith/openapi.yaml b/src/libs/LangSmith/openapi.yaml index e35cfd3f..a89aff63 100644 --- a/src/libs/LangSmith/openapi.yaml +++ b/src/libs/LangSmith/openapi.yaml @@ -15502,6 +15502,7 @@ components: - id - repo_id - commit_id + - commit_hash - tag_name - created_at - updated_at @@ -15519,6 +15520,9 @@ components: title: Commit Id type: string format: uuid + commit_hash: + title: Commit Hash + type: string tag_name: title: Tag Name type: string