Skip to content

Ixitxachitl/Pywiki-Lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

pyWiki Lite

pyWiki Lite is a chatbot application that interfaces with OpenAI, GPT-4-All, and Twitch. This guide will walk you through the process of obtaining a Twitch Client ID and Client Secret, setting up a redirect URI, and acquiring an OpenAI API key for use with pyWiki Lite.

Twitch Client ID and Client Secret

  1. Create a Twitch Developer Account:

  2. Create a New Application:

    • Log in to your Twitch Developer account.
    • Go to the Applications section.
    • Click on the "Register Your Application" button.
  3. Fill Out Application Details:

    • Provide a name for your application (e.g., "MyTwitchApp").
    • Set the OAuth Redirect URLs to http://localhost:3000/.
    • Choose an appropriate category for your application.
    • Agree to the terms of service and click the "Create" button.
  4. Obtain Client ID and Client Secret:

    • After creating the application, you'll receive a Client ID and a Client Secret. Keep these secure, as they are required for authentication.

OpenAI API Key

  1. Sign Up for an OpenAI Account:

    • If you don't have an OpenAI account, sign up for one on the OpenAI website.
  2. Generate an API Key:

    • Log in to your OpenAI account.
    • Navigate to the API section of your account.
  3. Create a New API Key:

    • Create a new API key and provide a descriptive name for it.
  4. Retrieve Your API Key:

    • Once the API key is generated, it will be displayed. This key is necessary for making API requests to OpenAI.

Remember to keep your API keys secure and avoid sharing them publicly or hardcoding them directly into your code. Use best practices for managing sensitive information in your applications.

Login

  • Once you enter your Client ID and Client Secret you may click login to direct you to a browser login, log into the account that you want your bot to be.
  • OpenAI API Key is necessary to generate responses, it is possible to use gpt4all instead of OpenAI without entering a key as long as the necessary files are in the same directory. (see below)

Additional Resources

Usage

  • Say the name of the bot, and it will reply with an AI generated response.
  • Set the slider to a percentage chance that the bot will reply on its own at random.
  • Left click to select a chatter on the user list and right click to tell the bot to address them.
  • Double-click a user for some additional account information. (If the bot is not a moderator the follow age will say "Not Following")
  • Enter instructions into the context box to influence the bot's "personality," this works best in GPT-4, has some effect on GPT-3.5-Turbo, and little effect on the offline models.

Tags for Context:

  • <name> : Same as Username
  • <channel> : Same as Channel
  • <game> : The current game from the twitch API
  • <author> : The chatter that sent the prompt
  • <emotes> : A CSV of all global twitch emotes (Uses a lot of tokens, remove this tag to save on openai credit)
  • <time> : Raw local date and time output (<UTC> also works)
  • <chatter_pronouns> : The pronouns of the chatter that sent the prompt
  • <streamer_pronouns> : The pronouns of the streamer
  • <users> : A CSV of the users in chat (Pulled from irc, may take time to update, large lists can use a lot of tokens, so you may not want to use this tag. If ignore is checked the bot sees the list as unknown.)

Features:

image