Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,13 @@ import os
|
|
| 6 |
api_key = os.environ.get('SECRET_TOKEN')
|
| 7 |
|
| 8 |
# Initialize the OpenAI client with your API key
|
| 9 |
-
client = openai.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# Store conversation history
|
| 12 |
conversation_history = []
|
|
|
|
| 6 |
api_key = os.environ.get('SECRET_TOKEN')
|
| 7 |
|
| 8 |
# Initialize the OpenAI client with your API key
|
| 9 |
+
client = openai.ChatCompletion.create(
|
| 10 |
+
api_key=api_key,
|
| 11 |
+
model="gpt-3.5-turbo-16k",
|
| 12 |
+
messages=conversation_history,
|
| 13 |
+
max_tokens=350,
|
| 14 |
+
stop="<break character>"
|
| 15 |
+
)
|
| 16 |
|
| 17 |
# Store conversation history
|
| 18 |
conversation_history = []
|