Arafath10 commited on
Commit
6f1cb7d
·
verified ·
1 Parent(s): 2c2b474

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -14,7 +14,7 @@ app = FastAPI()
14
  def streaming(userText,idf):
15
 
16
  if str(idf)=="1":
17
- openaikey = "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"
18
  openai.api_key = openaikey
19
  print(idf)
20
 
@@ -85,7 +85,7 @@ def streaming(userText,idf):
85
 
86
  for chunk in response:
87
  try:
88
- print(chunk.choices[0].delta.content)
89
  yield chunk.choices[0].delta.content
90
  except:
91
  yield ""
 
14
  def streaming(userText,idf):
15
 
16
  if str(idf)=="1":
17
+ openaikey = api_key
18
  openai.api_key = openaikey
19
  print(idf)
20
 
 
85
 
86
  for chunk in response:
87
  try:
88
+ #print(chunk.choices[0].delta.content)
89
  yield chunk.choices[0].delta.content
90
  except:
91
  yield ""