Pecximenes commited on
Commit
94e320d
β€’
1 Parent(s): 3d48dfc

Removing diretory and organazing files

Browse files
agente/.env-example β†’ .env-example RENAMED
File without changes
Dockerfile CHANGED
@@ -5,7 +5,7 @@ WORKDIR ${APP_HOME}
5
 
6
  COPY requirements.txt ./
7
 
8
- COPY ./agente ./
9
 
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
 
5
 
6
  COPY requirements.txt ./
7
 
8
+ COPY ./ ./
9
 
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
{agente/WORKDIR β†’ WORKDIR}/.gitkeep RENAMED
File without changes
agente/__init__.py β†’ __init__.py RENAMED
File without changes
agente/agent.py β†’ agent.py RENAMED
File without changes
agente/README.md DELETED
@@ -1,6 +0,0 @@
1
-
2
- Para testar prototipo
3
-
4
- ```
5
- streamlit run interface/main.py
6
- ```
 
 
 
 
 
 
 
edgedb/dbschema/initial.esdl DELETED
@@ -1,36 +0,0 @@
1
- module default {
2
- type Image {
3
- name: str;
4
- path: str;
5
- url: str;
6
- hyperlink: str;
7
- alt: str;
8
- }
9
-
10
- type Video {
11
- name: str;
12
- url: str;
13
- hyperlink: str;
14
- alt: str;
15
- }
16
-
17
- type Text {
18
- content: str;
19
- }
20
-
21
- type Website {
22
- url: str;
23
- relative_path: str;
24
- hyperrefs: array<str>;
25
- multi images: Image;
26
- multi videos: Video;
27
- text: Text;
28
- segmented_texts: array<str>;
29
- }
30
-
31
- type Pattern {
32
- content: str;
33
- parent_id: uuid;
34
- url: str;
35
- }
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
edgedb/dbschema/migrations/00001-m14hvdp.edgeql DELETED
@@ -1,29 +0,0 @@
1
- CREATE MIGRATION m14hvdpwu2t2cxnf75otbhvkltgiwr5hqx7fh74t7rzysjw6fy34oa
2
- ONTO initial
3
- {
4
- CREATE TYPE default::Image {
5
- CREATE PROPERTY alt: std::str;
6
- CREATE PROPERTY hyperlink: std::str;
7
- CREATE PROPERTY name: std::str;
8
- CREATE PROPERTY path: std::str;
9
- CREATE PROPERTY url: std::str;
10
- };
11
- CREATE TYPE default::Text {
12
- CREATE PROPERTY content: std::str;
13
- };
14
- CREATE TYPE default::Video {
15
- CREATE PROPERTY alt: std::str;
16
- CREATE PROPERTY hyperlink: std::str;
17
- CREATE PROPERTY name: std::str;
18
- CREATE PROPERTY url: std::str;
19
- };
20
- CREATE TYPE default::Website {
21
- CREATE MULTI LINK images: default::Image;
22
- CREATE LINK text: default::Text;
23
- CREATE MULTI LINK videos: default::Video;
24
- CREATE PROPERTY hyperrefs: array<std::str>;
25
- CREATE PROPERTY relative_path: std::str;
26
- CREATE PROPERTY segmented_texts: array<std::str>;
27
- CREATE PROPERTY url: std::str;
28
- };
29
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
edgedb/dbschema/migrations/00002-m1dsfjl.edgeql DELETED
@@ -1,9 +0,0 @@
1
- CREATE MIGRATION m1dsfjlp6m7m6zym3olrmjirgmulk4m4vk2er7x22ohmbskv2kgbxa
2
- ONTO m14hvdpwu2t2cxnf75otbhvkltgiwr5hqx7fh74t7rzysjw6fy34oa
3
- {
4
- CREATE TYPE default::Pattern {
5
- CREATE PROPERTY content: std::str;
6
- CREATE PROPERTY parent_id: std::uuid;
7
- CREATE PROPERTY url: std::str;
8
- };
9
- };
 
 
 
 
 
 
 
 
 
 
edgedb/depopulate_edgedb.py DELETED
@@ -1,19 +0,0 @@
1
- import edgedb
2
- from dotenv import load_dotenv
3
-
4
- load_dotenv()
5
-
6
- client = edgedb.create_client()
7
-
8
- resp = input('Are you sure you want to depopulate the database? (y/n) ')
9
-
10
- if resp.lower() == 'y':
11
- client.query('''
12
- DELETE Website;
13
- DELETE Image;
14
- DELETE Video;
15
- DELETE Text;
16
- ''')
17
- print('Database depopulated.')
18
- else:
19
- print('Operation canceled.')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
edgedb/populate_edgedb.py DELETED
@@ -1,77 +0,0 @@
1
- import edgedb
2
- import json
3
- import os
4
- from dotenv import load_dotenv
5
-
6
- load_dotenv()
7
-
8
- client = edgedb.create_client()
9
-
10
- for root, dirs, files in os.walk("../Banco_de_Dados/Coleta/downloaded_files"):
11
- for file in files:
12
- if file.endswith(".json"):
13
- with open(os.path.join(root, file), 'r') as f:
14
- data = json.load(f)
15
- data_path = './'+'/'.join(root.split('/')[5:])
16
- # Insert Website
17
- client.query('''
18
- INSERT Website {
19
- url := <str>$url,
20
- relative_path := <str>$relative_path,
21
- hyperrefs := <array<str>>$gov_links,
22
- images := {},
23
- videos := {},
24
- text := (
25
- INSERT Text {
26
- content := <str>$content
27
- }
28
- )
29
- };
30
- ''', url=data['absolute_url'], \
31
- relative_path=data_path, \
32
- gov_links=data['gov_links'], \
33
- content=data['text'])
34
-
35
-
36
- # Insert Images
37
- for image in data.get('images', []):
38
- client.query('''
39
- UPDATE Website
40
- FILTER .url = <str>$url
41
- SET {
42
- images += {
43
- (INSERT Image {
44
- name := <str>$name,
45
- path := <str>$path,
46
- url := <str>$image_url,
47
- hyperlink := <str>$hyperlink,
48
- alt := <str>$alt,
49
- })
50
- }
51
- };
52
- ''', url=data['absolute_url'], \
53
- path=image['path'], \
54
- name=image['name'], \
55
- image_url=image['url'], \
56
- hyperlink=image['hyperlink'], \
57
- alt=image['alt'])
58
-
59
- for video in data.get('videos', []):
60
- client.query('''
61
- UPDATE Website
62
- FILTER .url = <str>$url
63
- SET {
64
- videos += {
65
- (INSERT Video {
66
- name := <str>$name,
67
- url := <str>$video_url,
68
- hyperlink := <str>$hyperlink,
69
- alt := <str>$alt,
70
- })
71
- }
72
- };
73
- ''', url=data['absolute_url'], \
74
- name=video['name'], \
75
- video_url=video['url'], \
76
- hyperlink=video['hyperlink'], \
77
- alt=video['alt'])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
{agente/interface β†’ interface}/app.py RENAMED
File without changes
{agente/interface β†’ interface}/chatbot.py RENAMED
File without changes
{agente/memory β†’ memory}/.gitkeep RENAMED
File without changes
{agente/pipelines β†’ pipelines}/.gitkeep RENAMED
File without changes
{agente/pipelines β†’ pipelines}/__init__.py RENAMED
File without changes
{agente/pipelines β†’ pipelines}/message.py RENAMED
File without changes
{agente/pipelines β†’ pipelines}/oac/oac.py RENAMED
File without changes
{agente/pipelines β†’ pipelines}/rag.py RENAMED
File without changes
{agente/pipelines β†’ pipelines}/splitter/splitter.py RENAMED
File without changes
{agente/pipelines β†’ pipelines}/utils/cli.py RENAMED
File without changes
{agente/pipelines β†’ pipelines}/utils/markdown.py RENAMED
File without changes
{agente/prompts β†’ prompts}/system.md RENAMED
File without changes
{agente/prompts β†’ prompts}/tamplates/.gitkeep RENAMED
File without changes
{agente/tools β†’ tools}/.gitkeep RENAMED
File without changes
{agente/tools β†’ tools}/__init__.py RENAMED
File without changes
{agente/tools β†’ tools}/python/.gitkeep RENAMED
File without changes
{agente/utils β†’ utils}/.gitkeep RENAMED
File without changes
{agente/utils β†’ utils}/file.py RENAMED
File without changes