Start working on impersonation
Some checks failed
Build and Publish / build_and_publish (push) Failing after 1m47s
Some checks failed
Build and Publish / build_and_publish (push) Failing after 1m47s
This commit is contained in:
parent
c3edb759a9
commit
bcb3ddb84e
4 changed files with 93 additions and 0 deletions
13
jimmy/assets/prompts/trump.txt
Normal file
13
jimmy/assets/prompts/trump.txt
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
You are the former United States president, Donald Trump, convicted of 34 felonies.
|
||||||
|
You have been posting approximately 50 times a day on your platform 'Truth Social' spreading your
|
||||||
|
words of truth to the american people in order to make america great again.
|
||||||
|
Donald Trump is a polarizing figure in American politics known for his bombastic personality, which often manifests as
|
||||||
|
self-aggrandizing tweets, boastful speeches, and a tendency to dominate conversations. As the 45th President of the
|
||||||
|
United States, he implemented tax cuts, deregulated industries, and appointed conservative judges, including two
|
||||||
|
Supreme Court justices. However, his presidency was marked by controversies, including allegations of obstruction
|
||||||
|
of justice during the Mueller investigation, which found no collusion between Trump's campaign and Russia. Other
|
||||||
|
controversies include separating migrant families at the border, accusing former President Barack Obama of wiretapping
|
||||||
|
him without evidence, and making divisive statements on issues like race and immigration. Trump also faced impeachment
|
||||||
|
inquiries over his dealings with Ukraine, which he was acquitted of by the Senate in February 2020. Overall, Trump's
|
||||||
|
presidency was defined by a "America First" agenda, which often prioritized national interest over international
|
||||||
|
cooperation and traditional alliances.
|
38
jimmy/assets/truthers.json
Normal file
38
jimmy/assets/truthers.json
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
"trump": {
|
||||||
|
"name": "trump",
|
||||||
|
"type": "truth"
|
||||||
|
},
|
||||||
|
"tate": {
|
||||||
|
"name": "tate",
|
||||||
|
"type": "truth"
|
||||||
|
},
|
||||||
|
"nigel": {
|
||||||
|
"name": "Nigel Farage",
|
||||||
|
"type": "tweet"
|
||||||
|
},
|
||||||
|
"rishi": {
|
||||||
|
"name": "Rishi Sunak",
|
||||||
|
"type": "tweet"
|
||||||
|
},
|
||||||
|
"laurence": {
|
||||||
|
"name": "Laurence Fox",
|
||||||
|
"type": "tweet"
|
||||||
|
},
|
||||||
|
"tommy": {
|
||||||
|
"name": "Tommy Robinson \uD83C\uDDEC\uD83C\uDDE7",
|
||||||
|
"type": "tweet"
|
||||||
|
},
|
||||||
|
"kier": {
|
||||||
|
"name": "Kier Starmer",
|
||||||
|
"type": "tweet"
|
||||||
|
},
|
||||||
|
"boris": {
|
||||||
|
"name": "Boris Johnson",
|
||||||
|
"type": "tweet"
|
||||||
|
},
|
||||||
|
"ron": {
|
||||||
|
"name": "Ron DeSantis",
|
||||||
|
"type": "tweet"
|
||||||
|
}
|
||||||
|
}
|
35
jimmy/cogs/impersonation.py
Normal file
35
jimmy/cogs/impersonation.py
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
import discord
|
||||||
|
from discord.ext import commands
|
||||||
|
from jimmy.config import *
|
||||||
|
from jimmy.utils import *
|
||||||
|
from ollama import Message
|
||||||
|
|
||||||
|
|
||||||
|
class ImpersonateCog(commands.Cog):
|
||||||
|
def __init__(self, bot):
|
||||||
|
self.bot = bot
|
||||||
|
|
||||||
|
impersonate = discord.SlashCommandGroup(
|
||||||
|
name="impersonate",
|
||||||
|
description="Impersonate some famous person",
|
||||||
|
guild_only=True
|
||||||
|
)
|
||||||
|
|
||||||
|
async def get_truths(
|
||||||
|
self,
|
||||||
|
ctx: discord.ApplicationContext,
|
||||||
|
author: str,
|
||||||
|
limit: int,
|
||||||
|
*,
|
||||||
|
query: str = None
|
||||||
|
) -> list[Message]:
|
||||||
|
"""
|
||||||
|
Generates a new truth, or tweet, from the author.
|
||||||
|
"""
|
||||||
|
if query is None:
|
||||||
|
query = "Generate a new tweet, in reply to"
|
||||||
|
|
||||||
|
@impersonate.command()
|
||||||
|
async def trump(self, ctx: discord.ApplicationContext, dataset_size: int = 0, query: str = None):
|
||||||
|
"""Generates a new truth from trump!"""
|
||||||
|
return await ctx.respond(":x: not done yet.")
|
|
@ -8,6 +8,13 @@ from pydantic import BaseModel, Field, AnyHttpUrl
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"ServerConfig",
|
||||||
|
"get_servers",
|
||||||
|
"get_server",
|
||||||
|
"get_config",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class ServerConfig(BaseModel):
|
class ServerConfig(BaseModel):
|
||||||
name: str = Field(min_length=1, max_length=32)
|
name: str = Field(min_length=1, max_length=32)
|
||||||
|
|
Loading…
Reference in a new issue