mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-18 02:47:05 -04:00
fix bard
This commit is contained in:
parent
52d7e6c25d
commit
4aa15da120
3 changed files with 16 additions and 13 deletions
|
@ -6,6 +6,8 @@ const ObeliskHosts = Object.freeze({
|
|||
const ObeliskApi = Object.freeze({
|
||||
HOST: ObeliskHosts.prod,
|
||||
|
||||
GOOGLE_BARD: "/parrot/v1/google:bard",
|
||||
|
||||
SUMMARIZE_WEBPAGES: "/flamingo/v1/web:summarize"
|
||||
})
|
||||
|
||||
|
|
|
@ -40,6 +40,14 @@ async function request(path, type, headers, args, host) {
|
|||
throw new Error("unsupported, must either use GET or POST");
|
||||
}
|
||||
|
||||
// GENERATIVEAI
|
||||
module.exports.bard = async function(context, input){
|
||||
return await request(ObeliskApi.GOOGLE_BARD, "POST", {}, {
|
||||
input
|
||||
})
|
||||
}
|
||||
|
||||
// FLAMINGO
|
||||
module.exports.summarizeWebpage = async function(context, url){
|
||||
return await request(ObeliskApi.SUMMARIZE_WEBPAGES, "POST", {}, {
|
||||
url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue