How to ask Open AI Chatbot from Windows Terminal

The aim of this page📝 is to duplicate the great idea from “howdoijust instead of curated answers from Stack Overflow, I am using an Open AI chatbot.

Implementation

function ask {
$prompt = ""
$args | % {$prompt += $_ + " "}
python <path\script.py> $prompt
}

Comparison

howdoi format date in Postgres to yyyy-mm-dd
>>> SELECT to_char("date", 'DD/MM/YYYY') FROM mytable;
▶ ask how to format date to YYYY-MM-DD in Redshift
You can use the TO_CHAR function to format a date to YYYY-MM-DD in Redshift. The syntax is as follows:

TO_CHAR(date_expression, 'YYYY-MM-DD')

For example:

SELECT TO_CHAR(CURRENT_DATE, 'YYYY-MM-DD');

LINKS

--

--

Infrastructure Support Engineer/Technical Writer (snowplow.io) with a passion for Python/writing documentation. More about me: https://pavol.kutaj.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pavol Kutaj

Infrastructure Support Engineer/Technical Writer (snowplow.io) with a passion for Python/writing documentation. More about me: https://pavol.kutaj.com