raghavNCI
commited on
Commit
·
20238ed
1
Parent(s):
1ebfe9c
changes v3
Browse files- question.py +8 -1
question.py
CHANGED
@@ -52,7 +52,14 @@ async def ask_question(input: QuestionInput):
|
|
52 |
|
53 |
# result = client.text_generation(prompt, max_new_tokens=256, temperature=0.7)
|
54 |
|
55 |
-
result = client.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
return {
|
58 |
"question": question,
|
|
|
52 |
|
53 |
# result = client.text_generation(prompt, max_new_tokens=256, temperature=0.7)
|
54 |
|
55 |
+
result = client.conversational(
|
56 |
+
messages=[
|
57 |
+
{"role": "system", "content": "You are a helpful assistant that uses provided news context to answer questions."},
|
58 |
+
{"role": "user", "content": f"Context:\n{context}\n\nQuestion: {question}"}
|
59 |
+
],
|
60 |
+
max_new_tokens=256,
|
61 |
+
temperature=0.7
|
62 |
+
)
|
63 |
|
64 |
return {
|
65 |
"question": question,
|