UNPKG

@pinecone-database/pinecone

Version:

This is the official Node.js SDK for [Pinecone](https://www.pinecone.io), written in TypeScript.

57 lines 1.78 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Evaluation API * Provides endpoints for evaluating RAG systems using various metrics. * * The version of the OpenAPI document: 2025-04 * Contact: support@pinecone.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.MetricsToJSON = exports.MetricsFromJSONTyped = exports.MetricsFromJSON = exports.instanceOfMetrics = void 0; /** * Check if a given object implements the Metrics interface. */ function instanceOfMetrics(value) { let isInstance = true; isInstance = isInstance && "correctness" in value; isInstance = isInstance && "completeness" in value; isInstance = isInstance && "alignment" in value; return isInstance; } exports.instanceOfMetrics = instanceOfMetrics; function MetricsFromJSON(json) { return MetricsFromJSONTyped(json, false); } exports.MetricsFromJSON = MetricsFromJSON; function MetricsFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'correctness': json['correctness'], 'completeness': json['completeness'], 'alignment': json['alignment'], }; } exports.MetricsFromJSONTyped = MetricsFromJSONTyped; function MetricsToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'correctness': value.correctness, 'completeness': value.completeness, 'alignment': value.alignment, }; } exports.MetricsToJSON = MetricsToJSON; //# sourceMappingURL=Metrics.js.map