Code Monkey home page Code Monkey logo

the-office-ai-chat's Introduction

The Office Twitter Bot

This project is a Twitter bot that generates and posts tweets as characters from the TV show "The Office". It uses an AI model to generate the tweets and posts them using the Twitter API.

Usage

The main script is main.py. It takes one argument, which is the name of the character you want to generate a tweet for. The options are jim, michael, pam, stanley, and dwight.

Example usage:

python main.py jim

This will generate a tweet as Jim Halpert from The Office.

Files

  • main.py: The main script that handles the generation and posting of tweets.
  • ai_generate.py: Custom library for generating responses.
  • tweeter.py: Custom library for interacting with the Twitter API.
  • general_config.py: Configuration file containing general settings.
  • system_messages.py: Script for handling system messages.
  • {character}_memory.json: Memory file for the characters, containing stored messages. These will be generated by the script as its used.

Character Memory

Memories from your characters will be stored in specific JSON files. For example, pam_memory.json stores Pam's memories. These files help the bot remember past interactions and generate more contextually accurate tweets.

Example content from pam_memory.json:

{
  "messages": [
    {
      "role": "assistant",
      "content": "Just another day of doing some light gardening around the house. ๐ŸŒฑ๐Ÿ  Couldn't help but think about my old Dunder Mifflin days though... remember when Jim and I had that super hilarious paper war with Dwight? Those were the days! ๐Ÿ˜‚ @JmHalp #OfficeMemories"
    },
    {
      "role": "assistant",
      "content": "Cooking with Jim (@JmHalp) today! Making our famous chicken dance stir fry for dinner. It's becoming our Sunday tradition. ๐Ÿ๐ŸŒถ๏ธ I love spending time in the kitchen with my favorite person! #Foodie #CoupleGoals"
    }
  ]
}

Built With

  • Python

Authors

  • Paul Giles

Acknowledgments

  • The creators of The Office for the inspiration

the-office-ai-chat's People

Contributors

shalkith avatar

Watchers

 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.