initial commit
Browse files- app.py +1 -1
- facebook_chat.json +41 -44
app.py
CHANGED
@@ -53,7 +53,7 @@ def get_json_file(json_docs):
|
|
53 |
with open(temp_filepath, "wb") as f:
|
54 |
f.write(json_docs.getvalue())
|
55 |
json_loader = JSONLoader(
|
56 |
-
file_path=
|
57 |
jq_schema='.messages[].content',
|
58 |
text_content=False
|
59 |
)
|
|
|
53 |
with open(temp_filepath, "wb") as f:
|
54 |
f.write(json_docs.getvalue())
|
55 |
json_loader = JSONLoader(
|
56 |
+
file_path=temp_filepath,
|
57 |
jq_schema='.messages[].content',
|
58 |
text_content=False
|
59 |
)
|
facebook_chat.json
CHANGED
@@ -1,44 +1,41 @@
|
|
1 |
-
{
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
{
|
9 |
-
|
10 |
-
|
11 |
-
{
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
'participants': [{'name': 'User 1'}, {'name': 'User 2'}],
|
43 |
-
'thread_path': 'inbox/User 1 and User 2 chat',
|
44 |
-
'title': 'User 1 and User 2 chat'}
|
|
|
1 |
+
{"image": {"creation_timestamp": 1675549016, "uri": "image_of_the_chat.jpg"},
|
2 |
+
"is_still_participant": "True",
|
3 |
+
"joinable_mode": {"link": "", "mode": 1},
|
4 |
+
"magic_words": [],
|
5 |
+
"messages": [{"content": "Bye!",
|
6 |
+
"sender_name": "User 2",
|
7 |
+
"timestamp_ms": 1675597571851},
|
8 |
+
{"content": "Oh no worries! Bye",
|
9 |
+
"sender_name": "User 1",
|
10 |
+
"timestamp_ms": 1675597435669},
|
11 |
+
{"content": "No Im sorry it was my mistake, the blue one is not for sale",
|
12 |
+
"sender_name": "User 2",
|
13 |
+
"timestamp_ms": 1675596277579},
|
14 |
+
{"content": "I thought you were selling the blue one!",
|
15 |
+
"sender_name": "User 1",
|
16 |
+
"timestamp_ms": 1675595140251},
|
17 |
+
{"content": "Im not interested in this bag. Im interested in the blue one!",
|
18 |
+
"sender_name": "User 1",
|
19 |
+
"timestamp_ms": 1675595109305},
|
20 |
+
{"content": "Here is $129",
|
21 |
+
"sender_name": "User 2",
|
22 |
+
"timestamp_ms": 1675595068468},
|
23 |
+
{"photos": [{"creation_timestamp": 1675595059,
|
24 |
+
"uri": "url_of_some_picture.jpg"}],
|
25 |
+
"sender_name": "User 2",
|
26 |
+
"timestamp_ms": 1675595060730},
|
27 |
+
{"content": "Online is at least $100",
|
28 |
+
"sender_name": "User 2",
|
29 |
+
"timestamp_ms": 1675595045152},
|
30 |
+
{"content": "How much do you want?",
|
31 |
+
"sender_name": "User 1",
|
32 |
+
"timestamp_ms": 1675594799696},
|
33 |
+
{"content": "Goodmorning! $50 is too low.",
|
34 |
+
"sender_name": "User 2",
|
35 |
+
"timestamp_ms": 1675577876645},
|
36 |
+
{"content": "Hi! Im interested in your bag. Im offering $50. Let me know if you are interested. Thanks!",
|
37 |
+
"sender_name": "User 1",
|
38 |
+
"timestamp_ms": 1675549022673}],
|
39 |
+
"participants": [{"name": "User 1"}, {"name": "User 2"}],
|
40 |
+
"thread_path": "inbox/User 1 and User 2 chat",
|
41 |
+
"title": "User 1 and User 2 chat"}
|
|
|
|
|
|