asrafnoor commited on
Commit
719e38c
·
verified ·
1 Parent(s): df07e03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from fastapi import FastAPI, Request
4
  import uvicorn
5
  import json
6
 
7
- openai.api_key = "YOUR_OPENAI_API_KEY"
8
 
9
  app = FastAPI()
10
  conversation_history = []
@@ -24,7 +24,7 @@ async def chat(request: Request):
24
  messages.insert(0, {"role": "system", "content": "You are a story writer. What ever the prompt you always write a story"})
25
 
26
  completion = openai.ChatCompletion.create(
27
- model="gpt-3.5-turbo",
28
  messages=messages
29
  )
30
  reply = completion.choices[0].message.content
 
4
  import uvicorn
5
  import json
6
 
7
+ openai.api_key = "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"
8
 
9
  app = FastAPI()
10
  conversation_history = []
 
24
  messages.insert(0, {"role": "system", "content": "You are a story writer. What ever the prompt you always write a story"})
25
 
26
  completion = openai.ChatCompletion.create(
27
+ model="gpt-4",
28
  messages=messages
29
  )
30
  reply = completion.choices[0].message.content