Thursday, February 9, 2023

Quick Hit: Force Microsoft Edge New Tab to Google

Microsoft doesn't provide a way to do this through the interface. It's annoying. :) 

Here's the registry entry which you can [1] manually create or [2] copy into a new text file, rename the extension to .reg, and run it. 

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\Recommended]

"NewTabPageLocation"="http://www.google.com"


ChatGPT Null Value to API from Google Sheets Error

 Probably nothing, but some interesting results nonetheless. Check out the screenshots for example results.

  1. Create a new Google sheet
  2. Extensions | Apps Script | delete prefilled text
  3. Create function that calls ChatGPT and passes value from another cell to the API (example below that’s floating around) | Replace secret key with yours
  4. Click save project
  5. Navigate to cell B1 and type =AI(A1,0.7)
  6. Pull the formula down to get multiple results
  7. Screenshots of the few of the results below

const SECRET_KEY = "put-your-secret-key-from-openai-api-access-registration-here";

const MAX_TOKENS = 200;

// For more cool AI snippets and demos, follow me on Twitter: https://twitter.com/_abi_

/**

* Completes your prompt with GPT

* @param {string} prompt Prompt

* @param {number} temperature (Optional) Temperature. 1 is super creative while 0 is very exact and precise. Defaults to 0.4.

* @param {string} model (Optional) GPT-3 Model to use. Defaults to "text-davinci-003".

* @return Completion returned by GPT-3

* @customfunction

*/

function AI(prompttemperature = 0.4model = "text-davinci-003") {

  const url = https://api.openai.com/v1/completions;

  const payload = {

    modelmodel,

    promptprompt,

    temperaturetemperature,

    max_tokensMAX_TOKENS,

  };

  const options = {

    contentType"application/json",

    headers: { Authorization"Bearer " + SECRET_KEY },

    payloadJSON.stringify(payload),

  };

  const res = JSON.parse(UrlFetchApp.fetch(urloptions).getContentText());

  return res.choices[0].text.trim();

}

 

/**

 * Classifies an item into a fixed set of categories

 * @param {range} categories Set of categories

 * @param {string} item Item to classify

 * @param {range} rules (Optional) Set of rules written in plain text

 * @return Completion returned by GPT-3

 * @customfunction

 */

function CATEGORIZE(categoriesinputrules=[]) {

  const prompt = "The available categories are " + categories.map((c) => `"${c}"`).join(", ") + ". " + rules.join(". ") + "The category for '" + input + "' is ";

  console.log(prompt);

  const completion = AI(prompt0"text-davinci-003");

  // Replace "s and .s at the start and end of the string

  return completion.replace(/^"/g'').replace(/["|.]{0,2}$/'');

}

Tuesday, February 7, 2023

Impact Radar for 2023

This brief is an interesting read created by Gartner to discuss emerging technologies over the next decade. I've shared this with a few people inside my organization and the response has been quite interesting. When we get so focused on our own domain, reading forward-looking articles such as this one can seem like science fiction. 

This particular paper is targeted towards particle leaders to help them understand how emerging technologies and trends are changing. Staying on top of emerging technologies is necessary to decide which technologies or trends are most beneficial for their business, and when it is the right time to invest in them in order to improve their products and services.

Never lose sight of that fine line between embedded truth and the need for change. Never lose focus of the opportunities that can make you successful.

In this case, the authors created a simple chart depicting which technologies require focus now, and which ones they believe are imminent. Paying attention to these shifts helps to ensure relevance and longevity. 

This brief is a short read. You can access it here. Emerging Tech Impact Radar: 2023 (gartner.com)