mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Use printer icon for PDF logs. Only split lines if file at web link in web interface
This commit is contained in:
parent
e06be395f9
commit
595cc5b0f5
3 changed files with 7 additions and 6 deletions
|
@ -136,7 +136,7 @@ def configure_search(model: SearchModels, config: FullConfig, regenerate: bool,
|
|||
|
||||
# Initialize PDF Search
|
||||
if (t == state.SearchType.Pdf or t == None) and config.content_type.pdf:
|
||||
logger.info("💸 Setting up search for pdf")
|
||||
logger.info("🖨️ Setting up search for pdf")
|
||||
# Extract Entries, Generate PDF Embeddings
|
||||
model.pdf_search = text_search.setup(
|
||||
PdfToJsonl,
|
||||
|
|
|
@ -34,10 +34,11 @@
|
|||
function render_markdown(query, data) {
|
||||
var md = window.markdownit();
|
||||
return md.render(data.map(function (item) {
|
||||
lines = item.entry.split("\n")
|
||||
if (item.additional.file.startsWith("http"))
|
||||
return `${lines[0]}\t[*](${item.additional.file})\n${lines.slice(1).join("\n")}`
|
||||
return `${item.entry}`
|
||||
if (item.additional.file.startsWith("http")) {
|
||||
lines = item.entry.split("\n");
|
||||
return `${lines[0]}\t[*](${item.additional.file})\n${lines.slice(1).join("\n")}`;
|
||||
}
|
||||
return `${item.entry}`;
|
||||
}).join("\n"));
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ def test_incremental_update(content_config: ContentConfig, search_config: Search
|
|||
@pytest.mark.skipif(os.getenv("GITHUB_PAT_TOKEN") is None, reason="GITHUB_PAT_TOKEN not set")
|
||||
def test_asymmetric_setup_github(content_config: ContentConfig, search_config: SearchConfig):
|
||||
# Act
|
||||
# Regenerate notes embeddings during asymmetric setup
|
||||
# Regenerate github embeddings to test asymmetric setup without caching
|
||||
github_model = text_search.setup(GithubToJsonl, content_config.github, search_config.asymmetric, regenerate=True)
|
||||
|
||||
# Assert
|
||||
|
|
Loading…
Add table
Reference in a new issue