Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Update documentation to use base imports, closes #765

davidmezzetti6e7ddcfc03cd
diff --git a/docs/embeddings/configuration/index.md b/docs/embeddings/configuration/index.md
index 5a6762a5..be21a7c9 100644
--- a/docs/embeddings/configuration/index.md
+++ b/docs/embeddings/configuration/index.md
@@ -5,7 +5,7 @@ The following describes available embeddings configuration. These parameters are
Configuration is designed to be optional and set only when needed. Out of the box, sensible defaults are picked to get up and running fast. For example:
```python
-from txtai.embeddings import Embeddings
+from txtai import Embeddings
embeddings = Embeddings()
```
@@ -13,7 +13,7 @@ embeddings = Embeddings()
Creates a new embeddings instance, using [all-MiniLM-L6-v2](https://hf.co/sentence-transformers/all-MiniLM-L6-v2) as the vector model, [Faiss](https://faiss.ai/) as the ANN index backend and content disabled.
```python
-from txtai.embeddings import Embeddings
+from txtai import Embeddings
embeddings = Embeddings(content=True)
```
diff --git a/docs/faq.md b/docs/faq.md
index 85ef73af..293385c5 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -48,7 +48,7 @@ Embeddings example.
```python
from transformers import AutoModel, AutoTokenizer
-from txtai.embeddings import Embeddings
+from txtai import Embeddings
# Load model externally
model = AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
@@ -64,7 +64,7 @@ LLM pipeline example.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
-from txtai.pipeline import LLM
+from txtai import LLM
# Load Mistral-7B-OpenOrca
path = "Open-Orca/Mistral-7B-OpenOrca"
diff --git a/docs/pipeline/audio/texttospeech.md b/docs/pipeline/audio/texttospeech.md
index 735f104c..0278eea1 100644
--- a/docs/pipeline/audio/texttospeech.md
+++ b/docs/pipeline/audio/texttospeech.md
@@ -47,7 +47,7 @@ workflow:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/audio/transcription.md b/docs/pipeline/audio/transcription.md
index 9430b91d..0bac848e 100644
--- a/docs/pipeline/audio/transcription.md
+++ b/docs/pipeline/audio/transcription.md
@@ -42,7 +42,7 @@ workflow:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/data/segmentation.md b/docs/pipeline/data/segmentation.md
index bda5c2ba..27a855ca 100644
--- a/docs/pipeline/data/segmentation.md
+++ b/docs/pipeline/data/segmentation.md
@@ -37,7 +37,7 @@ workflow:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/data/tabular.md b/docs/pipeline/data/tabular.md
index 1f043db4..f0d8aaf0 100644
--- a/docs/pipeline/data/tabular.md
+++ b/docs/pipeline/data/tabular.md
@@ -45,7 +45,7 @@ workflow:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/data/textractor.md b/docs/pipeline/data/textractor.md
index 50b4b6b8..6fc7fc99 100644
--- a/docs/pipeline/data/textractor.md
+++ b/docs/pipeline/data/textractor.md
@@ -50,7 +50,7 @@ workflow:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/image/caption.md b/docs/pipeline/image/caption.md
index 3aa1d513..0d89aad7 100644
--- a/docs/pipeline/image/caption.md
+++ b/docs/pipeline/image/caption.md
@@ -42,7 +42,7 @@ workflow:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/image/imagehash.md b/docs/pipeline/image/imagehash.md
index 67db5c6b..e56524f8 100644
--- a/docs/pipeline/image/imagehash.md
+++ b/docs/pipeline/image/imagehash.md
@@ -42,7 +42,7 @@ workflow:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/image/objects.md b/docs/pipeline/image/objects.md
index b6d0768f..83ddbe65 100644
--- a/docs/pipeline/image/objects.md
+++ b/docs/pipeline/image/objects.md
@@ -42,7 +42,7 @@ workflow:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/text/entity.md b/docs/pipeline/text/entity.md
index a27553e9..33e7a08a 100644
--- a/docs/pipeline/text/entity.md
+++ b/docs/pipeline/text/entity.md
@@ -43,7 +43,7 @@ workflow:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/text/labels.md b/docs/pipeline/text/labels.md
index 0417c79b..49923d4c 100644
--- a/docs/pipeline/text/labels.md
+++ b/docs/pipeline/text/labels.md
@@ -46,7 +46,7 @@ workflow:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/text/llm.md b/docs/pipeline/text/llm.md
index 2e72e760..8ec6a4b6 100644
--- a/docs/pipeline/text/llm.md
+++ b/docs/pipeline/text/llm.md
@@ -123,7 +123,7 @@ llm:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/text/rag.md b/docs/pipeline/text/rag.md
index a645202c..00bc9c13 100644
--- a/docs/pipeline/text/rag.md
+++ b/docs/pipeline/text/rag.md
@@ -12,8 +12,7 @@ The data store can be an embeddings database or a similarity instance with assoc
The following shows a simple example using this pipeline.
```python
-from txtai import Embeddings
-from txtai import RAG
+from txtai import Embeddings, RAG
# Input data
data = [
@@ -98,7 +97,7 @@ workflow:
Built in tasks make using the extractor pipeline easier.
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/text/similarity.md b/docs/pipeline/text/similarity.md
index 63bc2014..8085b3d0 100644
--- a/docs/pipeline/text/similarity.md
+++ b/docs/pipeline/text/similarity.md
@@ -43,7 +43,7 @@ similarity:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/text/summary.md b/docs/pipeline/text/summary.md
index 53abdffd..27842400 100644
--- a/docs/pipeline/text/summary.md
+++ b/docs/pipeline/text/summary.md
@@ -42,7 +42,7 @@ workflow:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/pipeline/text/translation.md b/docs/pipeline/text/translation.md
index b3499163..80673456 100644
--- a/docs/pipeline/text/translation.md
+++ b/docs/pipeline/text/translation.md
@@ -43,7 +43,7 @@ workflow:
### Run with Workflows
```python
-from txtai.app import Application
+from txtai import Application
# Create and run pipeline with workflow
app = Application("config.yml")
diff --git a/docs/workflow/index.md b/docs/workflow/index.md
index 480dcac3..ee540805 100644
--- a/docs/workflow/index.md
+++ b/docs/workflow/index.md
@@ -38,7 +38,7 @@ Workflows are run with Python or configuration. Examples of both methods are sho
A full-featured example is shown below in Python. This workflow transcribes a set of audio files, translates the text into French and indexes the data.
```python
-from txtai.embeddings import Embeddings
+from txtai import Embeddings
from txtai.pipeline import Transcription, Translation
from txtai.workflow import FileTask, Task, Workflow
@@ -108,7 +108,7 @@ workflow:
```python
# Create and run the workflow
-from txtai.app import Application
+from txtai import Application
# Create and run the workflow
app = Application("workflow.yml")
@@ -153,7 +153,7 @@ workflow:
```
```python
-from txtai.app import Application
+from txtai import Application
app = Application("workflow.yml")
list(app.workflow("llm", [
diff --git a/docs/workflow/schedule.md b/docs/workflow/schedule.md
index 1b1f2f2a..c09ed1f7 100644
--- a/docs/workflow/schedule.md
+++ b/docs/workflow/schedule.md
@@ -52,7 +52,7 @@ workflow:
```python
# Create and run the workflow
-from txtai.app import Application
+from txtai import Application
# Create and run the workflow
app = Application("workflow.yml")