Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cogs/aistuff.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
class AiStuff(commands.Cog, name="aistuff"):
def __init__(self, bot):
self.bot = bot
openai.api_key = config["openapi_token"]
self.client = openai.OpenAI(api_key=config["openapi_token"])
openai.api_key = config["openai_token"]
self.client = openai.OpenAI(api_key=config["openai_token"])

@nextcord.slash_command(name="dalle", description="Create a DALL-E 3 image.")
async def dalle(
Expand Down Expand Up @@ -384,7 +384,7 @@ async def newapod(
messages=[
{
"role": "system",
"content": "Your goal is to take this NASA APOD description and create a title. You should only respond with 1-5 words as a title to this. Do not respond with anything else. Just the title based on the content. Please also do not include quotes around the whole title.",
"content": "Your goal is to take this NASA APOD description and create a title. You should only respond with 1-5 words as a title to this. Do not respond with anything more than the title.",
},
{
"role": "user",
Expand Down
4 changes: 2 additions & 2 deletions cogs/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
class Chat(commands.Cog, name="chat"):
def __init__(self, bot):
self.bot = bot
openai.api_key = config["openapi_token"]
self.client = openai.OpenAI(api_key=config["openapi_token"])
openai.api_key = config["openai_token"]
self.client = openai.OpenAI(api_key=config["openai_token"])

@nextcord.slash_command(name="chat", description="Chat with Dad")
async def chat(
Expand Down
2 changes: 1 addition & 1 deletion cogs/tldr.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class TLDR(commands.Cog, name="tldr"):
def __init__(self, bot):
self.bot = bot
self.client = openai.OpenAI(api_key=config["openapi_token"])
self.client = openai.OpenAI(api_key=config["openai_token"])

@nextcord.slash_command(
name="tldrchannel",
Expand Down
2 changes: 1 addition & 1 deletion config template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ info: 0x4299F5
maps_api_key: "MAPS_API_KEY"
imgflip_pass: "IMGFLIP_PASSWORD"
pipeline_token: "PIPELINE_TOKEN"
openapi_token: "OPENAPI_TOKEN"
openai_token: "OPENAPI_TOKEN"
2 changes: 1 addition & 1 deletion noncommands/dadroid.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def create_chat_completion(
) -> dict:
"""Creates a chat completion using OpenAI's API."""

client = OpenAI(api_key=config["openapi_token"])
client = OpenAI(api_key=config["openai_token"])

if beef:
model = "gpt-4o-mini"
Expand Down
2 changes: 1 addition & 1 deletion noncommands/summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ def getSummaryText(config, text):
inline = False
)

return embed
return embed