Update apis/chat_api.py
Browse files- apis/chat_api.py +3 -3
apis/chat_api.py
CHANGED
@@ -17,7 +17,6 @@ from mocks.stream_chat_mocker import stream_chat_mock
|
|
17 |
|
18 |
class ChatAPIApp:
|
19 |
def __init__(self):
|
20 |
-
current_time = int(time.time())
|
21 |
self.app = FastAPI(
|
22 |
docs_url="/",
|
23 |
title="HuggingFace LLM API",
|
@@ -29,6 +28,7 @@ class ChatAPIApp:
|
|
29 |
def get_available_models(self):
|
30 |
# https://platform.openai.com/docs/api-reference/models/list
|
31 |
# ANCHOR[id=available-models]: Available models
|
|
|
32 |
self.available_models = {
|
33 |
"object": "list",
|
34 |
"data": [
|
@@ -36,14 +36,14 @@ class ChatAPIApp:
|
|
36 |
"id": "mixtral-8x7b",
|
37 |
"description": "[mistralai/Mixtral-8x7B-Instruct-v0.1]: https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1",
|
38 |
"object": "model",
|
39 |
-
"created":
|
40 |
"owned_by": "mistralai",
|
41 |
},
|
42 |
{
|
43 |
"id": "mistral-7b",
|
44 |
"description": "[mistralai/Mistral-7B-Instruct-v0.2]: https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2",
|
45 |
"object": "model",
|
46 |
-
"created":
|
47 |
"owned_by": "mistralai",
|
48 |
},
|
49 |
],
|
|
|
17 |
|
18 |
class ChatAPIApp:
|
19 |
def __init__(self):
|
|
|
20 |
self.app = FastAPI(
|
21 |
docs_url="/",
|
22 |
title="HuggingFace LLM API",
|
|
|
28 |
def get_available_models(self):
|
29 |
# https://platform.openai.com/docs/api-reference/models/list
|
30 |
# ANCHOR[id=available-models]: Available models
|
31 |
+
current_time = int(time.time())
|
32 |
self.available_models = {
|
33 |
"object": "list",
|
34 |
"data": [
|
|
|
36 |
"id": "mixtral-8x7b",
|
37 |
"description": "[mistralai/Mixtral-8x7B-Instruct-v0.1]: https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1",
|
38 |
"object": "model",
|
39 |
+
"created": current_time,
|
40 |
"owned_by": "mistralai",
|
41 |
},
|
42 |
{
|
43 |
"id": "mistral-7b",
|
44 |
"description": "[mistralai/Mistral-7B-Instruct-v0.2]: https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2",
|
45 |
"object": "model",
|
46 |
+
"created": current_time,
|
47 |
"owned_by": "mistralai",
|
48 |
},
|
49 |
],
|