Spaces:
Paused
Paused
matt HOFFNER
commited on
Commit
•
8b67d79
1
Parent(s):
1884418
python 101
Browse files
main.py
CHANGED
@@ -131,8 +131,9 @@ system_message = "Below is a conversation between a human user and a helpful AI
|
|
131 |
|
132 |
@app.post("/v1/chat/completions")
|
133 |
async def chat(request: ChatCompletionRequest, response_mode=None):
|
|
|
134 |
dialogue_template = DialogueTemplate(
|
135 |
-
system=system_message, messages=
|
136 |
)
|
137 |
prompt = dialogue_template.get_inference_prompt()
|
138 |
tokens = llm.tokenize(prompt)
|
|
|
131 |
|
132 |
@app.post("/v1/chat/completions")
|
133 |
async def chat(request: ChatCompletionRequest, response_mode=None):
|
134 |
+
kwargs = request.dict()
|
135 |
dialogue_template = DialogueTemplate(
|
136 |
+
system=system_message, messages=kwargs['messages']
|
137 |
)
|
138 |
prompt = dialogue_template.get_inference_prompt()
|
139 |
tokens = llm.tokenize(prompt)
|