Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpt / dalle / sales - just use OPENAI_API_KEY env var implicitly #145

Merged
merged 2 commits into from
Sep 11, 2023
Merged
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
3 changes: 0 additions & 3 deletions dalle/dalle/dalle.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
"""Welcome to Pynecone! This file outlines the steps to create a basic app."""
import os

import openai
import reflex as rx

openai.api_key = os.environ["OPENAI_API_KEY"]


class State(rx.State):
Expand Down
2 changes: 0 additions & 2 deletions gpt/gpt/gpt.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
"""Welcome to Reflex! This app is a demonstration of OpenAI's GPT."""
import datetime
import os

import openai
import reflex as rx

from .helpers import navbar

openai.api_key = os.environ["OPENAI_API_KEY"]
MAX_QUESTIONS = 10


Expand Down
3 changes: 0 additions & 3 deletions sales/sales/sales.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import os

import openai
import reflex as rx

from .models import Customer

openai.api_key = os.environ["OPENAI_API_KEY"]
products = {'T-shirt': { 'description': 'A plain white t-shirt made of 100% cotton.', 'price': 10.99 }, 'Jeans': { 'description': 'A pair of blue denim jeans with a straight leg fit.', 'price': 24.99 }, 'Hoodie': { 'description': 'A black hoodie made of a cotton and polyester blend.', 'price': 34.99 }, 'Cardigan': { 'description': 'A grey cardigan with a V-neck and long sleeves.', 'price': 36.99 }, 'Joggers': { 'description': 'A pair of black joggers made of a cotton and polyester blend.', 'price': 44.99 }, 'Dress': { 'description': 'A black dress made of 100% polyester.', 'price': 49.99 }, 'Jacket': { 'description': 'A navy blue jacket made of 100% cotton.', 'price': 55.99 }, 'Skirt': { 'description': 'A brown skirt made of a cotton and polyester blend.', 'price': 29.99 }, 'Shorts': { 'description': 'A pair of black shorts made of a cotton and polyester blend.', 'price': 19.99 }, 'Sweater': { 'description': 'A white sweater with a crew neck and long sleeves.', 'price': 39.99}}


Expand Down