imagetoimage / trial.py
manichandrareddy
πŸš€ Updated app with Brain Layer + HuggingFace model improvements
d3a3bf1
raw
history blame contribute delete
429 Bytes
# test_openai.py
import os
from openai import OpenAI
from dotenv import load_dotenv
load_dotenv()
# Set your API key directly or use an environment variable
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
# Simple test: ask ChatGPT something basic
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Say hello"}],
)
print(response.choices[0].message.content)