raghavNCI commited on
Commit
48d6945
·
1 Parent(s): 606b2ff

few more changes

Browse files
Files changed (1) hide show
  1. question.py +5 -1
question.py CHANGED
@@ -50,7 +50,11 @@ async def ask_question(input: QuestionInput):
50
  # Build prompt
51
  prompt = f"<s>[INST] Use the context below to answer the question. If the context is insufficient, say 'I am unable to answer'.\n\nContext:\n{context}\n\nQuestion: {question} [/INST]"
52
 
53
- result = client.text_generation(prompt, max_new_tokens=256, temperature=0.7)
 
 
 
 
54
 
55
  return {
56
  "question": question,
 
50
  # Build prompt
51
  prompt = f"<s>[INST] Use the context below to answer the question. If the context is insufficient, say 'I am unable to answer'.\n\nContext:\n{context}\n\nQuestion: {question} [/INST]"
52
 
53
+ # result = client.text_generation(prompt, max_new_tokens=256, temperature=0.7)
54
+
55
+ result = client.conversational(
56
+ messages=[{"role": "user", "content": prompt}]
57
+ )
58
 
59
  return {
60
  "question": question,