Spaces:
Build error
Build error
Update main.py
Browse files
main.py
CHANGED
@@ -19,5 +19,5 @@ app = FastAPI()
|
|
19 |
# Endpoint for generating responses
|
20 |
@app.post("/generate_response")
|
21 |
async def generate_response(item: Validation):
|
22 |
-
prompt = f"<|start_header_id|>system<|end_header_id|> \n {item.system_prompt}<|eot_id|> \n <|start_header_id|>user<|end_header_id|>{item.user_prompt} <|eot_id|><|start_header_id|>
|
23 |
return llm.generate(prompt, do_sample=True) # Adjusted to include the generation method with do_sample if needed
|
|
|
19 |
# Endpoint for generating responses
|
20 |
@app.post("/generate_response")
|
21 |
async def generate_response(item: Validation):
|
22 |
+
prompt = f"<|start_header_id|>system<|end_header_id|> \n {item.system_prompt}<|eot_id|> \n <|start_header_id|>user<|end_header_id|>{item.user_prompt} <|eot_id|><|start_header_id|>assistant<|end_header_id|>"
|
23 |
return llm.generate(prompt, do_sample=True) # Adjusted to include the generation method with do_sample if needed
|