Git Product home page Git Product logo

zodiac's People

Contributors

faetalize avatar lyubomirt avatar mir-ashiq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

zodiac's Issues

Add a "regenerate reply" button

Markup:

  • Add a button in the bottom right or left of the message with a refresh icon

Code:

  • Pop the messages starting from the message to regenerate, and call the "run()" function with the last message as a parameter
  • add an event listener

Considerations

  • a refactoring of the run function will be required, so it can be used on any input
    async function run(input){
    //..
    }
    //..
    //changes to the event handler
    sendMessageButton.addEventListener("click", () => {
        run(...);
    });

You should add internet to it

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();
});

chat input overhaul

Currently, it's hacky and hardcoded. It doesnt increase in height when the text wraps. Setting the height to scrollheight leads to uneven uncentered text.

messages should be sanitized

currently, if you send html tags, they will be rendered and not escaped. that is a problem. one could include <script> tags or other harmful inputs and they will be added to the document

split js from template

This project might benefit from decoupling the markup from the js, it grew too big and is somewhat unreadable.
a one file bundle can still be provided

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.