tlsgy
commited on
Commit
ยท
86ff4b2
1
Parent(s):
45f358a
dd
Browse files
app.py
CHANGED
|
@@ -55,9 +55,8 @@ def get_json_file(docs):
|
|
| 55 |
temp_filepath = os.path.join(temp_dir.name, docs.name) # ์์ ํ์ผ ๊ฒฝ๋ก๋ฅผ ์์ฑํฉ๋๋ค.
|
| 56 |
with open(temp_filepath, "wb") as f: # ์์ ํ์ผ์ ๋ฐ์ด๋๋ฆฌ ์ฐ๊ธฐ ๋ชจ๋๋ก ์ฝ๋๋ค.
|
| 57 |
f.write(docs.getvalue())
|
| 58 |
-
|
| 59 |
loader = JSONLoader(file_path=temp_filepath,
|
| 60 |
-
jq_schema='.messages
|
| 61 |
text_content=False)
|
| 62 |
data = loader.load()
|
| 63 |
|
|
|
|
| 55 |
temp_filepath = os.path.join(temp_dir.name, docs.name) # ์์ ํ์ผ ๊ฒฝ๋ก๋ฅผ ์์ฑํฉ๋๋ค.
|
| 56 |
with open(temp_filepath, "wb") as f: # ์์ ํ์ผ์ ๋ฐ์ด๋๋ฆฌ ์ฐ๊ธฐ ๋ชจ๋๋ก ์ฝ๋๋ค.
|
| 57 |
f.write(docs.getvalue())
|
|
|
|
| 58 |
loader = JSONLoader(file_path=temp_filepath,
|
| 59 |
+
jq_schema='.messages[].content',
|
| 60 |
text_content=False)
|
| 61 |
data = loader.load()
|
| 62 |
|