mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Move data indexer files into a separate folder under processor. Update assoc UTs
This commit is contained in:
parent
68ac1e0193
commit
ec06d2c446
25 changed files with 22 additions and 21 deletions
|
@ -10,8 +10,8 @@ import requests
|
|||
# Internal Packages
|
||||
from khoj.utils.helpers import timer
|
||||
from khoj.utils.rawconfig import Entry, GithubContentConfig, GithubRepoConfig
|
||||
from khoj.processor.markdown.markdown_to_entries import MarkdownToEntries
|
||||
from khoj.processor.org_mode.org_to_entries import OrgToEntries
|
||||
from khoj.processor.data_sources.markdown.markdown_to_entries import MarkdownToEntries
|
||||
from khoj.processor.data_sources.org_mode.org_to_entries import OrgToEntries
|
||||
from khoj.processor.text_to_entries import TextToEntries
|
||||
from database.models import Entry as DbEntry, GithubConfig, KhojUser
|
||||
|
|
@ -4,7 +4,7 @@ from pathlib import Path
|
|||
from typing import Iterable, List, Tuple
|
||||
|
||||
# Internal Packages
|
||||
from khoj.processor.org_mode import orgnode
|
||||
from khoj.processor.data_sources.org_mode import orgnode
|
||||
from khoj.processor.text_to_entries import TextToEntries
|
||||
from khoj.utils.helpers import timer
|
||||
from khoj.utils.rawconfig import Entry
|
0
src/khoj/processor/data_sources/plaintext/__init__.py
Normal file
0
src/khoj/processor/data_sources/plaintext/__init__.py
Normal file
|
@ -10,12 +10,12 @@ from starlette.authentication import requires
|
|||
|
||||
# Internal Packages
|
||||
from khoj.utils import state, constants
|
||||
from khoj.processor.markdown.markdown_to_entries import MarkdownToEntries
|
||||
from khoj.processor.org_mode.org_to_entries import OrgToEntries
|
||||
from khoj.processor.pdf.pdf_to_entries import PdfToEntries
|
||||
from khoj.processor.github.github_to_entries import GithubToEntries
|
||||
from khoj.processor.notion.notion_to_entries import NotionToEntries
|
||||
from khoj.processor.plaintext.plaintext_to_entries import PlaintextToEntries
|
||||
from khoj.processor.data_sources.markdown.markdown_to_entries import MarkdownToEntries
|
||||
from khoj.processor.data_sources.org_mode.org_to_entries import OrgToEntries
|
||||
from khoj.processor.data_sources.pdf.pdf_to_entries import PdfToEntries
|
||||
from khoj.processor.data_sources.github.github_to_entries import GithubToEntries
|
||||
from khoj.processor.data_sources.notion.notion_to_entries import NotionToEntries
|
||||
from khoj.processor.data_sources.plaintext.plaintext_to_entries import PlaintextToEntries
|
||||
from khoj.search_type import text_search, image_search
|
||||
from khoj.routers.helpers import update_telemetry_state
|
||||
from khoj.utils.yaml import save_config_to_file_updated_state
|
||||
|
|
|
@ -272,6 +272,7 @@ class ConversationCommand(str, Enum):
|
|||
General = "general"
|
||||
Notes = "notes"
|
||||
Help = "help"
|
||||
Online = "online"
|
||||
|
||||
|
||||
command_descriptions = {
|
||||
|
|
|
@ -15,7 +15,7 @@ app = FastAPI()
|
|||
# Internal Packages
|
||||
from khoj.configure import configure_routes, configure_search_types, configure_middleware
|
||||
from khoj.processor.embeddings import CrossEncoderModel, EmbeddingsModel
|
||||
from khoj.processor.plaintext.plaintext_to_entries import PlaintextToEntries
|
||||
from khoj.processor.data_sources.plaintext.plaintext_to_entries import PlaintextToEntries
|
||||
from khoj.search_type import image_search, text_search
|
||||
from khoj.utils.config import SearchModels
|
||||
from khoj.utils.constants import web_directory
|
||||
|
@ -28,7 +28,7 @@ from khoj.utils.rawconfig import (
|
|||
)
|
||||
from khoj.utils import state, fs_syncer
|
||||
from khoj.routers.indexer import configure_content
|
||||
from khoj.processor.org_mode.org_to_entries import OrgToEntries
|
||||
from khoj.processor.data_sources.org_mode.org_to_entries import OrgToEntries
|
||||
from database.models import (
|
||||
KhojApiUser,
|
||||
LocalOrgConfig,
|
||||
|
|
2
tests/data/config.yml
vendored
2
tests/data/config.yml
vendored
|
@ -14,4 +14,4 @@ search-type:
|
|||
asymmetric:
|
||||
cross-encoder: cross-encoder/ms-marco-MiniLM-L-6-v2
|
||||
encoder: sentence-transformers/msmarco-MiniLM-L-6-v3
|
||||
version: 0.14.0
|
||||
version: 0.15.0
|
||||
|
|
|
@ -15,7 +15,7 @@ from khoj.utils import state
|
|||
from khoj.utils.state import search_models, content_index, config
|
||||
from khoj.search_type import text_search, image_search
|
||||
from khoj.utils.rawconfig import ContentConfig, SearchConfig
|
||||
from khoj.processor.org_mode.org_to_entries import OrgToEntries
|
||||
from khoj.processor.data_sources.org_mode.org_to_entries import OrgToEntries
|
||||
from database.models import KhojUser, KhojApiUser
|
||||
from database.adapters import EntryAdapters
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ from pathlib import Path
|
|||
import os
|
||||
|
||||
# Internal Packages
|
||||
from khoj.processor.markdown.markdown_to_entries import MarkdownToEntries
|
||||
from khoj.processor.data_sources.markdown.markdown_to_entries import MarkdownToEntries
|
||||
from khoj.utils.fs_syncer import get_markdown_files
|
||||
from khoj.utils.rawconfig import TextContentConfig
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ from khoj.utils import state
|
|||
from khoj.utils.state import search_models, content_index, config
|
||||
from khoj.search_type import text_search, image_search
|
||||
from khoj.utils.rawconfig import ContentConfig, SearchConfig
|
||||
from khoj.processor.org_mode.org_to_entries import OrgToEntries
|
||||
from khoj.processor.data_sources.org_mode.org_to_entries import OrgToEntries
|
||||
from database.models import KhojUser, KhojApiUser
|
||||
from database.adapters import EntryAdapters
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import json
|
|||
import os
|
||||
|
||||
# Internal Packages
|
||||
from khoj.processor.org_mode.org_to_entries import OrgToEntries
|
||||
from khoj.processor.data_sources.org_mode.org_to_entries import OrgToEntries
|
||||
from khoj.processor.text_to_entries import TextToEntries
|
||||
from khoj.utils.helpers import is_none_or_empty
|
||||
from khoj.utils.rawconfig import Entry
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import datetime
|
||||
|
||||
# Internal Packages
|
||||
from khoj.processor.org_mode import orgnode
|
||||
from khoj.processor.data_sources.org_mode import orgnode
|
||||
|
||||
|
||||
# Test
|
||||
|
|
|
@ -3,7 +3,7 @@ import json
|
|||
import os
|
||||
|
||||
# Internal Packages
|
||||
from khoj.processor.pdf.pdf_to_entries import PdfToEntries
|
||||
from khoj.processor.data_sources.pdf.pdf_to_entries import PdfToEntries
|
||||
|
||||
from khoj.utils.fs_syncer import get_pdf_files
|
||||
from khoj.utils.rawconfig import TextContentConfig
|
||||
|
|
|
@ -6,7 +6,7 @@ from pathlib import Path
|
|||
# Internal Packages
|
||||
from khoj.utils.fs_syncer import get_plaintext_files
|
||||
from khoj.utils.rawconfig import TextContentConfig
|
||||
from khoj.processor.plaintext.plaintext_to_entries import PlaintextToEntries
|
||||
from khoj.processor.data_sources.plaintext.plaintext_to_entries import PlaintextToEntries
|
||||
from database.models import LocalPlaintextConfig, KhojUser
|
||||
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ import pytest
|
|||
# Internal Packages
|
||||
from khoj.search_type import text_search
|
||||
from khoj.utils.rawconfig import ContentConfig, SearchConfig
|
||||
from khoj.processor.org_mode.org_to_entries import OrgToEntries
|
||||
from khoj.processor.github.github_to_entries import GithubToEntries
|
||||
from khoj.processor.data_sources.org_mode.org_to_entries import OrgToEntries
|
||||
from khoj.processor.data_sources.github.github_to_entries import GithubToEntries
|
||||
from khoj.utils.fs_syncer import collect_files, get_org_files
|
||||
from database.models import LocalOrgConfig, KhojUser, Entry, GithubConfig
|
||||
|
||||
|
|
Loading…
Reference in a new issue