Update main.py
Browse files
main.py
CHANGED
|
@@ -23,7 +23,7 @@ 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 in the required format
|
| 26 |
-
prompt = f"<|user|>\n{item.system_prompt}\n
|
| 27 |
|
| 28 |
# Call the Llama model to generate a response
|
| 29 |
output = llm(prompt, max_tokens=item.max_tokens, temperature=item.temperature, echo=True)
|
|
|
|
| 23 |
@app.post("/generate_response")
|
| 24 |
async def generate_response(item: Validation):
|
| 25 |
# Construct the complete prompt using the given system and user prompts in the required format
|
| 26 |
+
prompt = f"<|user|>\n{item.system_prompt}\n {item.user_prompt}\n<|end|>\n<|assistant|>"
|
| 27 |
|
| 28 |
# Call the Llama model to generate a response
|
| 29 |
output = llm(prompt, max_tokens=item.max_tokens, temperature=item.temperature, echo=True)
|