getCurrentWeather()
Sample method for returning current weather of specific location. Get API key from https://weather.visualcrossing.com and replace in API_KEY
For background image changes, register with https://api.unsplash.com/, get their API key and replace with BACK_API_KEY
In Video AI section in the dashboard in the advanced section, for the getCurrentWeather sample function to work, fill in in "Name of the function" getCurrentWeather,
"Description" - "Get the current weather in a given location" and parameters - location,unit
Additionaly a request is sent to get the background of a location to https://api.unsplash.com/
The ChatGPT detects a location and passes it to this method defined in the schema. Ask for example: "Weather in New York"
getCurrentWeather(mixed $arguments) : mixed
Parameters
-
$arguments
: mixed
-
getPrice()
Sample method for price of stocks from finance yahoo
In Video AI section in the dashboard in the advanced section, fill in getPrice in "Name of the function"
"Description" - "Get the current price for a stock" and parameters - symbol
The ChatGPT detects if you are asking for a price and returns it, i.e. "What is the price of crude oil"
getPrice(mixed $arguments) : mixed
Parameters
-
$arguments
: mixed
-
getCurrency()
Sample method for converting currency to USD. You need to get API key from https://exchangerate-api.com and replace it with API_KEY
In Video AI section in the dashboard in the advanced section, fill in "getCurrency" in "Name of the function"
"Description" - "Get currency conversion" and parameters - currency,quantity
The ChatGPT detects if you are asking for a currency conversion and returns it, i.e. "Convert me 100 euros please"
getCurrency(mixed $arguments) : mixed
Parameters
-
$arguments
: mixed
-
getHotels()
Sample for getting hotel information from TravelPayouts hotel data API. Create an account from https://app.travelpayouts.com, get your API token and replace it with API_KEY in the code
For background image changes, register with https://api.unsplash.com/, get their API key and replace with BACK_API_KEY
In Video AI section in the dashboard in the advanced section, fill in "getHotel" in "Name of the function"
"Description" - "Get hotels in city location" and parameters - city
The ChatGPT detects keywords hotels and location of a city calls the TravelPayouts API and responds
getHotels(mixed $arguments) : mixed
Parameters
-
$arguments
: mixed
-
getNews()
Sample for getting news based on keywords from https://eventregistry.org data API. Create an account from https://eventregistry.org, get your API token and replace it with API_KEY in the code
In Video AI section in the dashboard in the advanced section, fill in "getNews" in "Name of the function"
"Description" - "Get latest news by keywords" and parameters - keywords
The ChatGPT detects the request and based on the keywords calls NewsApi API and responds.
getNews(mixed $arguments) : mixed
Parameters
-
$arguments
: mixed
-
getNewsDetailed()
Sample for getting news body on keywords from https://eventregistry.org data API. Create an account from https://eventregistry.org, get your API token and replace it with API_KEY in the code
In Video AI section in the dashboard in the advanced section, fill in "getNewsDetailed" in "Name of the function",
"Description" - "Get news by title and keywords" and parameters - news, keywords
The ChatGPT detects the request and based on the keywords calls NewsApi API and responds.
getNewsDetailed(mixed $arguments) : mixed
Parameters
-
$arguments
: mixed
-
getUrl()
Sample for opening an URL of a company.
getUrl(mixed $arguments) : mixed
For background image changes, register with https://api.unsplash.com/, get their API key and replace with BACK_API_KEY
In Video AI section in the dashboard in the advanced section, fill in "getUrl" in "Name of the function",
"Description" - "Open an URL of a company by keyword" and parameters - keyword
Parameters
-
$arguments
: mixed
-
getAvailableTimeslots()
Sample function for getting available timeslots for a booking. For example a healthcare organization or a hotel availability
In Video AI section in the dashboard in the advanced section, fill in "getAvailableTimeslots" in "Name of the function",
"Description" - "Get available timeslots and free hours" and parameters - timeslot
getAvailableTimeslots(mixed $arguments) : mixed
Parameters
-
$arguments
: mixed
-
bookTimeslot()
Sample function for booking a timeslot
In Video AI section in the dashboard in the advanced section, fill in "bookTimeslot" in "Name of the function",
"Description" - "Book a timeslot availability with email and name" and parameters - timeslot,email,name
bookTimeslot(mixed $arguments) : mixed
Parameters
-
$arguments
: mixed
-
getNewsFeed()
Sample for getting news based on keywords from a free RSS data deed. Get your desired news feed URL and replace with it NEWS_FEED_URL
In Video AI section in the dashboard in the advanced section, fill in "getNewsFeed" in "Name of the function",
"Description" - "Get latest news" and parameters - news
The ChatGPT detects the request and returns last 10 news feed.
getNewsFeed(mixed $arguments) : mixed
Parameters
-
$arguments
: mixed
-
getNewsFeedDetailed()
Sample for getting news based on keywords from a free RSS data deed
In Video AI section in the dashboard in the advanced section, fill in "getNewsFeedDetailed" in "Name of the function",
"Description" - "Get detailed news from RSS" and parameters - news
The ChatGPT detects the request and returns a detailed description.
getNewsFeedDetailed(mixed $arguments) : mixed
Parameters
-
$arguments
: mixed
-