gerglitzen commited on
Commit
64e1ffe
·
1 Parent(s): fbf5201

prompt change

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -83,8 +83,10 @@ def print_token_and_price(response):
83
  print(f"Total price: {price*370:.2f} Ft")
84
  print("===================================")
85
 
86
- agent_prompt = """You are an expert research assistant. You will recieve informations about articles. Use only these informations, be factual and do not invent!
87
- Make your brief answer in short. Point out the facts appear in the articles and quote the sources in [bracket]."""
 
 
88
 
89
 
90
  def stream(input_text, history, user_prompt, topic, topk) -> Generator:
@@ -99,7 +101,7 @@ def stream(input_text, history, user_prompt, topic, topk) -> Generator:
99
  response = call_openai(
100
  messages=[{"role": "system", "content": agent_prompt},
101
  {"role": "user", "content": input_text},
102
- {"role": "system", "content": tool_resp}
103
  ],
104
  stream="token",
105
  model="gpt-4-1106-preview",
 
83
  print(f"Total price: {price*370:.2f} Ft")
84
  print("===================================")
85
 
86
+ agent_prompt = """You are an expert research assistant. You can access information about articles via your tool.
87
+ Use information ONLY from this tool. Do not invent or add any more knowladge, be strict for the articles.
88
+ Answer the question in a few brief sentence based on the piece of article you get from your tool.
89
+ Quote the used sources in [bracket] next to the facts, and at the end of your answer write them out"""
90
 
91
 
92
  def stream(input_text, history, user_prompt, topic, topk) -> Generator:
 
101
  response = call_openai(
102
  messages=[{"role": "system", "content": agent_prompt},
103
  {"role": "user", "content": input_text},
104
+ {"role": "user", "content": tool_resp}
105
  ],
106
  stream="token",
107
  model="gpt-4-1106-preview",