feat: Implement text manager API and database connection

- Added `text_manager.py` to handle the creation of text libraries via FastAPI.
- Introduced database connection management in `conexion.py` using PostgreSQL credentials from environment variables.
- Created abstract base class `EmbedderABC` in `Base_Embedder.py` for embedding models.
- Developed `OpenAIEmbedder` class to generate embeddings using OpenAI's API.
- Implemented `OpenAIEmbedderModel` and repository pattern for managing OpenAI embedders in `Openai_embedder_mmr.py`.
- Established `Biblioteca` class for managing text libraries and their associated notes in `biblioteca.py`.
- Created SQLAlchemy models and mappers for `Biblioteca` and `Nota` in `biblioteca_mmr.py` and `notas_biblioteca_mmr.py`.
- Added functionality for dynamic table generation for notes associated with libraries.
- Included comprehensive methods for adding, retrieving, and managing notes and libraries in their respective repositories.
This commit is contained in:
2025-05-10 17:52:43 +02:00
parent c646bc1fef
commit c47b9474f4
27 changed files with 844 additions and 44 deletions
+42 -1
View File
@@ -41,6 +41,7 @@ E:\Fitz_Studio
│ │ ├── 0e
│ │ ├── 10
│ │ ├── 11
│ │ ├── 13
│ │ ├── 15
│ │ ├── 17
│ │ ├── 18
@@ -55,9 +56,11 @@ E:\Fitz_Studio
│ │ ├── 22
│ │ ├── 23
│ │ ├── 24
│ │ ├── 25
│ │ ├── 26
│ │ ├── 27
│ │ ├── 28
│ │ ├── 2b
│ │ ├── 2c
│ │ ├── 2d
│ │ ├── 2f
@@ -65,11 +68,14 @@ E:\Fitz_Studio
│ │ ├── 32
│ │ ├── 33
│ │ ├── 34
│ │ ├── 36
│ │ ├── 39
│ │ ├── 3a
│ │ ├── 3c
│ │ ├── 3d
│ │ ├── 3e
│ │ ├── 3f
│ │ ├── 40
│ │ ├── 41
│ │ ├── 42
│ │ ├── 43
@@ -83,10 +89,14 @@ E:\Fitz_Studio
│ │ ├── 4d
│ │ ├── 4e
│ │ ├── 4f
│ │ ├── 50
│ │ ├── 51
│ │ ├── 52
│ │ ├── 55
│ │ ├── 56
│ │ ├── 57
│ │ ├── 58
│ │ ├── 59
│ │ ├── 5a
│ │ ├── 5b
│ │ ├── 5c
@@ -100,6 +110,7 @@ E:\Fitz_Studio
│ │ ├── 65
│ │ ├── 67
│ │ ├── 69
│ │ ├── 6b
│ │ ├── 6c
│ │ ├── 6d
│ │ ├── 6e
@@ -109,27 +120,33 @@ E:\Fitz_Studio
│ │ ├── 75
│ │ ├── 76
│ │ ├── 77
│ │ ├── 79
│ │ ├── 7b
│ │ ├── 7c
│ │ ├── 7d
│ │ ├── 7f
│ │ ├── 80
│ │ ├── 81
│ │ ├── 82
│ │ ├── 83
│ │ ├── 84
│ │ ├── 85
│ │ ├── 86
│ │ ├── 87
│ │ ├── 89
│ │ ├── 8a
│ │ ├── 8b
│ │ ├── 8c
│ │ ├── 8d
│ │ ├── 90
│ │ ├── 92
│ │ ├── 94
│ │ ├── 95
│ │ ├── 97
│ │ ├── 98
│ │ ├── 99
│ │ ├── 9a
│ │ ├── 9b
│ │ ├── 9c
│ │ ├── 9d
│ │ ├── a0
@@ -148,7 +165,9 @@ E:\Fitz_Studio
│ │ ├── ad
│ │ ├── ae
│ │ ├── af
│ │ ├── b0
│ │ ├── b1
│ │ ├── b2
│ │ ├── b3
│ │ ├── b4
│ │ ├── b5
@@ -158,6 +177,7 @@ E:\Fitz_Studio
│ │ ├── ba
│ │ ├── bb
│ │ ├── bc
│ │ ├── bd
│ │ ├── bf
│ │ ├── c0
│ │ ├── c3
@@ -171,6 +191,7 @@ E:\Fitz_Studio
│ │ ├── ce
│ │ ├── cf
│ │ ├── d1
│ │ ├── d3
│ │ ├── d4
│ │ ├── d5
│ │ ├── d6
@@ -184,6 +205,8 @@ E:\Fitz_Studio
│ │ ├── de
│ │ ├── df
│ │ ├── e0
│ │ ├── e1
│ │ ├── e2
│ │ ├── e3
│ │ ├── e4
│ │ ├── e5
@@ -202,6 +225,7 @@ E:\Fitz_Studio
│ │ ├── f6
│ │ ├── f7
│ │ ├── f9
│ │ ├── fa
│ │ ├── fb
│ │ ├── fc
│ │ ├── fd
@@ -298,6 +322,7 @@ E:\Fitz_Studio
│ ├── jupyter
│ └── man
├── Apikeys.ipynb
├── Apikeys_embedding.ipynb
├── Credenciales.ipynb
├── Encriptacion.ipynb
├── README.md
@@ -310,6 +335,9 @@ E:\Fitz_Studio
│ │ ├── __init__.py
│ │ ├── __pycache__
│ │ └── v1
│ ├── db
│ │ ├── __init__.py
│ │ └── conexion.py
│ ├── deps
│ │ ├── __init__.py
│ │ └── auth.py
@@ -721,16 +749,19 @@ E:\Fitz_Studio
│ │ ├── queue-microtask
│ │ ├── range-parser
│ │ ├── raw-body
│ │ ├── re-resizable
│ │ ├── react
│ │ ├── react-docgen
│ │ ├── react-docgen-typescript
│ │ ├── react-dom
│ │ ├── react-draggable
│ │ ├── react-is
│ │ ├── react-number-format
│ │ ├── react-reconciler
│ │ ├── react-refresh
│ │ ├── react-remove-scroll
│ │ ├── react-remove-scroll-bar
│ │ ├── react-rnd
│ │ ├── react-router
│ │ ├── react-router-dom
│ │ ├── react-style-singleton
@@ -892,9 +923,9 @@ E:\Fitz_Studio
│ │ ├── Router.tsx
│ │ ├── assets
│ │ ├── components
│ │ ├── data
│ │ ├── main.tsx
│ │ ├── pages
│ │ ├── public
│ │ ├── theme.ts
│ │ ├── types
│ │ └── vite-env.d.ts
@@ -905,6 +936,7 @@ E:\Fitz_Studio
│ ├── vite.config.js
│ ├── vitest.setup.mjs
│ └── yarn.lock
├── github_tutorial.ipynb
├── main.py
├── notebooks
│ └── hacer_script_nombres.ipynb
@@ -958,6 +990,7 @@ E:\Fitz_Studio
│ │ └── postgres_credencial_mmr.py
│ ├── Llms
│ │ ├── Agente.py
│ │ ├── Embedders
│ │ ├── MCPs
│ │ ├── Memory
│ │ ├── Modelos
@@ -965,8 +998,16 @@ E:\Fitz_Studio
│ │ └── __pycache__
│ ├── Security
│ │ ├── Encriptar.py
│ │ ├── GenerarIDs.py
│ │ ├── __init__.py
│ │ └── __pycache__
│ ├── TextManager
│ │ ├── __init__.py
│ │ ├── __pycache__
│ │ ├── biblioteca.py
│ │ ├── biblioteca_mmr.py
│ │ ├── nota.py
│ │ └── notas_biblioteca_mmr.py
│ ├── __init__.py
│ ├── __pycache__
│ │ ├── __init__.cpython-311.pyc