mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
Rename search_types to search_type to standardize to singular naming
Using singular names for other directories in application already - processor instead of processors - interface instead of interfaces
This commit is contained in:
parent
19d6678eb1
commit
9703afb814
5 changed files with 3 additions and 3 deletions
2
main.py
2
main.py
|
@ -1,6 +1,6 @@
|
|||
from typing import Optional
|
||||
from fastapi import FastAPI
|
||||
from search_types import asymmetric
|
||||
from search_type import asymmetric
|
||||
import argparse
|
||||
import pathlib
|
||||
import uvicorn
|
||||
|
|
|
@ -40,10 +40,10 @@ def extract_entries(notesfile, verbose=False):
|
|||
return entries
|
||||
|
||||
|
||||
def compute_embeddings(entries, bi_encoder, embeddings_file, verbose=False):
|
||||
def compute_embeddings(entries, bi_encoder, embeddings_file, regenerate=False, verbose=False):
|
||||
"Compute (and Save) Embeddings or Load Pre-Computed Embeddings"
|
||||
# Load pre-computed embeddings from file if exists
|
||||
if embeddings_file.exists():
|
||||
if embeddings_file.exists() and not regenerate:
|
||||
corpus_embeddings = torch.load(get_absolute_path(embeddings_file))
|
||||
if verbose:
|
||||
print(f"Loaded embeddings from {embeddings_file}")
|
Loading…
Reference in a new issue