Accessing bot memory in Discord

First I made a functions that return a prompt or a response with a variable of the recall length (how long ago the response/prompt was given).

Next I made bot commands that called the prompt/response recall function and passed the users specified recall length to the function.

I made the discord bot recognise the user commands

And finally added the responses and prompts to a memory list with embeded dictionaries that hold the relevant prompts and responses which can be accessed.

example of the bot working

Getting the bot running locally

The README and comments for this project are currently very unhelpful and provide little information, so I am having the understand the code myself.

I started by installing the dependencies>.

Next I created API keys for discord and openAI, created a JSON file with the keys, and called the json keys in the main python file.

I have got the Bot running locally on my computer.

The bot can fufill its basic functionality, I now need to allow it to remember the last five responses.

To Do:

  1. Install libraries and dependencies necessary.
  2. Create a discord bot account and get its token
  3. set up an openAI api key, put it in an environment variable or .env file
  4. modify and fix the code
  5. Run code from terminal

I have dont some research into the steps necessary to work on my project

Topic 1: ‘licenses’ (How did the lecture on copyleft licenses informed your license choice

In class we learnt about different types of licenses, including those that fall under the CopyLeft movement. Copyleft licenses are particularly interesting as they allow others to use, modify, and re-distribute the licensed work while still maintaining the right of the original publisher to impose certain conditions. Moreover, all software that redistributes a version of the copyleft licensed code must be released under the same license, thus preventing proprietary licenses being imposed. This ensures software remains open source and prevents corporations profiting from other peoples work.

Examples of such licenses include the Climatestrike license (2019) which restricts use to any entity involved in mining or distribution of fossil fuels, the Anti-Fascist MIT (2018) license that restricts use to those who support fascism, and the the Peer Production(2010) license which restricts for-profit use unless the profit is shared equally among the workers. Such licenses are always clear in confirming the right to use, modify, and redistribute their software unless the terms are violated. For example, the Peer Production License grants ‘worldwide, royalty-free, non-exclusive, perpetual […] license’ to reproduce, reproduce adaptions, distribute, and distribute adaptions unless the software is used for ‘commercial advantage or private monetary compensation’. Licenses such as the use insure work can be Open sourced without fear of it being misused. Should the terms of the license be broken, legal action can be pursued against the offending party.

Blender is a good example of a software and a copy left license, released under the General Public License (GPL). This allows developers and artists to modify, use, and re-distribute new versions of the software, giving huge creative freedom to many people who would otherwise struggle or be unable to use the expensive alternative software. I have used blender a lot in the past few years and by making it open source the developers have created a community who are always trying to help each other and contribute to make the software better. It is always easy to find a tutorial or a fix for a problem, if you know how you can even alter the software itself.

As an exercise in class we were asked to make our own licenses, mine can be found in the post below. In this exercise I attempted to make the most oppressive and controlling license possible, and in doing so, was able to better understand how damaging oppressive licenses can be; should someone use my license, they would be liable to various and severe legal obligation and highly costly legal fees should they in any way violate the terms. CopyLeft licenses, on the other hand, guarantee the right to use and modify existing software without fear of litigation, thus encouraging innovation and creativity.

This lecture, therefore, informed me how Copy left licenses are vital to ensuring licensed work can still remain open source, thus allowing individuals and creatives without access to powerful resources to create and build far beyond what they could do alone. It also encourages collaboration between developers who are looking to help others and improve on their own work leading to innovations and developments outside large corporations tap. Finally, the copyleft license does all this while providing clear legal framework that prevents Open source resources from being used in a way that the creator disagrees with.

Learning about CopyLeft licenses has given me a far clearer understanding of the open source community and how they function as well as making me feel more excited about this assignment. However, I still believe it is still important that users of GTP-3 are able to understand as best they can how it can be used in other software. My particular contribution was to enable a chatbot to store memory of its conversation with the user. This made me realise how easy it is to manipulate the answers chatbots can give their users, as developers can include hidden prompts that are added to the user prompts, manipulating the answers the users receive. This can be used very maliciously, but is a problem that can be partially addressed by users having access to and understanding the source code of the chatbots built on GTP-3.

MontyCorp License

An imaginary license for an imaginary product, created to juxtapose the copyleft licenses, and in doing so emphasising their virtues

MontyWare is a general purpose AI for Corporations to expand and increase profit


# THE MontyWare SOFTWARE FOUNDATION LICENSE
	1	This LICENSE AGREEMENT is between the MontyCorp, and the Organization (“Licensee”) accessing and otherwise using MontyWare in source or binary form and its associated documentation.
	2	Subject to the terms and conditions of this License Agreement, MontyCorp hereby forbids Licensee any Unauthorized copying, updating, or use of MontyWare via any medium for any reason.
	3	MontyWare is, and remains, the sole property of MontyCorp.  The intellectual and technical concepts contained herein are proprietary to MontyCorp  and are covered by trade secret and copyright law. Dissemination or reproduction of this material is strictly forbidden.

## TERMS AND CONDITIONS
	1	Software may only be used by for profit corporations.
	2	All and any creations made using MontyWare to any degree are the sole property of MontyCorp.
	3	All and any profit made using MontyWare must be declared to MontyCorp and 10% should be paid directly to MontyCorp.
	4	Monthly subscription must be paid timely and in full.
	5	Any deviation from T%Cs will result in immediate termination of contract until penalty has been paid (10% of last yearly earnings or £60,000,000, whichever is greater). 
	6	Licensee agrees to defend and indemnify Licensor and hold Licensor harmless from all claims, losses, damages, complaints, or expenses connected with or resulting from Licensee's business operations.

LICENSOR IS NOT LIABLE TO LICENSEE FOR ANY DAMAGES, INCLUDING COMPENSATORY, SPECIAL, INCIDENTAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL DAMAGES, CONNECTED WITH OR RESULTING FROM THIS LICENSE AGREEMENT OR LICENSEE'S USE OF THIS SOFTWARE