jgrivolla commited on
Commit
99162ec
·
verified ·
1 Parent(s): 1931acc

Update rag.py

Browse files
Files changed (1) hide show
  1. rag.py +4 -2
rag.py CHANGED
@@ -42,8 +42,10 @@ class RAG:
42
  api_key=os.getenv("HF_TOKEN")
43
  )
44
 
45
- query = f"Context:\n{context}\n\nQuestion:\n{instruction}"
46
- #sys_prompt = "You are a helpful assistant. Answer the question using only the context you are provided with. If it is not possible to do it with the context, just say 'I can't answer'. <|endoftext|>"
 
 
47
  chat_completion = client.chat.completions.create(
48
  model="tgi",
49
  messages=[
 
42
  api_key=os.getenv("HF_TOKEN")
43
  )
44
 
45
+ sys_prompt = "You are a helpful assistant. Answer the question using only the context you are provided with. If it is not possible to do it with the context, just say 'I can't answer'. <|endoftext|>"
46
+ #query = f"Context:\n{context}\n\nQuestion:\n{instruction}"
47
+ query = f"{sys_prompt}\n\nContext:\n{context}\n\nQuestion:\n{instruction}"
48
+ #query = f"{sys_prompt}\n\nQuestion:\n{instruction}\n\nContext:\n{context}"
49
  chat_completion = client.chat.completions.create(
50
  model="tgi",
51
  messages=[