psyche commited on
Commit
be22468
·
verified ·
1 Parent(s): d9f674b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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: