env vars testing

This commit is contained in:
2026-01-04 05:36:35 -06:00
parent 34f34e3def
commit 4ddcd2b374
6 changed files with 24 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
import io
import os
import openai
import config
import aiohttp
import asyncio
import discord
@@ -11,9 +11,9 @@ from garfpy import logger
class GarfAI:
def __init__(self):
self.openaikey = config.OPENAI_TOKEN
self.txtmodel = config.TXT_MODEL
self.imgmodel = config.IMG_MODEL
self.openaikey = os.getenv('OPENAI_TOKEN')
self.txtmodel = os.getenv('TXT_MODEL')
self.imgmodel = os.getenv('IMG_MODEL')
self.image_request_queue = asyncio.Queue()
async def garfpic(self, ctx, prompt):
@@ -82,7 +82,7 @@ class GarfAI:
try:
client = AsyncOpenAI(api_key=self.openaikey)
response = await client.chat.completions.create(
model=self.txtmodel,
model=self.txtmodel, # type: ignore
messages=[
{
"role": "system",