@pinecone-database/pinecone
Version:
This is the official Node.js SDK for [Pinecone](https://www.pinecone.io), written in TypeScript.
60 lines • 2.46 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* Pinecone Assistant Data Plane API
* Pinecone Assistant Engine is a context engine to store and retrieve relevant knowledge from millions of documents at scale. This API supports interactions with assistants.
*
* 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.ContextRequestToJSON = exports.ContextRequestFromJSONTyped = exports.ContextRequestFromJSON = exports.instanceOfContextRequest = void 0;
const runtime_1 = require("../runtime");
const MessageModel_1 = require("./MessageModel");
/**
* Check if a given object implements the ContextRequest interface.
*/
function instanceOfContextRequest(value) {
let isInstance = true;
return isInstance;
}
exports.instanceOfContextRequest = instanceOfContextRequest;
function ContextRequestFromJSON(json) {
return ContextRequestFromJSONTyped(json, false);
}
exports.ContextRequestFromJSON = ContextRequestFromJSON;
function ContextRequestFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'query': !(0, runtime_1.exists)(json, 'query') ? undefined : json['query'],
'filter': !(0, runtime_1.exists)(json, 'filter') ? undefined : json['filter'],
'messages': !(0, runtime_1.exists)(json, 'messages') ? undefined : (json['messages'].map(MessageModel_1.MessageModelFromJSON)),
'topK': !(0, runtime_1.exists)(json, 'top_k') ? undefined : json['top_k'],
'snippetSize': !(0, runtime_1.exists)(json, 'snippet_size') ? undefined : json['snippet_size'],
};
}
exports.ContextRequestFromJSONTyped = ContextRequestFromJSONTyped;
function ContextRequestToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'query': value.query,
'filter': value.filter,
'messages': value.messages === undefined ? undefined : (value.messages.map(MessageModel_1.MessageModelToJSON)),
'top_k': value.topK,
'snippet_size': value.snippetSize,
};
}
exports.ContextRequestToJSON = ContextRequestToJSON;
//# sourceMappingURL=ContextRequest.js.map
;