Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
|
@@ -96,7 +96,7 @@ def generate(
|
|
| 96 |
include_metadata=True
|
| 97 |
)
|
| 98 |
|
| 99 |
-
conversation.append({"role": "user", "content": results["matches"][0]["metadata"]+f"\n\n위 문맥을 참고하여 질문 '{message}'에 답하면?"})
|
| 100 |
|
| 101 |
input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt", add_generation_prompt=True)
|
| 102 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|
|
|
|
| 96 |
include_metadata=True
|
| 97 |
)
|
| 98 |
|
| 99 |
+
conversation.append({"role": "user", "content": results["matches"][0]["metadata"]["text"]+f"\n\n위 문맥을 참고하여 질문 '{message}'에 답하면?"})
|
| 100 |
|
| 101 |
input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt", add_generation_prompt=True)
|
| 102 |
if input_ids.shape[1] > MAX_INPUT_TOKEN_LENGTH:
|