Spaces:
Sleeping
Sleeping
Update pages/Chat_Mode.py
Browse files- pages/Chat_Mode.py +2 -2
pages/Chat_Mode.py
CHANGED
@@ -119,7 +119,7 @@ if prompt := st.chat_input("Type some text here!"):
|
|
119 |
|
120 |
created = response["created"]
|
121 |
model = response["model"]
|
122 |
-
|
123 |
completion_tokens = response["usage"]["completion_tokens"]
|
124 |
prompt_tokens = response["usage"]["prompt_tokens"]
|
125 |
total_tokens = response["usage"]["total_tokens"]
|
@@ -128,7 +128,7 @@ if prompt := st.chat_input("Type some text here!"):
|
|
128 |
|
129 |
# Insert data into the table
|
130 |
insert_data_query = """
|
131 |
-
INSERT INTO chatbot3 (id, finish_reason, index_value, logprobs, text_line1, text_line2, created, model,
|
132 |
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);
|
133 |
"""
|
134 |
cursor.execute(insert_data_query, (id_value, finish_reason, index_value, logprobs, text_line1, text_line2, created, model, object_value, completion_tokens, prompt_tokens, total_tokens))
|
|
|
119 |
|
120 |
created = response["created"]
|
121 |
model = response["model"]
|
122 |
+
object = response["object"]
|
123 |
completion_tokens = response["usage"]["completion_tokens"]
|
124 |
prompt_tokens = response["usage"]["prompt_tokens"]
|
125 |
total_tokens = response["usage"]["total_tokens"]
|
|
|
128 |
|
129 |
# Insert data into the table
|
130 |
insert_data_query = """
|
131 |
+
INSERT INTO chatbot3 (id, finish_reason, index_value, logprobs, text_line1, text_line2, created, model, object, completion_tokens, prompt_tokens, total_tokens)
|
132 |
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);
|
133 |
"""
|
134 |
cursor.execute(insert_data_query, (id_value, finish_reason, index_value, logprobs, text_line1, text_line2, created, model, object_value, completion_tokens, prompt_tokens, total_tokens))
|