💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Fix typos in docstrings, comments and docs (#1486)
sarankumare83b53fe2a67
diff --git a/docs/embeddings/index.md b/docs/embeddings/index.mdindex 40145e96..d1ca65ce 100644--- a/docs/embeddings/index.md+++ b/docs/embeddings/index.md@@ -51,7 +51,7 @@ The example above sets a specific embeddings vector model via the [path](configuembeddings = Embeddings()```-In this case, when loading and searching for data, the [default transformers vector model](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) is used to vectorize data. See the [model guide](../models) for current model recommentations.+In this case, when loading and searching for data, the [default transformers vector model](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) is used to vectorize data. See the [model guide](../models) for current model recommendations.## Indexdiff --git a/docs/workflow/task/index.md b/docs/workflow/task/index.mdindex a532085e..0c89865b 100644--- a/docs/workflow/task/index.md+++ b/docs/workflow/task/index.md@@ -3,7 +3,7 @@-Workflows execute tasks. Tasks are callable objects with a number of parameters to control the processing of data at a given step. While similar to pipelines, tasks encapsulate processing and don't perform signficant transformations on their own. Tasks perform logic to prepare content for the underlying action(s).+Workflows execute tasks. Tasks are callable objects with a number of parameters to control the processing of data at a given step. While similar to pipelines, tasks encapsulate processing and don't perform significant transformations on their own. Tasks perform logic to prepare content for the underlying action(s).A simple task is shown below.diff --git a/examples/rag_quickstart.py b/examples/rag_quickstart.pyindex 9db9603d..64468b5b 100644--- a/examples/rag_quickstart.py+++ b/examples/rag_quickstart.py@@ -19,7 +19,7 @@ from txtai.pipeline import Textractor# Step 1: Collect files from local directory#-# Defaults to "data". Set to whereever your files are.+# Defaults to "data". Set to wherever your files are.path = "data"files = [os.path.join(path, f) for f in os.listdir(path) if os.path.isfile(os.path.join(path, f))]diff --git a/src/python/txtai/agent/model.py b/src/python/txtai/agent/model.pyindex 623cfaa3..a3f0be4b 100644--- a/src/python/txtai/agent/model.py+++ b/src/python/txtai/agent/model.py@@ -96,7 +96,7 @@ class PipelineModel(Model):# Get clean message listmessages = get_clean_message_list(messages, role_conversions=tool_role_conversions, flatten_messages_as_text=self.flatten_messages_as_text)- # Ensure all roles are strings and not enums for compability across LLM frameworks+ # Ensure all roles are strings and not enums for compatibility across LLM frameworksfor message in messages:if "role" in message:message["role"] = message["role"].value if isinstance(message["role"], Enum) else message["role"]diff --git a/src/python/txtai/agent/tool/skill.py b/src/python/txtai/agent/tool/skill.pyindex 04fa764e..4143e994 100644--- a/src/python/txtai/agent/tool/skill.py+++ b/src/python/txtai/agent/tool/skill.py@@ -40,7 +40,7 @@ class SkillTool(Tool):# pylint: disable=W0221def forward(self, request):"""- Searchs the skill markdown for the best answer.+ Searches the skill markdown for the best answer.Args:request: user requestdiff --git a/src/python/txtai/ann/dense/ggml.py b/src/python/txtai/ann/dense/ggml.pyindex 7b5ca42f..d8d0fa18 100644--- a/src/python/txtai/ann/dense/ggml.py+++ b/src/python/txtai/ann/dense/ggml.py@@ -595,7 +595,7 @@ class GGMLTensors:def chunk(self, queries):"""- Splits quries into separate batch sizes specified by size.+ Splits queries into separate batch sizes specified by size.Args:queries: queriesdiff --git a/src/python/txtai/database/base.py b/src/python/txtai/database/base.pyindex 04a51d80..18f7e7c0 100644--- a/src/python/txtai/database/base.py+++ b/src/python/txtai/database/base.py@@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)class Database:"""Base class for database instances. This class encapsulates a content database used for- storing field content as dicts and objects. The database instance works in conjuction+ storing field content as dicts and objects. The database instance works in conjunctionwith a vector index to execute SQL-driven similarity search."""diff --git a/src/python/txtai/embeddings/index/autoid.py b/src/python/txtai/embeddings/index/autoid.pyindex 8ecb3728..cd150357 100644--- a/src/python/txtai/embeddings/index/autoid.py+++ b/src/python/txtai/embeddings/index/autoid.py@@ -72,7 +72,7 @@ class AutoId:Generates a UUID and return as a string.Args:- data: used with determistic algorithms (uuid3, uuid5)+ data: used with deterministic algorithms (uuid3, uuid5)Returns:UUID stringdiff --git a/src/python/txtai/graph/base.py b/src/python/txtai/graph/base.pyindex 17fd5e28..f1c214be 100644--- a/src/python/txtai/graph/base.py+++ b/src/python/txtai/graph/base.py@@ -531,7 +531,7 @@ class Graph:# Set graph if available, otherwise create a new empty graph of the same typegraph = graph if graph else type(self)(self.config)- # Initalize subgraph+ # Initialize subgraphgraph.initialize()nodeids = {node[0] if isinstance(node, tuple) else node for node in nodes}diff --git a/src/python/txtai/graph/query.py b/src/python/txtai/graph/query.pyindex baf08918..93315be1 100644--- a/src/python/txtai/graph/query.py+++ b/src/python/txtai/graph/query.py@@ -151,7 +151,7 @@ class Query:attribute = f"match_{x}"clause = f"{node}.{attribute} > 0"- # Replace placeholder with earch results+ # Replace placeholder with search resultsquery = query.replace(f"{Query.SIMILAR}{x}", f"{clause}")# Add uids and scoresdiff --git a/src/python/txtai/pipeline/audio/signal.py b/src/python/txtai/pipeline/audio/signal.pyindex a3e0a245..1ae6c920 100644--- a/src/python/txtai/pipeline/audio/signal.py+++ b/src/python/txtai/pipeline/audio/signal.py@@ -54,7 +54,7 @@ class Signal:# Transpose audioaudio = audio.T- # Resample audio and tranpose back+ # Resample audio and transpose backsamples = round(len(audio) * float(target) / rate)audio = signal.resample(audio, samples).T@@ -163,7 +163,7 @@ class Signal:rate: sample ratethreshold: energy below this level will be considered silence, defaults to 1.0leading: trim leading silence, defaults to True- trailing: trim trailing silence, defauls to True+ trailing: trim trailing silence, defaults to TrueReturns:audio with silence removeddiff --git a/src/python/txtai/pipeline/llm/huggingface.py b/src/python/txtai/pipeline/llm/huggingface.pyindex b54d2b9a..1a8f2f3d 100644--- a/src/python/txtai/pipeline/llm/huggingface.py+++ b/src/python/txtai/pipeline/llm/huggingface.py@@ -137,7 +137,7 @@ class HFLLM(HFPipeline):# Set parameters for vision models and returnif self.pipeline.task == "image-text-to-text":- # Maxlength has to be large enough to accomodate images+ # Maxlength has to be large enough to accommodate imagesdefaults["max_length"] = max(maxlength, 2048)# Set default token iddiff --git a/src/python/txtai/pipeline/text/crossencoder.py b/src/python/txtai/pipeline/text/crossencoder.pyindex 108cbdb7..c41f8c7e 100644--- a/src/python/txtai/pipeline/text/crossencoder.py+++ b/src/python/txtai/pipeline/text/crossencoder.py@@ -82,7 +82,7 @@ class CrossEncoder(Labels):def function(self, scores, multilabel):"""- Applys an output transformation function based on value of multilabel.+ Applies an output transformation function based on value of multilabel.Args:scores: input scoresdiff --git a/src/python/txtai/scoring/base.py b/src/python/txtai/scoring/base.pyindex 233b557a..d8e7b068 100644--- a/src/python/txtai/scoring/base.py+++ b/src/python/txtai/scoring/base.py@@ -63,7 +63,7 @@ class Scoring:def upsert(self, documents=None):"""- Convience method for API clarity. Calls index method.+ Convenience method for API clarity. Calls index method.Args:documents: list of (id, dict|text|tokens, tags)diff --git a/src/python/txtai/scoring/terms.py b/src/python/txtai/scoring/terms.pyindex 87597375..a96dda6a 100644--- a/src/python/txtai/scoring/terms.py+++ b/src/python/txtai/scoring/terms.py@@ -461,7 +461,7 @@ class Terms:results = []for term in terms:- # Wilcard expressions+ # Wildcard expressionsif Terms.ASTERISK in term:# Require a prefix or suffixif term.replace(Terms.ASTERISK, "").strip():