XThomasBU
commited on
Commit
Β·
e5aac56
1
Parent(s):
558adb3
initial setup commit
Browse filesThis view is limited to 50 files because it contains too many changes. Β
See raw diff
- .github/workflows/push_to_hf_space.yml +1 -1
- .vscode/launch.json +2 -2
- Dockerfile +1 -1
- Dockerfile.dev +1 -1
- README.md +6 -6
- apps/ai_tutor/.chainlit/config.toml +1 -1
- apps/ai_tutor/app.py +1 -1
- apps/ai_tutor/chainlit_app.py +4 -4
- apps/ai_tutor/config/config_manager.py +1 -1
- apps/ai_tutor/config/project_config.yml +1 -1
- apps/ai_tutor/helpers.py +1 -1
- apps/chainlit_base/chainlit_base.py +2 -2
- {modules β edubotics_core}/__init__.py +0 -0
- {modules β edubotics_core}/chat/__init__.py +0 -0
- {modules β edubotics_core}/chat/base.py +0 -0
- {modules β edubotics_core}/chat/chat_model_loader.py +0 -0
- {modules β edubotics_core}/chat/helpers.py +0 -0
- {modules β edubotics_core}/chat/langchain/__init__.py +0 -0
- {modules β edubotics_core}/chat/langchain/langchain_rag.py +2 -2
- {modules β edubotics_core}/chat/langchain/utils.py +0 -0
- {modules β edubotics_core}/chat/llm_tutor.py +5 -5
- {modules β edubotics_core}/chat_processor/__init__.py +0 -0
- {modules β edubotics_core}/chat_processor/helpers.py +0 -0
- {modules β edubotics_core}/chat_processor/literal_ai.py +0 -0
- {modules β edubotics_core}/config/__init__.py +0 -0
- {modules β edubotics_core}/config/constants.py +0 -0
- {modules β edubotics_core}/dataloader/__init__.py +0 -0
- {modules β edubotics_core}/dataloader/data_loader.py +5 -5
- {modules β edubotics_core}/dataloader/helpers.py +1 -1
- {modules β edubotics_core}/dataloader/pdf_readers/__init__.py +0 -0
- {modules β edubotics_core}/dataloader/pdf_readers/base.py +0 -0
- {modules β edubotics_core}/dataloader/pdf_readers/gpt.py +1 -1
- {modules β edubotics_core}/dataloader/pdf_readers/llama.py +2 -2
- {modules β edubotics_core}/dataloader/webpage_crawler.py +1 -1
- {modules β edubotics_core}/retriever/__init__.py +0 -0
- {modules β edubotics_core}/retriever/base.py +0 -0
- {modules β edubotics_core}/retriever/chroma_retriever.py +0 -0
- {modules β edubotics_core}/retriever/colbert_retriever.py +0 -0
- {modules β edubotics_core}/retriever/faiss_retriever.py +0 -0
- {modules β edubotics_core}/retriever/helpers.py +0 -0
- {modules β edubotics_core}/retriever/raptor_retriever.py +0 -0
- {modules β edubotics_core}/retriever/retriever.py +4 -4
- {modules β edubotics_core}/vectorstore/__init__.py +0 -0
- {modules β edubotics_core}/vectorstore/base.py +0 -0
- {modules β edubotics_core}/vectorstore/chroma.py +1 -1
- {modules β edubotics_core}/vectorstore/colbert.py +1 -1
- {modules β edubotics_core}/vectorstore/embedding_model_loader.py +1 -1
- {modules β edubotics_core}/vectorstore/faiss.py +1 -1
- {modules β edubotics_core}/vectorstore/helpers.py +0 -0
- {modules β edubotics_core}/vectorstore/raptor.py +1 -1
.github/workflows/push_to_hf_space.yml
CHANGED
@@ -18,4 +18,4 @@ jobs:
|
|
18 |
- name: Deploy Production (main) to HuggingFace
|
19 |
env:
|
20 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
21 |
-
run: git push --force https://trgardos:[email protected]/spaces/
|
|
|
18 |
- name: Deploy Production (main) to HuggingFace
|
19 |
env:
|
20 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
21 |
+
run: git push --force https://trgardos:[email protected]/spaces/edubotics/dl4ds_tutor main:main
|
.vscode/launch.json
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
{ "name":"Python Debugger: Module store_manager",
|
18 |
"type":"debugpy",
|
19 |
"request":"launch",
|
20 |
-
"module":"
|
21 |
"env": {"PYTHONPATH": "${workspaceFolder}/code"},
|
22 |
"cwd": "${workspaceFolder}/code",
|
23 |
"justMyCode": true
|
@@ -26,7 +26,7 @@
|
|
26 |
"name": "Python Debugger: Module data_loader",
|
27 |
"type": "debugpy",
|
28 |
"request": "launch",
|
29 |
-
"module": "
|
30 |
"env": {"PYTHONPATH": "${workspaceFolder}/code"},
|
31 |
"cwd": "${workspaceFolder}/code",
|
32 |
"justMyCode": true
|
|
|
17 |
{ "name":"Python Debugger: Module store_manager",
|
18 |
"type":"debugpy",
|
19 |
"request":"launch",
|
20 |
+
"module":"edubotics_core.vectorstore.store_manager",
|
21 |
"env": {"PYTHONPATH": "${workspaceFolder}/code"},
|
22 |
"cwd": "${workspaceFolder}/code",
|
23 |
"justMyCode": true
|
|
|
26 |
"name": "Python Debugger: Module data_loader",
|
27 |
"type": "debugpy",
|
28 |
"request": "launch",
|
29 |
+
"module": "edubotics_core.dataloader.data_loader",
|
30 |
"env": {"PYTHONPATH": "${workspaceFolder}/code"},
|
31 |
"cwd": "${workspaceFolder}/code",
|
32 |
"justMyCode": true
|
Dockerfile
CHANGED
@@ -40,4 +40,4 @@ RUN --mount=type=secret,id=LITERAL_API_KEY_LOGGING,mode=0444,required=true
|
|
40 |
RUN --mount=type=secret,id=CHAINLIT_AUTH_SECRET,mode=0444,required=true
|
41 |
|
42 |
# Default command to run the application
|
43 |
-
CMD python -m
|
|
|
40 |
RUN --mount=type=secret,id=CHAINLIT_AUTH_SECRET,mode=0444,required=true
|
41 |
|
42 |
# Default command to run the application
|
43 |
+
CMD python -m edubotics_core.vectorstore.store_manager --config_file config/config.yml --project_config_file config/project_config.yml && python -m uvicorn app:app --host 0.0.0.0 --port 7860
|
Dockerfile.dev
CHANGED
@@ -35,4 +35,4 @@ RUN ls -R /code
|
|
35 |
EXPOSE 7860
|
36 |
|
37 |
# Default command to run the application
|
38 |
-
CMD python -m
|
|
|
35 |
EXPOSE 7860
|
36 |
|
37 |
# Default command to run the application
|
38 |
+
CMD python -m edubotics_core.vectorstore.store_manager --config_file config/config.yml --project_config_file config/project_config.yml && python -m uvicorn app:app --host 0.0.0.0 --port 7860
|
README.md
CHANGED
@@ -9,9 +9,9 @@ app_port: 7860
|
|
9 |
---
|
10 |
# DL4DS Tutor π
|
11 |
|
12 |
-
![Build Status](https://github.com/
|
13 |
-
![License](https://img.shields.io/github/license/
|
14 |
-
![GitHub stars](https://img.shields.io/github/stars/
|
15 |
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)
|
16 |
|
17 |
|
@@ -33,7 +33,7 @@ Please visit [setup](https://dl4ds.github.io/dl4ds_tutor/guide/setup/) for more
|
|
33 |
|
34 |
1. **Clone the Repository**
|
35 |
```bash
|
36 |
-
git clone https://github.com/
|
37 |
```
|
38 |
|
39 |
2. Create your app in the apps folder. (An example is the `apps/ai_tutor` app)
|
@@ -49,13 +49,13 @@ Please visit [setup](https://dl4ds.github.io/dl4ds_tutor/guide/setup/) for more
|
|
49 |
3. **To test Data Loading (Optional)**
|
50 |
```bash
|
51 |
cd apps/your_app
|
52 |
-
python -m
|
53 |
```
|
54 |
|
55 |
4. **Create the Vector Database**
|
56 |
```bash
|
57 |
cd apps/your_app
|
58 |
-
python -m
|
59 |
```
|
60 |
|
61 |
6. **Run the FastAPI App**
|
|
|
9 |
---
|
10 |
# DL4DS Tutor π
|
11 |
|
12 |
+
![Build Status](https://github.com/edubotics-ai/edubot-core/actions/workflows/push_to_hf_space.yml/badge.svg)
|
13 |
+
![License](https://img.shields.io/github/license/edubotics-ai/edubot-core)
|
14 |
+
![GitHub stars](https://img.shields.io/github/stars/edubotics-ai/edubot-core)
|
15 |
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)
|
16 |
|
17 |
|
|
|
33 |
|
34 |
1. **Clone the Repository**
|
35 |
```bash
|
36 |
+
git clone https://github.com/edubotics-ai/edubot-core
|
37 |
```
|
38 |
|
39 |
2. Create your app in the apps folder. (An example is the `apps/ai_tutor` app)
|
|
|
49 |
3. **To test Data Loading (Optional)**
|
50 |
```bash
|
51 |
cd apps/your_app
|
52 |
+
python -m edubotics_core.dataloader.data_loader --links "your_pdf_link" --config_file config/config.yml --project_config_file config/project_config.yml
|
53 |
```
|
54 |
|
55 |
4. **Create the Vector Database**
|
56 |
```bash
|
57 |
cd apps/your_app
|
58 |
+
python -m edubotics_core.vectorstore.store_manager --config_file config/config.yml --project_config_file config/project_config.yml
|
59 |
```
|
60 |
|
61 |
6. **Run the FastAPI App**
|
apps/ai_tutor/.chainlit/config.toml
CHANGED
@@ -65,7 +65,7 @@ default_collapse_content = true
|
|
65 |
cot = "hidden"
|
66 |
|
67 |
# Link to your github repo. This will add a github button in the UI's header.
|
68 |
-
github = "https://github.com/
|
69 |
|
70 |
# Specify a CSS file that can be used to customize the user interface.
|
71 |
# The CSS file can be served from the public directory or via an external link.
|
|
|
65 |
cot = "hidden"
|
66 |
|
67 |
# Link to your github repo. This will add a github button in the UI's header.
|
68 |
+
github = "https://github.com/edubotics-ai/edubot-core"
|
69 |
|
70 |
# Specify a CSS file that can be used to customize the user interface.
|
71 |
# The CSS file can be served from the public directory or via an external link.
|
apps/ai_tutor/app.py
CHANGED
@@ -21,7 +21,7 @@ from helpers import (
|
|
21 |
reset_tokens_for_user,
|
22 |
check_user_cooldown,
|
23 |
)
|
24 |
-
from
|
25 |
from config.config_manager import config_manager
|
26 |
import hashlib
|
27 |
|
|
|
21 |
reset_tokens_for_user,
|
22 |
check_user_cooldown,
|
23 |
)
|
24 |
+
from edubotics_core.chat_processor.helpers import get_user_details, update_user_info
|
25 |
from config.config_manager import config_manager
|
26 |
import hashlib
|
27 |
|
apps/ai_tutor/chainlit_app.py
CHANGED
@@ -4,18 +4,18 @@ from config.constants import (
|
|
4 |
LITERAL_API_KEY_LOGGING,
|
5 |
LITERAL_API_URL,
|
6 |
)
|
7 |
-
from
|
8 |
import json
|
9 |
from typing import Any, Dict, no_type_check
|
10 |
import chainlit as cl
|
11 |
-
from
|
12 |
-
from
|
13 |
get_sources,
|
14 |
get_history_chat_resume,
|
15 |
get_history_setup_llm,
|
16 |
# get_last_config,
|
17 |
)
|
18 |
-
from
|
19 |
update_user_info,
|
20 |
get_user_details,
|
21 |
)
|
|
|
4 |
LITERAL_API_KEY_LOGGING,
|
5 |
LITERAL_API_URL,
|
6 |
)
|
7 |
+
from edubotics_core.chat_processor.literal_ai import CustomLiteralDataLayer
|
8 |
import json
|
9 |
from typing import Any, Dict, no_type_check
|
10 |
import chainlit as cl
|
11 |
+
from edubotics_core.chat.llm_tutor import LLMTutor
|
12 |
+
from edubotics_core.chat.helpers import (
|
13 |
get_sources,
|
14 |
get_history_chat_resume,
|
15 |
get_history_setup_llm,
|
16 |
# get_last_config,
|
17 |
)
|
18 |
+
from edubotics_core.chat_processor.helpers import (
|
19 |
update_user_info,
|
20 |
get_user_details,
|
21 |
)
|
apps/ai_tutor/config/config_manager.py
CHANGED
@@ -104,7 +104,7 @@ class TokenConfig(BaseModel):
|
|
104 |
|
105 |
|
106 |
class MiscConfig(BaseModel):
|
107 |
-
github_repo: HttpUrl = "https://github.com/
|
108 |
docs_website: HttpUrl = "https://dl4ds.github.io/dl4ds_tutor/"
|
109 |
|
110 |
|
|
|
104 |
|
105 |
|
106 |
class MiscConfig(BaseModel):
|
107 |
+
github_repo: HttpUrl = "https://github.com/edubotics-ai/edubot-core"
|
108 |
docs_website: HttpUrl = "https://dl4ds.github.io/dl4ds_tutor/"
|
109 |
|
110 |
|
apps/ai_tutor/config/project_config.yml
CHANGED
@@ -13,7 +13,7 @@ token_config:
|
|
13 |
all_time_tokens_allocated: 1000000
|
14 |
|
15 |
misc:
|
16 |
-
github_repo: "https://github.com/
|
17 |
docs_website: "https://dl4ds.github.io/dl4ds_tutor/"
|
18 |
|
19 |
api_config:
|
|
|
13 |
all_time_tokens_allocated: 1000000
|
14 |
|
15 |
misc:
|
16 |
+
github_repo: "https://github.com/edubotics-ai/edubot-core"
|
17 |
docs_website: "https://dl4ds.github.io/dl4ds_tutor/"
|
18 |
|
19 |
api_config:
|
apps/ai_tutor/helpers.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
from datetime import datetime, timedelta, timezone
|
2 |
import tiktoken
|
3 |
-
from
|
4 |
|
5 |
|
6 |
def get_time():
|
|
|
1 |
from datetime import datetime, timedelta, timezone
|
2 |
import tiktoken
|
3 |
+
from edubotics_core.chat_processor.helpers import update_user_info, convert_to_dict
|
4 |
|
5 |
|
6 |
def get_time():
|
apps/chainlit_base/chainlit_base.py
CHANGED
@@ -2,8 +2,8 @@ import chainlit.data as cl_data
|
|
2 |
import asyncio
|
3 |
from typing import Any, Dict, no_type_check
|
4 |
import chainlit as cl
|
5 |
-
from
|
6 |
-
from
|
7 |
get_sources,
|
8 |
get_history_setup_llm,
|
9 |
)
|
|
|
2 |
import asyncio
|
3 |
from typing import Any, Dict, no_type_check
|
4 |
import chainlit as cl
|
5 |
+
from edubotics_core.chat.llm_tutor import LLMTutor
|
6 |
+
from edubotics_core.chat.helpers import (
|
7 |
get_sources,
|
8 |
get_history_setup_llm,
|
9 |
)
|
{modules β edubotics_core}/__init__.py
RENAMED
File without changes
|
{modules β edubotics_core}/chat/__init__.py
RENAMED
File without changes
|
{modules β edubotics_core}/chat/base.py
RENAMED
File without changes
|
{modules β edubotics_core}/chat/chat_model_loader.py
RENAMED
File without changes
|
{modules β edubotics_core}/chat/helpers.py
RENAMED
File without changes
|
{modules β edubotics_core}/chat/langchain/__init__.py
RENAMED
File without changes
|
{modules β edubotics_core}/chat/langchain/langchain_rag.py
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
from langchain_core.prompts import ChatPromptTemplate
|
2 |
|
3 |
-
# from
|
4 |
from langchain_community.chat_message_histories import ChatMessageHistory
|
5 |
-
from
|
6 |
from langchain_core.prompts import PromptTemplate
|
7 |
from langchain.memory import ConversationBufferWindowMemory
|
8 |
from langchain_core.runnables.utils import ConfigurableFieldSpec
|
|
|
1 |
from langchain_core.prompts import ChatPromptTemplate
|
2 |
|
3 |
+
# from edubotics_core.chat.langchain.utils import
|
4 |
from langchain_community.chat_message_histories import ChatMessageHistory
|
5 |
+
from edubotics_core.chat.base import BaseRAG
|
6 |
from langchain_core.prompts import PromptTemplate
|
7 |
from langchain.memory import ConversationBufferWindowMemory
|
8 |
from langchain_core.runnables.utils import ConfigurableFieldSpec
|
{modules β edubotics_core}/chat/langchain/utils.py
RENAMED
File without changes
|
{modules β edubotics_core}/chat/llm_tutor.py
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
-
from
|
2 |
-
from
|
3 |
-
from
|
4 |
-
from
|
5 |
-
from
|
6 |
Langchain_RAG_V2,
|
7 |
QuestionGenerator,
|
8 |
)
|
|
|
1 |
+
from edubotics_core.chat.helpers import get_prompt
|
2 |
+
from edubotics_core.chat.chat_model_loader import ChatModelLoader
|
3 |
+
from edubotics_core.vectorstore.store_manager import VectorStoreManager
|
4 |
+
from edubotics_core.retriever.retriever import Retriever
|
5 |
+
from edubotics_core.chat.langchain.langchain_rag import (
|
6 |
Langchain_RAG_V2,
|
7 |
QuestionGenerator,
|
8 |
)
|
{modules β edubotics_core}/chat_processor/__init__.py
RENAMED
File without changes
|
{modules β edubotics_core}/chat_processor/helpers.py
RENAMED
File without changes
|
{modules β edubotics_core}/chat_processor/literal_ai.py
RENAMED
File without changes
|
{modules β edubotics_core}/config/__init__.py
RENAMED
File without changes
|
{modules β edubotics_core}/config/constants.py
RENAMED
File without changes
|
{modules β edubotics_core}/dataloader/__init__.py
RENAMED
File without changes
|
{modules β edubotics_core}/dataloader/data_loader.py
RENAMED
@@ -18,11 +18,11 @@ from urllib.parse import urljoin
|
|
18 |
import html2text
|
19 |
import bs4
|
20 |
import PyPDF2
|
21 |
-
from
|
22 |
-
from
|
23 |
-
from
|
24 |
-
from
|
25 |
-
from
|
26 |
|
27 |
logger = logging.getLogger(__name__)
|
28 |
BASE_DIR = os.getcwd()
|
|
|
18 |
import html2text
|
19 |
import bs4
|
20 |
import PyPDF2
|
21 |
+
from edubotics_core.dataloader.pdf_readers.base import PDFReader
|
22 |
+
from edubotics_core.dataloader.pdf_readers.llama import LlamaParser
|
23 |
+
from edubotics_core.dataloader.pdf_readers.gpt import GPTParser
|
24 |
+
from edubotics_core.dataloader.helpers import get_metadata
|
25 |
+
from edubotics_core.config.constants import TIMEOUT
|
26 |
|
27 |
logger = logging.getLogger(__name__)
|
28 |
BASE_DIR = os.getcwd()
|
{modules β edubotics_core}/dataloader/helpers.py
RENAMED
@@ -2,7 +2,7 @@ import requests
|
|
2 |
from bs4 import BeautifulSoup
|
3 |
from urllib.parse import urlparse
|
4 |
import tempfile
|
5 |
-
from
|
6 |
TIMEOUT,
|
7 |
) # TODO: MOVE THIS TO APP SPECIFIC DIRECTORY
|
8 |
|
|
|
2 |
from bs4 import BeautifulSoup
|
3 |
from urllib.parse import urlparse
|
4 |
import tempfile
|
5 |
+
from edubotics_core.config.constants import (
|
6 |
TIMEOUT,
|
7 |
) # TODO: MOVE THIS TO APP SPECIFIC DIRECTORY
|
8 |
|
{modules β edubotics_core}/dataloader/pdf_readers/__init__.py
RENAMED
File without changes
|
{modules β edubotics_core}/dataloader/pdf_readers/base.py
RENAMED
File without changes
|
{modules β edubotics_core}/dataloader/pdf_readers/gpt.py
RENAMED
@@ -6,7 +6,7 @@ from io import BytesIO
|
|
6 |
from openai import OpenAI
|
7 |
from pdf2image import convert_from_path
|
8 |
from langchain.schema import Document
|
9 |
-
from
|
10 |
|
11 |
|
12 |
class GPTParser:
|
|
|
6 |
from openai import OpenAI
|
7 |
from pdf2image import convert_from_path
|
8 |
from langchain.schema import Document
|
9 |
+
from edubotics_core.config.constants import TIMEOUT
|
10 |
|
11 |
|
12 |
class GPTParser:
|
{modules β edubotics_core}/dataloader/pdf_readers/llama.py
RENAMED
@@ -2,8 +2,8 @@ import os
|
|
2 |
import requests
|
3 |
from llama_parse import LlamaParse
|
4 |
from langchain.schema import Document
|
5 |
-
from
|
6 |
-
from
|
7 |
|
8 |
|
9 |
class LlamaParser:
|
|
|
2 |
import requests
|
3 |
from llama_parse import LlamaParse
|
4 |
from langchain.schema import Document
|
5 |
+
from edubotics_core.config.constants import OPENAI_API_KEY, LLAMA_CLOUD_API_KEY, TIMEOUT
|
6 |
+
from edubotics_core.dataloader.helpers import download_pdf_from_url
|
7 |
|
8 |
|
9 |
class LlamaParser:
|
{modules β edubotics_core}/dataloader/webpage_crawler.py
RENAMED
@@ -4,7 +4,7 @@ import asyncio
|
|
4 |
import requests
|
5 |
from bs4 import BeautifulSoup
|
6 |
from urllib.parse import urljoin, urldefrag
|
7 |
-
from
|
8 |
|
9 |
|
10 |
class WebpageCrawler:
|
|
|
4 |
import requests
|
5 |
from bs4 import BeautifulSoup
|
6 |
from urllib.parse import urljoin, urldefrag
|
7 |
+
from edubotics_core.config.constants import TIMEOUT
|
8 |
|
9 |
|
10 |
class WebpageCrawler:
|
{modules β edubotics_core}/retriever/__init__.py
RENAMED
File without changes
|
{modules β edubotics_core}/retriever/base.py
RENAMED
File without changes
|
{modules β edubotics_core}/retriever/chroma_retriever.py
RENAMED
File without changes
|
{modules β edubotics_core}/retriever/colbert_retriever.py
RENAMED
File without changes
|
{modules β edubotics_core}/retriever/faiss_retriever.py
RENAMED
File without changes
|
{modules β edubotics_core}/retriever/helpers.py
RENAMED
File without changes
|
{modules β edubotics_core}/retriever/raptor_retriever.py
RENAMED
File without changes
|
{modules β edubotics_core}/retriever/retriever.py
RENAMED
@@ -1,7 +1,7 @@
|
|
1 |
-
from
|
2 |
-
from
|
3 |
-
from
|
4 |
-
from
|
5 |
|
6 |
|
7 |
class Retriever:
|
|
|
1 |
+
from edubotics_core.retriever.faiss_retriever import FaissRetriever
|
2 |
+
from edubotics_core.retriever.chroma_retriever import ChromaRetriever
|
3 |
+
from edubotics_core.retriever.colbert_retriever import ColbertRetriever
|
4 |
+
from edubotics_core.retriever.raptor_retriever import RaptorRetriever
|
5 |
|
6 |
|
7 |
class Retriever:
|
{modules β edubotics_core}/vectorstore/__init__.py
RENAMED
File without changes
|
{modules β edubotics_core}/vectorstore/base.py
RENAMED
File without changes
|
{modules β edubotics_core}/vectorstore/chroma.py
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
from langchain_community.vectorstores import Chroma
|
2 |
-
from
|
3 |
import os
|
4 |
|
5 |
|
|
|
1 |
from langchain_community.vectorstores import Chroma
|
2 |
+
from edubotics_core.vectorstore.base import VectorStoreBase
|
3 |
import os
|
4 |
|
5 |
|
{modules β edubotics_core}/vectorstore/colbert.py
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
from ragatouille import RAGPretrainedModel
|
2 |
-
from
|
3 |
from langchain_core.retrievers import BaseRetriever
|
4 |
from langchain_core.callbacks.manager import CallbackManagerForRetrieverRun
|
5 |
from langchain_core.documents import Document
|
|
|
1 |
from ragatouille import RAGPretrainedModel
|
2 |
+
from edubotics_core.vectorstore.base import VectorStoreBase
|
3 |
from langchain_core.retrievers import BaseRetriever
|
4 |
from langchain_core.callbacks.manager import CallbackManagerForRetrieverRun
|
5 |
from langchain_core.documents import Document
|
{modules β edubotics_core}/vectorstore/embedding_model_loader.py
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
from langchain_community.embeddings import OpenAIEmbeddings
|
2 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
3 |
-
from
|
4 |
|
5 |
|
6 |
class EmbeddingModelLoader:
|
|
|
1 |
from langchain_community.embeddings import OpenAIEmbeddings
|
2 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
3 |
+
from edubotics_core.config.constants import OPENAI_API_KEY, HUGGINGFACE_TOKEN
|
4 |
|
5 |
|
6 |
class EmbeddingModelLoader:
|
{modules β edubotics_core}/vectorstore/faiss.py
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
from langchain_community.vectorstores import FAISS
|
2 |
-
from
|
3 |
import os
|
4 |
|
5 |
|
|
|
1 |
from langchain_community.vectorstores import FAISS
|
2 |
+
from edubotics_core.vectorstore.base import VectorStoreBase
|
3 |
import os
|
4 |
|
5 |
|
{modules β edubotics_core}/vectorstore/helpers.py
RENAMED
File without changes
|
{modules β edubotics_core}/vectorstore/raptor.py
RENAMED
@@ -11,7 +11,7 @@ from sklearn.mixture import GaussianMixture
|
|
11 |
from langchain_community.chat_models import ChatOpenAI
|
12 |
from langchain_community.vectorstores import FAISS
|
13 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
14 |
-
from
|
15 |
|
16 |
RANDOM_SEED = 42
|
17 |
|
|
|
11 |
from langchain_community.chat_models import ChatOpenAI
|
12 |
from langchain_community.vectorstores import FAISS
|
13 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
14 |
+
from edubotics_core.vectorstore.base import VectorStoreBase
|
15 |
|
16 |
RANDOM_SEED = 42
|
17 |
|