mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
a bunch of things also deepai
This commit is contained in:
parent
aec828beb5
commit
0c4e48bd39
9 changed files with 219 additions and 6 deletions
|
@ -5,6 +5,7 @@ const { Api, Static, Hosts } = require('./endpoints')
|
|||
async function request(path, type, headers, args, host) {
|
||||
let timing = Date.now();
|
||||
url = Api.HOST + path
|
||||
if(process.env.USE_LOCAL_API) url = Hosts.local + path
|
||||
if(host) url = host + path
|
||||
|
||||
// apply default headers
|
||||
|
@ -82,6 +83,12 @@ module.exports.wolframAlpha = async function(context, query){
|
|||
})
|
||||
}
|
||||
|
||||
module.exports.youtube = async function(context, query){
|
||||
return await request(Api.SEARCH_YOUTUBE, "GET", {}, {
|
||||
q: query
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.yacht = async function(context, text){
|
||||
return await request(Api.PHOTOFUNIA_YACHT, "GET", {}, {
|
||||
text: text
|
||||
|
@ -98,6 +105,24 @@ module.exports.retroWave = async function(context, background = 5, textStyle= 4,
|
|||
})
|
||||
}
|
||||
|
||||
module.exports.deepdream = async function(context, url){
|
||||
return await request(Api.IMAGE_DEEPDREAM, "GET", {}, {
|
||||
url: url
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.waifu2x = async function(context, url){
|
||||
return await request(Api.IMAGE_WAIFU2X, "GET", {}, {
|
||||
url: url
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.superresolution = async function(context, url){
|
||||
return await request(Api.IMAGE_SUPERRESOLUTION, "GET", {}, {
|
||||
url: url
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.inferkit = async function(context, input){
|
||||
return await request(Api.INFERKIT, "GET", {}, {
|
||||
input: input
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue