faetalize / zodiac

A ⚡lightweight⚡ frontend for Google's Gemini Pro.
https://zodiac.faetalize.dev/
GNU General Public License v3.0
68 stars 18 forks source link

You should add internet to it #25

Open HelpingAI opened 6 months ago

HelpingAI commented 6 months ago

https://abhaykoul-webscout1.hf.space/search this API URL will search 10 results from web if limit is not set, if you want you can you this API in your code

const https = require('https');
const readline = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});

readline.question('Enter your search query: ', (query) => {
    const url = "https://abhaykoul-webscout1.hf.space/search";
    const payload = JSON.stringify({ query: query, limit:  5 }); // Set limit to  5

    const options = {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Content-Length': Buffer.byteLength(payload)
        }
    };

    const req = https.request(url, options, (res) => {
        let data = '';

        res.on('data', (chunk) => {
            data += chunk;
        });

        res.on('end', () => {
            try {
                const parsedData = JSON.parse(data);
                console.log(parsedData);
                // Process the data here
            } catch (e) {
                console.error('Error parsing JSON:', e);
            }
        });
    });

    req.on('error', (e) => {
        console.error('There was a problem with the request:', e.message);
    });

    req.write(payload);
    req.end();

    readline.close();
});
HelpingAI commented 6 months ago

@faetalize

faetalize commented 6 months ago

Oh gosh... not the AI generated issue with a random (and nonexistent) API...

Am I dreaming rn?

@HelpingAI please do not ever submit anything to my codebases unless your account is being manned.

HelpingAI commented 6 months ago

response of this API

HelpingAI commented 6 months ago

@faetalize,

I want to clarify that the API https://abhaykoul-webscout1.hf.space/search exists, and my intention was solely to suggest it for consideration.

faetalize commented 6 months ago

anywho, adding internet features is planned. but what is this api? what is the documentation of it? who made it? this is a weird issue. i'll leave it open for now.

HelpingAI commented 6 months ago

I have made it. Also it is hosted here https://huggingface.co/spaces/Abhaykoul/WebScout1/blob/main/app.py