File size: 790 Bytes
d04e364
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import axios from "axios";
const ENDPOINT = 'https://blackearthauction.com/Bard/api?req='
export const config =     {
  "name" : "geminiweb",
  "url" : "/api/geminiweb",
  "description" : "Get response from Gemini AI. Gemini AI is a very powerful AI that can do a lot of things. It have access to real time internet! It can provide you with the latest news, weather, and more.",
  "query" : "prompt",
  "response" : "text",
  "testURL" : "./api/geminiweb?prompt=hello"
}
export default async function handler(req, res) {
  let prompt = req.query.prompt;
  let result = await axios.get(ENDPOINT + encodeURIComponent(prompt+' Tone of reply should be  Professional'))
  console.log(result.data.response)

  result = result.data.response
  res.status(200).json({
    reply: result
  });

  
}