UNPKG

@makingchatbots/genesys-cloud-chatbot-tester-cli

Version:

[![npm](https://img.shields.io/npm/v/@makingchatbots/genesys-cloud-chatbot-tester-cli)](https://www.npmjs.com/package/@makingchatbots/genesys-cloud-chatbot-tester-cli) [![Follow me on LinkedIn for updates](https://img.shields.io/badge/Follow%20for%20updat

24 lines (23 loc) 687 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateOpenAiEnvVariables = validateOpenAiEnvVariables; const joi_1 = __importDefault(require("joi")); const schema = joi_1.default.object() .keys({ OPENAI_API_KEY: joi_1.default.string().required(), }) .unknown(); function validateOpenAiEnvVariables(env) { const { error, value } = schema.validate(env); if (error) { return { error }; } else { return { openAiKey: value.OPENAI_API_KEY, }; } }