Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function main() {
//
// The key specific to your personalization service instance; e.g. "0123456789abcdef0123456789ABCDEF"
let serviceKey = process.env.PERSONALIZER_KEY;
// The endpoint specific to your personalization service instance;
// e.g. https://westus2.api.cognitive.microsoft.com
let baseUri = process.env.PERSONALIZER_ENDPOINT;
//
//
let credentials = new CognitiveServicesCredentials(serviceKey);
// Initialize Personalization client.
let personalizerClient = new Personalizer.PersonalizerClient(credentials, baseUri);
//
//
let runLoop = true;
do {
//
let rankRequest = {}
// Generate an ID to associate with the request.
rankRequest.eventId = uuidv1();
async function main() {
//
// The key specific to your personalization service instance; e.g. "0123456789abcdef0123456789ABCDEF"
const serviceKey = "REPLACE-WITH-YOUR-PERSONALIZER-KEY";
// The endpoint specific to your personalization service instance;
// e.g. https://.cognitiveservices.azure.com
const baseUri = "https://REPLACE-WITH-YOUR-PERSONALIZER-RESOURCE-NAME.cognitiveservices.azure.com";
//
//
const credentials = new CognitiveServicesCredentials(serviceKey);
// Initialize Personalization client.
const personalizerClient = new Personalizer.PersonalizerClient(credentials, baseUri);
//
//
let runLoop = true;
do {
//
let rankRequest = {}
// Generate an ID to associate with the request.
rankRequest.eventId = uuidv1();