@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
56 lines (55 loc) • 1.82 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* Vectorize API (Beta)
* API for Vectorize services
*
* The version of the OpenAPI document: 0.0.1
*
*
* 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.instanceOfRetrieveContextMessage = instanceOfRetrieveContextMessage;
exports.RetrieveContextMessageFromJSON = RetrieveContextMessageFromJSON;
exports.RetrieveContextMessageFromJSONTyped = RetrieveContextMessageFromJSONTyped;
exports.RetrieveContextMessageToJSON = RetrieveContextMessageToJSON;
exports.RetrieveContextMessageToJSONTyped = RetrieveContextMessageToJSONTyped;
/**
* Check if a given object implements the RetrieveContextMessage interface.
*/
function instanceOfRetrieveContextMessage(value) {
if (!('role' in value) || value['role'] === undefined)
return false;
if (!('content' in value) || value['content'] === undefined)
return false;
return true;
}
function RetrieveContextMessageFromJSON(json) {
return RetrieveContextMessageFromJSONTyped(json, false);
}
function RetrieveContextMessageFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'role': json['role'],
'content': json['content'],
};
}
function RetrieveContextMessageToJSON(json) {
return RetrieveContextMessageToJSONTyped(json, false);
}
function RetrieveContextMessageToJSONTyped(value, ignoreDiscriminator) {
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
if (value == null) {
return value;
}
return {
'role': value['role'],
'content': value['content'],
};
}
;