Code Monkey home page Code Monkey logo

jasper-alternative-gpt's Introduction

logo

Welcome to Jema.ai

Open source Jasper alternative.

License: MIT License

This project uses ChatGPT API to create almost any text based output for your need - from marketing content to blog post ideas and a lot more. It uses simple template based components to ask ChatGPT for generating results Creating new templates or tasks take about 30 mins. no more, so you can extend it for your needs or wait for new template release :)

Jema.ai Jasper alternative

Jema.ai Open Source Jasper alternative

How it works

This project uses the ChatGPT API and Vercel Edge functions. It takes a template for each action or command type, and based on the inputs and mission, it sends ChatGPT the commands to get the required results. The "command" field in each template is most important to tell ChatGPT what to do. In addition, you can add different input types for each template if you wish to use additional parameters. More template can be added to the TEMPLATES list.

Add your own OpenAI API key and have your own Jema.ai

In order to work locally or deploy this project to Vercel, you need to set your OPENAI_API_KEY to use ChatGPT3 API. Once added , this should work out of the box.

Running Locally

This project is built with Next.js and TailwindCSS, so you can deploy it directly to Vercel.

After cloning the repo, go to OpenAI to make an account and put your API key in a file called .env.local(OPENAI_API_KEY) Then, run the application in the command line and it will be available at http://localhost:3000.

npm install

yarn dev

Changing ChatGPT prompts and requests

You can fine tune ChatGPT to your needs, give it any mission that you wish it to complete. The basic message structure is as follows:

const generateOutputHandler = async (template: Template, inputsData: { [key: string]: string }) => {
    const instruction = createInstruction(template.inputs, inputsData);
    const mainGoal = template.description;

    const messages = [
        { role: "system", content: "You are a helpful assistant." },
        { role: "user", content: `Your task is: "${mainGoal}".\n\nHere are the details:\n${instruction}. 
            Please suggest 3 outputs. number them 1,2,3` },
    ];

    try {
        const response: any = await openai.createChatCompletion({
            model: "gpt-3.5-turbo",
            // @ts-ignore
            messages: messages,
            temperature: 1,
        });

        const reply = response?.data?.choices[0].message.content;
        setOutput(reply || '');

    } catch (error) {
        console.log(error)
    }
};

Who made this project

My name is Yuval - an entrepreneur at heart , I โค๏ธ building end-to-end systems that not only look amazing and feel state-of-the-art, but also have real meaning and impact.

You can contact me on Linkedin for any suggestions, questions or thoughts. https://www.linkedin.com/in/yuval-suede/

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!
I will always appreciate a STAR and an attribution of the main demo website

  • Fork the repository, Clone it on your device. That's it ๐ŸŽ‰
  • Finally make a pull request :)

๐Ÿ“ License

This project is MIT License licensed.

jasper-alternative-gpt's People

Contributors

yuvalsuede avatar

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.