Update handler.py
Browse files- handler.py +4 -2
handler.py
CHANGED
|
@@ -33,8 +33,10 @@ class EndpointHandler():
|
|
| 33 |
"""
|
| 34 |
print(data)
|
| 35 |
try:
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
| 38 |
messages = generate_rag_prompt_message(context, question)
|
| 39 |
|
| 40 |
inputs = self.tokenizer(
|
|
|
|
| 33 |
"""
|
| 34 |
print(data)
|
| 35 |
try:
|
| 36 |
+
inputs = data.pop("inputs",None)
|
| 37 |
+
context = inputs["context"]
|
| 38 |
+
question = inputs["question"]
|
| 39 |
+
|
| 40 |
messages = generate_rag_prompt_message(context, question)
|
| 41 |
|
| 42 |
inputs = self.tokenizer(
|