UNPKG

@pinecone-database/pinecone

Version:

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

79 lines 3.15 kB
"use strict"; /* 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.ChatToJSON = exports.ChatFromJSONTyped = exports.ChatFromJSON = exports.instanceOfChat = exports.ChatModelEnum = void 0; const runtime_1 = require("../runtime"); const ContextOptionsModel_1 = require("./ContextOptionsModel"); const MessageModel_1 = require("./MessageModel"); /** * @export */ exports.ChatModelEnum = { Gpt4o: 'gpt-4o', Gpt41: 'gpt-4.1', O4Mini: 'o4-mini', Claude35Sonnet: 'claude-3-5-sonnet', Claude37Sonnet: 'claude-3-7-sonnet', Gemini25Pro: 'gemini-2.5-pro' }; /** * Check if a given object implements the Chat interface. */ function instanceOfChat(value) { let isInstance = true; isInstance = isInstance && "messages" in value; return isInstance; } exports.instanceOfChat = instanceOfChat; function ChatFromJSON(json) { return ChatFromJSONTyped(json, false); } exports.ChatFromJSON = ChatFromJSON; function ChatFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'messages': (json['messages'].map(MessageModel_1.MessageModelFromJSON)), 'stream': !(0, runtime_1.exists)(json, 'stream') ? undefined : json['stream'], 'model': !(0, runtime_1.exists)(json, 'model') ? undefined : json['model'], 'temperature': !(0, runtime_1.exists)(json, 'temperature') ? undefined : json['temperature'], 'filter': !(0, runtime_1.exists)(json, 'filter') ? undefined : json['filter'], 'jsonResponse': !(0, runtime_1.exists)(json, 'json_response') ? undefined : json['json_response'], 'includeHighlights': !(0, runtime_1.exists)(json, 'include_highlights') ? undefined : json['include_highlights'], 'contextOptions': !(0, runtime_1.exists)(json, 'context_options') ? undefined : (0, ContextOptionsModel_1.ContextOptionsModelFromJSON)(json['context_options']), }; } exports.ChatFromJSONTyped = ChatFromJSONTyped; function ChatToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'messages': (value.messages.map(MessageModel_1.MessageModelToJSON)), 'stream': value.stream, 'model': value.model, 'temperature': value.temperature, 'filter': value.filter, 'json_response': value.jsonResponse, 'include_highlights': value.includeHighlights, 'context_options': (0, ContextOptionsModel_1.ContextOptionsModelToJSON)(value.contextOptions), }; } exports.ChatToJSON = ChatToJSON; //# sourceMappingURL=Chat.js.map