Git Product home page Git Product logo

abbreviame's Introduction

Logo de abbreviame

Originally: A proof of concept to know if an AI can answer any question about any user reading all their timeline.

At the end: Get an abbreviated description made by an AI of you based on your latest tweets. What do other users perceive from what you tweet?

What you can do with this

You can do several things, like:

  • Replicate original abbrevia.me service.
  • Pivot original abbrevia.me for other use cases, e.g. a service for corporates.
  • Use it for other questions. Actually, the code was prepared to accept other questions, beyond the original one. It was never used in production, but you can send an "anotherQuestion" parameter in your query ๐Ÿ˜ฑ Be creative! For example, you can say: "Specify 10 keywords that match this user."

Some limits you must be aware of:

  • Twitter apps have a rate limit. Check what does this mean for your use case.
  • OpenAI has a max quota of 120 $. If you expect to spend more, fill the form you will find in their site soon.

Installation & local execution

If you have any question or you find a bug, please, let me know. If you want to contribute, go ahead and do it. If you want to do something similar with that code, DM me for help; especially if you belong to an underrepresented group in technology. I might not answer, but if I have time, I am willing to help.

You can adapt this code to use any database or server. In my case, I use firebase, so this is a guide to make it work in firebase.

firebase use --add
  • Inside functions folder
cd functions
  • Copy .env-example file to .env
cp .env-example .env
  • Edit ".env" file and add your own API keys (from twitter and openAI)

  • Use node 16. I usually use NVM in order to use different node versions.

nvm use
  • Install dependencies
npm install
  • Change the ROLE_SYSTEM and the prompt, in following files:

    • functions/app/gpt/query-gpt-chat.js (ROLE_SYSTEM_INSTRUCTIONS variable)
    • functions/app/prompt.js (PROMPTS variable)
  • In your root folder again

cd ..
  • Add a "service-account.json" for firebase database connection.

  • Run an emulator

firebase emulators:start

The rest of this, I leave it to you!

License

MIT License. Read LICENSE.md

It is not mandatory to notify me if you use this code, but it would be great to know that you use it.

Recognition & Contribution

Thanks @dianait_ for the abbreviame logo.

abbreviame's People

Contributors

heedrox avatar dianait avatar igolaizola avatar baumannzone avatar creativoma avatar rcasia 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.