Spaces:
Running
Running
Husnain
commited on
Commit
•
12125b6
1
Parent(s):
124af16
💎 [Feature] Enable gpt-3.5 in chat_api
Browse files
messagers/message_outputer.py
CHANGED
@@ -7,13 +7,13 @@ class OpenaiStreamOutputer:
|
|
7 |
* https://platform.openai.com/docs/api-reference/chat/create
|
8 |
"""
|
9 |
|
10 |
-
def __init__(self):
|
11 |
self.default_data = {
|
12 |
"created": 1700000000,
|
13 |
-
"id": "chatcmpl-
|
14 |
"object": "chat.completion.chunk",
|
15 |
# "content_type": "Completions",
|
16 |
-
"model":
|
17 |
"choices": [],
|
18 |
}
|
19 |
|
|
|
7 |
* https://platform.openai.com/docs/api-reference/chat/create
|
8 |
"""
|
9 |
|
10 |
+
def __init__(self, owned_by="huggingface", model="mixtral-8x7b"):
|
11 |
self.default_data = {
|
12 |
"created": 1700000000,
|
13 |
+
"id": f"chatcmpl-{owned_by}",
|
14 |
"object": "chat.completion.chunk",
|
15 |
# "content_type": "Completions",
|
16 |
+
"model": model,
|
17 |
"choices": [],
|
18 |
}
|
19 |
|