Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ This file provides another way to configure your models and credentials.
#### Custom Reasoning Pipeline

1. Check the default pipeline implementation in [here](libs/ktem/ktem/reasoning/simple.py). You can make quick adjustment to how the default QA pipeline work.
2. Add new `.py` implementation in `libs/ktem/ktem/reasoning/` and later include it in `flowssettings` to enable it on the UI.
2. Add new `.py` implementation in `libs/ktem/ktem/reasoning/` and later include it in `flowsettings` to enable it on the UI.

#### Custom Indexing Pipeline

Expand Down
4 changes: 2 additions & 2 deletions docs/pages/app/customize-flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ information panel.
You can access users' collections of LLMs and embedding models with:

```python
from ktem.embeddings.manager import embeddings
from ktem.embeddings.manager import embedding_models_manager as embeddings
from ktem.llms.manager import llms


Expand All @@ -213,7 +213,7 @@ models they want to use through the settings.
"citation_llm": {
"name": "LLM for citation",
"value": llms.get_default(),
"component: "dropdown",
"component": "dropdown",
"choices": list(llms.options().keys()),
},
...
Expand Down
2 changes: 1 addition & 1 deletion libs/kotaemon/kotaemon/embeddings/langchain_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class LCEmbeddingMixin:
def _get_lc_class(self):
raise NotImplementedError(
"Please return the relevant Langchain class in in _get_lc_class"
"Please return the relevant Langchain class in _get_lc_class"
)

def __init__(self, **params):
Expand Down
2 changes: 1 addition & 1 deletion libs/kotaemon/kotaemon/llms/chats/langchain_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class LCChatMixin:

def _get_lc_class(self):
raise NotImplementedError(
"Please return the relevant Langchain class in in _get_lc_class"
"Please return the relevant Langchain class in _get_lc_class"
)

def _get_tool_call_kwargs(self):
Expand Down
2 changes: 1 addition & 1 deletion libs/kotaemon/kotaemon/llms/completions/langchain_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class LCCompletionMixin:
def _get_lc_class(self):
raise NotImplementedError(
"Please return the relevant Langchain class in in _get_lc_class"
"Please return the relevant Langchain class in _get_lc_class"
)

def __init__(self, **params):
Expand Down
2 changes: 1 addition & 1 deletion libs/kotaemon/kotaemon/loaders/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _get_wrapped_class(self) -> Type["BaseReader"]:

def _get_wrapped_class(self) -> Type["LIBaseReader"]:
raise NotImplementedError(
"Please return the relevant llama-index class in in _get_wrapped_class"
"Please return the relevant llama-index class in _get_wrapped_class"
)

def __init__(self, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion libs/kotaemon/kotaemon/storages/vectorstores/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class LlamaIndexVectorStore(BaseVectorStore):

def _get_li_class(self):
raise NotImplementedError(
"Please return the relevant LlamaIndex class in in _get_li_class"
"Please return the relevant LlamaIndex class in _get_li_class"
)

def __init__(self, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion libs/ktem/ktem/embeddings/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def check_connection(self, selected_emb_name, selected_spec):
emb = deserialize(info["spec"], safe=False)

if emb is None:
raise Exception(f"Can not found model: {selected_emb_name}")
raise Exception(f"Cannot find model: {selected_emb_name}")

log_content += "- Sending a message `Hi`<br>"
yield log_content
Expand Down
2 changes: 1 addition & 1 deletion libs/ktem/ktem/index/file/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ def index_fn(
n_successes = len([_ for _ in results if _])
if n_successes:
gr.Info(f"Successfully index {n_successes} files")
n_errors = len([_ for _ in errors if _])
n_errors = len([_ for _ in index_errors if _])
if n_errors:
gr.Warning(f"Have errors for {n_errors} files")

Expand Down
2 changes: 1 addition & 1 deletion libs/ktem/ktem/llms/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def check_connection(self, selected_llm_name: str, selected_spec):
llm = deserialize(info["spec"], safe=False)

if llm is None:
raise Exception(f"Can not found model: {selected_llm_name}")
raise Exception(f"Cannot find model: {selected_llm_name}")

log_content += "- Sending a message `Hi`<br>"
yield log_content
Expand Down
4 changes: 2 additions & 2 deletions libs/ktem/ktem/rerankings/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def check_connection(self, selected_rerank_name, selected_spec):
rerank = deserialize(info["spec"], safe=False)

if rerank is None:
raise Exception(f"Can not found model: {selected_rerank_name}")
raise Exception(f"Cannot find model: {selected_rerank_name}")

log_content += "- Sending a message ([`Hello`], `Hi`)<br>"
yield log_content
Expand All @@ -369,7 +369,7 @@ def check_connection(self, selected_rerank_name, selected_spec):
)
yield log_content

gr.Info(f"Embedding {selected_rerank_name} connect successfully")
gr.Info(f"Reranking model {selected_rerank_name} connect successfully")
except Exception as e:
print(e)
log_content += (
Expand Down
2 changes: 1 addition & 1 deletion scripts/run_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ function install_miniconda() {
# if miniconda has not been installed, download and install it
if ! "${conda_root}/bin/conda" --version &>/dev/null; then
if [ ! -d "$install_dir/miniconda_installer.sh" ]; then
echo "Downloading Miniconda from $miniconda_url"
local miniconda_url="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-${sys_arch}.sh"
echo "Downloading Miniconda from $miniconda_url"

mkdir -p "$install_dir"
curl -Lk "$miniconda_url" >"$install_dir/miniconda_installer.sh"
Expand Down