Spaces:
Build error
Build error
Update main.py
Browse files
main.py
CHANGED
@@ -23,7 +23,9 @@ app = FastAPI()
|
|
23 |
@app.post("/generate_response")
|
24 |
async def generate_response(item: Validation):
|
25 |
# Construct the complete prompt using the given system and user prompts
|
26 |
-
prompt = f"""system \n
|
|
|
|
|
27 |
|
28 |
# Call the Llama model to generate a response
|
29 |
output = llm(prompt, echo=True) # Update parameters as needed
|
|
|
23 |
@app.post("/generate_response")
|
24 |
async def generate_response(item: Validation):
|
25 |
# Construct the complete prompt using the given system and user prompts
|
26 |
+
prompt = f"""<|begin_of_text|><|start_header_id|>system<|end_header_id|> \n
|
27 |
+
{ item.system_prompt }<|eot_id|> \n <|start_header_id|>user<|end_header_id|>
|
28 |
+
{ item.user_prompt }<|eot_id|> \n <|start_header_id|>assistant<|end_header_id|>"""
|
29 |
|
30 |
# Call the Llama model to generate a response
|
31 |
output = llm(prompt, echo=True) # Update parameters as needed
|