Prabhash commited on
Commit
92b0d2a
1 Parent(s): 4058833

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -6
main.py CHANGED
@@ -20,12 +20,12 @@ app = FastAPI()
20
  #Zephyr completion
21
  @app.post("/llm_on_cpu")
22
  async def stream(item: validation):
23
- system_prompt = 'Below is an instruction that describes a task. Write a response that appropriately completes the request.'
24
  prompt = f'''
25
- <|begin_of_text|><|start_header_id|>system<|end_header_id|>
26
-
27
- {system_prompt}<|eot_id|><|start_header_id|>user<|end_header_id|>
28
-
29
- {item.prompt.strip()}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
30
  '''
 
31
  return llm(prompt)
 
20
  #Zephyr completion
21
  @app.post("/llm_on_cpu")
22
  async def stream(item: validation):
23
+ system_prompt = 'You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.'
24
  prompt = f'''
25
+ [INST] <<SYS>>
26
+ {system_prompt}
27
+ <</SYS>>
28
+ {item.prompt.strip()}[/INST]
 
29
  '''
30
+
31
  return llm(prompt)