ysharma HF staff commited on
Commit
fc3d2ab
·
1 Parent(s): 22614d0
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -23,8 +23,13 @@ from langchain.schema import (
23
  SystemMessage
24
  )
25
 
 
 
 
 
 
26
  chat = ChatOpenAI(
27
- openai_api_key=openai_api_key,
28
  temperature=1.0,
29
  streaming=True,
30
  model='gpt-3.5-turbo-0613'
@@ -37,9 +42,6 @@ from gpt_function_definitions import generate_image, generate_caption, get_news
37
  #Streaming endpoint
38
  API_URL = "https://api.openai.com/v1/chat/completions" #os.getenv("API_URL") + "/generate_stream"
39
 
40
- # Get the value of the openai_api_key from environment variable
41
- #openai_api_key = os.getenv("OPENAI_API_KEY")
42
- openai.api_key = os.getenv("OPENAI_API_KEY")
43
 
44
 
45
  # TOOLS , FUNCTION CALLING, AND AGENTS
 
23
  SystemMessage
24
  )
25
 
26
+
27
+ # Get the value of the openai_api_key from environment variable
28
+ #openai_api_key = os.getenv("OPENAI_API_KEY")
29
+ openai.api_key = os.getenv("OPENAI_API_KEY")
30
+
31
  chat = ChatOpenAI(
32
+ #openai_api_key=openai_api_key,
33
  temperature=1.0,
34
  streaming=True,
35
  model='gpt-3.5-turbo-0613'
 
42
  #Streaming endpoint
43
  API_URL = "https://api.openai.com/v1/chat/completions" #os.getenv("API_URL") + "/generate_stream"
44
 
 
 
 
45
 
46
 
47
  # TOOLS , FUNCTION CALLING, AND AGENTS