UNPKG

@datadog/datadog-api-client

Version:
869 lines (868 loc) 358 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.LLMObservabilityApi = exports.LLMObservabilityApiResponseProcessor = exports.LLMObservabilityApiRequestFactory = void 0; const baseapi_1 = require("../../datadog-api-client-common/baseapi"); const configuration_1 = require("../../datadog-api-client-common/configuration"); const http_1 = require("../../datadog-api-client-common/http/http"); const form_data_1 = __importDefault(require("form-data")); const logger_1 = require("../../../logger"); const ObjectSerializer_1 = require("../models/ObjectSerializer"); const exception_1 = require("../../datadog-api-client-common/exception"); class LLMObservabilityApiRequestFactory extends baseapi_1.BaseAPIRequestFactory { aggregateLLMObsExperimentation(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'aggregateLLMObsExperimentation'"); if (!_config.unstableOperations["v2.aggregateLLMObsExperimentation"]) { throw new Error("Unstable operation 'aggregateLLMObsExperimentation' is disabled"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "aggregateLLMObsExperimentation"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/experimentation/analytics"; // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.aggregateLLMObsExperimentation") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsExperimentationAnalyticsRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } batchUpdateLLMObsDataset(projectId, datasetId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'batchUpdateLLMObsDataset'"); if (!_config.unstableOperations["v2.batchUpdateLLMObsDataset"]) { throw new Error("Unstable operation 'batchUpdateLLMObsDataset' is disabled"); } // verify required parameter 'projectId' is not null or undefined if (projectId === null || projectId === undefined) { throw new baseapi_1.RequiredError("projectId", "batchUpdateLLMObsDataset"); } // verify required parameter 'datasetId' is not null or undefined if (datasetId === null || datasetId === undefined) { throw new baseapi_1.RequiredError("datasetId", "batchUpdateLLMObsDataset"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "batchUpdateLLMObsDataset"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/batch_update" .replace("{project_id}", encodeURIComponent(String(projectId))) .replace("{dataset_id}", encodeURIComponent(String(datasetId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.batchUpdateLLMObsDataset") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsDatasetBatchUpdateRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } cloneLLMObsDataset(projectId, datasetId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'cloneLLMObsDataset'"); if (!_config.unstableOperations["v2.cloneLLMObsDataset"]) { throw new Error("Unstable operation 'cloneLLMObsDataset' is disabled"); } // verify required parameter 'projectId' is not null or undefined if (projectId === null || projectId === undefined) { throw new baseapi_1.RequiredError("projectId", "cloneLLMObsDataset"); } // verify required parameter 'datasetId' is not null or undefined if (datasetId === null || datasetId === undefined) { throw new baseapi_1.RequiredError("datasetId", "cloneLLMObsDataset"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "cloneLLMObsDataset"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/clone" .replace("{project_id}", encodeURIComponent(String(projectId))) .replace("{dataset_id}", encodeURIComponent(String(datasetId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.cloneLLMObsDataset") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsDatasetCloneRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } createLLMObsAnnotationQueue(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'createLLMObsAnnotationQueue'"); if (!_config.unstableOperations["v2.createLLMObsAnnotationQueue"]) { throw new Error("Unstable operation 'createLLMObsAnnotationQueue' is disabled"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createLLMObsAnnotationQueue"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.createLLMObsAnnotationQueue") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsAnnotationQueueRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } createLLMObsAnnotationQueueInteractions(queueId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'createLLMObsAnnotationQueueInteractions'"); if (!_config.unstableOperations["v2.createLLMObsAnnotationQueueInteractions"]) { throw new Error("Unstable operation 'createLLMObsAnnotationQueueInteractions' is disabled"); } // verify required parameter 'queueId' is not null or undefined if (queueId === null || queueId === undefined) { throw new baseapi_1.RequiredError("queueId", "createLLMObsAnnotationQueueInteractions"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createLLMObsAnnotationQueueInteractions"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/interactions".replace("{queue_id}", encodeURIComponent(String(queueId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.createLLMObsAnnotationQueueInteractions") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsAnnotationQueueInteractionsRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } createLLMObsDataset(projectId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'createLLMObsDataset'"); if (!_config.unstableOperations["v2.createLLMObsDataset"]) { throw new Error("Unstable operation 'createLLMObsDataset' is disabled"); } // verify required parameter 'projectId' is not null or undefined if (projectId === null || projectId === undefined) { throw new baseapi_1.RequiredError("projectId", "createLLMObsDataset"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createLLMObsDataset"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/{project_id}/datasets".replace("{project_id}", encodeURIComponent(String(projectId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.createLLMObsDataset") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsDatasetRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } createLLMObsDatasetRecords(projectId, datasetId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'createLLMObsDatasetRecords'"); if (!_config.unstableOperations["v2.createLLMObsDatasetRecords"]) { throw new Error("Unstable operation 'createLLMObsDatasetRecords' is disabled"); } // verify required parameter 'projectId' is not null or undefined if (projectId === null || projectId === undefined) { throw new baseapi_1.RequiredError("projectId", "createLLMObsDatasetRecords"); } // verify required parameter 'datasetId' is not null or undefined if (datasetId === null || datasetId === undefined) { throw new baseapi_1.RequiredError("datasetId", "createLLMObsDatasetRecords"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createLLMObsDatasetRecords"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" .replace("{project_id}", encodeURIComponent(String(projectId))) .replace("{dataset_id}", encodeURIComponent(String(datasetId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.createLLMObsDatasetRecords") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsDatasetRecordsRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } createLLMObsExperiment(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'createLLMObsExperiment'"); if (!_config.unstableOperations["v2.createLLMObsExperiment"]) { throw new Error("Unstable operation 'createLLMObsExperiment' is disabled"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createLLMObsExperiment"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/experiments"; // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.createLLMObsExperiment") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsExperimentRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } createLLMObsExperimentEvents(experimentId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'createLLMObsExperimentEvents'"); if (!_config.unstableOperations["v2.createLLMObsExperimentEvents"]) { throw new Error("Unstable operation 'createLLMObsExperimentEvents' is disabled"); } // verify required parameter 'experimentId' is not null or undefined if (experimentId === null || experimentId === undefined) { throw new baseapi_1.RequiredError("experimentId", "createLLMObsExperimentEvents"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createLLMObsExperimentEvents"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/experiments/{experiment_id}/events".replace("{experiment_id}", encodeURIComponent(String(experimentId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.createLLMObsExperimentEvents") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsExperimentEventsRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } createLLMObsIntegrationInference(integration, accountId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'createLLMObsIntegrationInference'"); if (!_config.unstableOperations["v2.createLLMObsIntegrationInference"]) { throw new Error("Unstable operation 'createLLMObsIntegrationInference' is disabled"); } // verify required parameter 'integration' is not null or undefined if (integration === null || integration === undefined) { throw new baseapi_1.RequiredError("integration", "createLLMObsIntegrationInference"); } // verify required parameter 'accountId' is not null or undefined if (accountId === null || accountId === undefined) { throw new baseapi_1.RequiredError("accountId", "createLLMObsIntegrationInference"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createLLMObsIntegrationInference"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/inference" .replace("{integration}", encodeURIComponent(String(integration))) .replace("{account_id}", encodeURIComponent(String(accountId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.createLLMObsIntegrationInference") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsIntegrationInferenceRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } createLLMObsProject(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'createLLMObsProject'"); if (!_config.unstableOperations["v2.createLLMObsProject"]) { throw new Error("Unstable operation 'createLLMObsProject' is disabled"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createLLMObsProject"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/projects"; // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.createLLMObsProject") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsProjectRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } deleteLLMObsAnnotationQueue(queueId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'deleteLLMObsAnnotationQueue'"); if (!_config.unstableOperations["v2.deleteLLMObsAnnotationQueue"]) { throw new Error("Unstable operation 'deleteLLMObsAnnotationQueue' is disabled"); } // verify required parameter 'queueId' is not null or undefined if (queueId === null || queueId === undefined) { throw new baseapi_1.RequiredError("queueId", "deleteLLMObsAnnotationQueue"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/annotation-queues/{queue_id}".replace("{queue_id}", encodeURIComponent(String(queueId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.deleteLLMObsAnnotationQueue") .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } deleteLLMObsAnnotationQueueInteractions(queueId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'deleteLLMObsAnnotationQueueInteractions'"); if (!_config.unstableOperations["v2.deleteLLMObsAnnotationQueueInteractions"]) { throw new Error("Unstable operation 'deleteLLMObsAnnotationQueueInteractions' is disabled"); } // verify required parameter 'queueId' is not null or undefined if (queueId === null || queueId === undefined) { throw new baseapi_1.RequiredError("queueId", "deleteLLMObsAnnotationQueueInteractions"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "deleteLLMObsAnnotationQueueInteractions"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/interactions/delete".replace("{queue_id}", encodeURIComponent(String(queueId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.deleteLLMObsAnnotationQueueInteractions") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsDeleteAnnotationQueueInteractionsRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } deleteLLMObsAnnotations(queueId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'deleteLLMObsAnnotations'"); if (!_config.unstableOperations["v2.deleteLLMObsAnnotations"]) { throw new Error("Unstable operation 'deleteLLMObsAnnotations' is disabled"); } // verify required parameter 'queueId' is not null or undefined if (queueId === null || queueId === undefined) { throw new baseapi_1.RequiredError("queueId", "deleteLLMObsAnnotations"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "deleteLLMObsAnnotations"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations/delete".replace("{queue_id}", encodeURIComponent(String(queueId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.deleteLLMObsAnnotations") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsDeleteAnnotationsRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } deleteLLMObsCustomEvalConfig(evalName, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'deleteLLMObsCustomEvalConfig'"); if (!_config.unstableOperations["v2.deleteLLMObsCustomEvalConfig"]) { throw new Error("Unstable operation 'deleteLLMObsCustomEvalConfig' is disabled"); } // verify required parameter 'evalName' is not null or undefined if (evalName === null || evalName === undefined) { throw new baseapi_1.RequiredError("evalName", "deleteLLMObsCustomEvalConfig"); } // Path Params const localVarPath = "/api/unstable/llm-obs/config/evaluators/custom/{eval_name}".replace("{eval_name}", encodeURIComponent(String(evalName))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.deleteLLMObsCustomEvalConfig") .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } deleteLLMObsData(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'deleteLLMObsData'"); if (!_config.unstableOperations["v2.deleteLLMObsData"]) { throw new Error("Unstable operation 'deleteLLMObsData' is disabled"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "deleteLLMObsData"); } // Path Params const localVarPath = "/api/v2/llm-obs/deletion/data/llmobs"; // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.deleteLLMObsData") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsDataDeletionRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } deleteLLMObsDatasetRecords(projectId, datasetId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'deleteLLMObsDatasetRecords'"); if (!_config.unstableOperations["v2.deleteLLMObsDatasetRecords"]) { throw new Error("Unstable operation 'deleteLLMObsDatasetRecords' is disabled"); } // verify required parameter 'projectId' is not null or undefined if (projectId === null || projectId === undefined) { throw new baseapi_1.RequiredError("projectId", "deleteLLMObsDatasetRecords"); } // verify required parameter 'datasetId' is not null or undefined if (datasetId === null || datasetId === undefined) { throw new baseapi_1.RequiredError("datasetId", "deleteLLMObsDatasetRecords"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "deleteLLMObsDatasetRecords"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records/delete" .replace("{project_id}", encodeURIComponent(String(projectId))) .replace("{dataset_id}", encodeURIComponent(String(datasetId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.deleteLLMObsDatasetRecords") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsDeleteDatasetRecordsRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } deleteLLMObsDatasets(projectId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'deleteLLMObsDatasets'"); if (!_config.unstableOperations["v2.deleteLLMObsDatasets"]) { throw new Error("Unstable operation 'deleteLLMObsDatasets' is disabled"); } // verify required parameter 'projectId' is not null or undefined if (projectId === null || projectId === undefined) { throw new baseapi_1.RequiredError("projectId", "deleteLLMObsDatasets"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "deleteLLMObsDatasets"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/{project_id}/datasets/delete".replace("{project_id}", encodeURIComponent(String(projectId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.deleteLLMObsDatasets") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsDeleteDatasetsRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } deleteLLMObsExperiments(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'deleteLLMObsExperiments'"); if (!_config.unstableOperations["v2.deleteLLMObsExperiments"]) { throw new Error("Unstable operation 'deleteLLMObsExperiments' is disabled"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "deleteLLMObsExperiments"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/experiments/delete"; // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.deleteLLMObsExperiments") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsDeleteExperimentsRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } deleteLLMObsPatternsConfig(configId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'deleteLLMObsPatternsConfig'"); if (!_config.unstableOperations["v2.deleteLLMObsPatternsConfig"]) { throw new Error("Unstable operation 'deleteLLMObsPatternsConfig' is disabled"); } // verify required parameter 'configId' is not null or undefined if (configId === null || configId === undefined) { throw new baseapi_1.RequiredError("configId", "deleteLLMObsPatternsConfig"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs/{config_id}".replace("{config_id}", encodeURIComponent(String(configId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.deleteLLMObsPatternsConfig") .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } deleteLLMObsProjects(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'deleteLLMObsProjects'"); if (!_config.unstableOperations["v2.deleteLLMObsProjects"]) { throw new Error("Unstable operation 'deleteLLMObsProjects' is disabled"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "deleteLLMObsProjects"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/projects/delete"; // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.deleteLLMObsProjects") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "LLMObsDeleteProjectsRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } exportLLMObsDataset(projectId, datasetId, format, version, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'exportLLMObsDataset'"); if (!_config.unstableOperations["v2.exportLLMObsDataset"]) { throw new Error("Unstable operation 'exportLLMObsDataset' is disabled"); } // verify required parameter 'projectId' is not null or undefined if (projectId === null || projectId === undefined) { throw new baseapi_1.RequiredError("projectId", "exportLLMObsDataset"); } // verify required parameter 'datasetId' is not null or undefined if (datasetId === null || datasetId === undefined) { throw new baseapi_1.RequiredError("datasetId", "exportLLMObsDataset"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/export" .replace("{project_id}", encodeURIComponent(String(projectId))) .replace("{dataset_id}", encodeURIComponent(String(datasetId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.exportLLMObsDataset") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "text/csv, application/json"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (format !== undefined) { requestContext.setQueryParam("format", ObjectSerializer_1.ObjectSerializer.serialize(format, "LLMObsDatasetExportFormat", ""), ""); } if (version !== undefined) { requestContext.setQueryParam("version", ObjectSerializer_1.ObjectSerializer.serialize(version, "number", "int64"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } getLLMObsAnnotatedInteractions(queueId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'getLLMObsAnnotatedInteractions'"); if (!_config.unstableOperations["v2.getLLMObsAnnotatedInteractions"]) { throw new Error("Unstable operation 'getLLMObsAnnotatedInteractions' is disabled"); } // verify required parameter 'queueId' is not null or undefined if (queueId === null || queueId === undefined) { throw new baseapi_1.RequiredError("queueId", "getLLMObsAnnotatedInteractions"); } // Path Params const localVarPath = "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions".replace("{queue_id}", encodeURIComponent(String(queueId))); // Make Request Context const requestContext = _config .getServer("v2.LLMObservabilityApi.getLLMObsAnnotatedInteractions") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } getLLMObsAnnotatedInteractionsByTraceIDs(contentIds, offset, limit, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; logger_1.logger.warn("Using unstable operation 'getLLMObsAnnotatedInteractionsByTraceIDs'"); if (!_config.unstableOperations["v2.getLLMObsAnnotatedInteractionsByTraceIDs"]) { throw new Error("Unstable operation 'getLLMObsAnnotatedInteractionsByTraceIDs' is disabled"); } // verify required parameter 'contentIds' is not null or undefined if (contentIds === null || contentIds === undefined) { throw new baseapi_1.RequiredError("contentIds", "getLLMObsAnnotatedInteractionsByTraceIDs"); }