Spaces:
Runtime error
Runtime error
Update apis/chat_api.py
Browse files- apis/chat_api.py +18 -5
apis/chat_api.py
CHANGED
|
@@ -185,11 +185,24 @@ class ChatAPIApp:
|
|
| 185 |
include_in_schema=include_in_schema,
|
| 186 |
)(self.chat_completions)
|
| 187 |
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
self.app.get(
|
| 194 |
"/readme",
|
| 195 |
summary="README of HF LLM API",
|
|
|
|
| 185 |
include_in_schema=include_in_schema,
|
| 186 |
)(self.chat_completions)
|
| 187 |
|
| 188 |
+
self.app.post(
|
| 189 |
+
prefix + "/generate",
|
| 190 |
+
summary="Chat completions in conversation session",
|
| 191 |
+
include_in_schema=include_in_schema,
|
| 192 |
+
)(self.chat_completions)
|
| 193 |
+
|
| 194 |
+
self.app.post(
|
| 195 |
+
prefix + "/chat",
|
| 196 |
+
summary="Chat completions in conversation session",
|
| 197 |
+
include_in_schema=include_in_schema,
|
| 198 |
+
)(self.chat_completions)
|
| 199 |
+
|
| 200 |
+
self.app.post(
|
| 201 |
+
"/embeddings",
|
| 202 |
+
summary="Get Embeddings with prompt",
|
| 203 |
+
include_in_schema=True,
|
| 204 |
+
)(self.get_embeddings)
|
| 205 |
+
|
| 206 |
self.app.get(
|
| 207 |
"/readme",
|
| 208 |
summary="README of HF LLM API",
|