Arkm20 commited on
Commit
47c9406
·
verified ·
1 Parent(s): d4ab09c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -39,10 +39,9 @@ def get_web_context(prompt: str) -> dict:
39
 
40
  @app.post("/api/search")
41
  async def search(q: Query):
42
- web_data = get_web_context(q.query)
43
  messages = [
44
  {"role": "system", "content": "You are a helpful search assistant that reads from the following web sources to answer user questions."},
45
- {"role": "user", "content": f"{q.query}\n\nHere is some context:\n{web_data}"}
46
  ]
47
  try:
48
  response = client.chat.completions.create(
 
39
 
40
  @app.post("/api/search")
41
  async def search(q: Query):
 
42
  messages = [
43
  {"role": "system", "content": "You are a helpful search assistant that reads from the following web sources to answer user questions."},
44
+ {"role": "user", "content": f"{q.query}"}
45
  ]
46
  try:
47
  response = client.chat.completions.create(