Do0rMaMu commited on
Commit
b6b32c9
·
verified ·
1 Parent(s): 0f93b24

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -1
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{item.system_prompt}\nuser \n{item.user_prompt}\n assistant"""
 
 
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