Skip to content

Commit

Permalink
Merge pull request #145 from reflex-dev/jackie-openai-env
Browse files Browse the repository at this point in the history
gpt / dalle / sales - just use OPENAI_API_KEY env var implicitly
  • Loading branch information
masenf authored Sep 11, 2023
2 parents d3a3f8b + 09fe55c commit 28baa68
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
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

0 comments on commit 28baa68

Please sign in to comment.