write the app.py and upload data
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import os
|
|
9 |
|
10 |
openai.api_key = os.getenv('API_KEY')
|
11 |
|
12 |
-
timezone = datetime.
|
13 |
timestamp2string = lambda timestamp: datetime.datetime.fromtimestamp(timestamp).replace(tzinfo=timezone).strftime('%Y-%m-%d %H:%M:%S')
|
14 |
|
15 |
def num_tokens_from_messages(messages, model="gpt-3.5-turbo"):
|
|
|
9 |
|
10 |
openai.api_key = os.getenv('API_KEY')
|
11 |
|
12 |
+
timezone = datetime.timezone.gettz('Asia/Shanghai')
|
13 |
timestamp2string = lambda timestamp: datetime.datetime.fromtimestamp(timestamp).replace(tzinfo=timezone).strftime('%Y-%m-%d %H:%M:%S')
|
14 |
|
15 |
def num_tokens_from_messages(messages, model="gpt-3.5-turbo"):
|