{user_name}
commited on
Commit
·
af7ec81
1
Parent(s):
0306abc
찾은 문서의 결과를 대답에 첨부하기
Browse files- __pycache__/rag.cpython-38.pyc +0 -0
- app.py +3 -2
__pycache__/rag.cpython-38.pyc
ADDED
Binary file (1.54 kB). View file
|
|
app.py
CHANGED
@@ -11,7 +11,7 @@ client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
|
11 |
|
12 |
def respond(
|
13 |
message,
|
14 |
-
history: list[tuple[str, str]],
|
15 |
system_message,
|
16 |
max_tokens,
|
17 |
temperature,
|
@@ -25,9 +25,10 @@ def respond(
|
|
25 |
if val[1]:
|
26 |
messages.append({"role": "assistant", "content": val[1]})
|
27 |
|
|
|
28 |
messages.append({"role": "user", "content": message})
|
29 |
|
30 |
-
response = ""
|
31 |
for message in client.chat_completion(
|
32 |
messages,
|
33 |
max_tokens=max_tokens,
|
|
|
11 |
|
12 |
def respond(
|
13 |
message,
|
14 |
+
history: 'list[tuple[str, str]]',
|
15 |
system_message,
|
16 |
max_tokens,
|
17 |
temperature,
|
|
|
25 |
if val[1]:
|
26 |
messages.append({"role": "assistant", "content": val[1]})
|
27 |
|
28 |
+
document = "" + rag.SearchDocs(message, k=4)
|
29 |
messages.append({"role": "user", "content": message})
|
30 |
|
31 |
+
response = document#""
|
32 |
for message in client.chat_completion(
|
33 |
messages,
|
34 |
max_tokens=max_tokens,
|