💡 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
Update documentation
davidmezzettiaf9ac030d9bd
diff --git a/docs/embeddings/configuration.md b/docs/embeddings/configuration.mdindex 12fe0031..927c1c63 100644--- a/docs/embeddings/configuration.md+++ b/docs/embeddings/configuration.md@@ -148,6 +148,18 @@ tokenize: booleanEnables string tokenization (defaults to false). This method applies tokenization rules that only work with English language text and may increase the quality ofEnglish language sentence embeddings in some situations.+### query+```yaml+query:+ path: Sets the path for the query model. This can be any model on the+ [Hugging Face Model Hub](https://huggingface.co/models) or+ a local file path.+ prefix: text prefix to prepend to all inputs+ maxlength: maximum generated sequence length+```++Query translation model. Translates natural language queries to txtai compatible SQL statements.+## CloudThis section describes parameters used to sync compressed indexes with cloud storage. These parameters are only enabled if an embeddings index is stored as compressed. They are set via the [embeddings.load](../methods/#txtai.embeddings.base.Embeddings.load) and [embeddings.save](../methods/#txtai.embeddings.base.Embeddings.save) methods.diff --git a/docs/pipeline/index.md b/docs/pipeline/index.mdindex b90e3589..afc21155 100644--- a/docs/pipeline/index.md+++ b/docs/pipeline/index.md@@ -25,6 +25,7 @@ The following is a list of the default pipelines available in txtai.- [Entity](text/entity)- [Extractive QA](text/extractor)- [Labeling](text/labels)+ - [Sequences](text/sequences)- [Similarity](text/similarity)- [Summary](text/summary)- [Translation](text/translation)diff --git a/docs/pipeline/text/sequences.md b/docs/pipeline/text/sequences.mdnew file mode 100644index 00000000..6944ea0e--- /dev/null+++ b/docs/pipeline/text/sequences.md@@ -0,0 +1,62 @@+# Sequences+++++The sequences pipeline runs text through a sequence-sequence model and generates output text.++## Example++The following shows a simple example using this pipeline.++```python+from txtai.pipeline import Sequences++# Create and run pipeline+sequences = Sequences()+sequences("translate English to French: Hello, how are you?")+```++## Configuration-driven example++Pipelines are run with Python or configuration. Pipelines can be instantiated in [configuration](../../../api/configuration/#pipeline) using the lower case name of the pipeline. Configuration-driven pipelines are run with [workflows](../../../workflow/#configuration-driven-example) or the [API](../../../api#local-instance).++### config.yml+```yaml+# Create pipeline using lower case class name+sequences:++# Run pipeline with workflow+workflow:+ sequences:+ tasks:+ - action: sequences+```++### Run with Workflows++```python+from txtai.app import Application++# Create and run pipeline with workflow+app = Application("config.yml")+list(app.workflow("sequences", ["translate English to French: Hello, how are you?"]))+```++### Run with API++```bash+CONFIG=config.yml uvicorn "txtai.api:app" &++curl \+ -X POST "http://localhost:8000/workflow" \+ -H "Content-Type: application/json" \+ -d '{"name":"sequences", "elements": ["translate English to French: Hello, how are you?"]}'+```++## Methods++Python documentation for the pipeline.++### ::: txtai.pipeline.Sequences.__init__+### ::: txtai.pipeline.Sequences.__call__diff --git a/mkdocs.yml b/mkdocs.ymlindex a5e29ffd..7dadf850 100644--- a/mkdocs.yml+++ b/mkdocs.yml@@ -70,6 +70,7 @@ nav:- Entity: pipeline/text/entity.md- Extractor: pipeline/text/extractor.md- Labels: pipeline/text/labels.md+ - Sequences: pipeline/text/sequences.md- Similarity: pipeline/text/similarity.md- Summary: pipeline/text/summary.md- Translation: pipeline/text/translation.md