💡 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
davidmezzettide15603ce316
diff --git a/src/python/txtai/api/routers/labels.py b/src/python/txtai/api/routers/labels.pyindex 568b7bfd..057ba940 100644--- a/src/python/txtai/api/routers/labels.py+++ b/src/python/txtai/api/routers/labels.py@@ -16,9 +16,11 @@ def label(text: str = Body(...), labels: List[str] = Body(...)):"""Applies a zero shot classifier to text using a list of labels. Returns a list of{id: value, score: value} sorted by highest score, where id is the index in labels.+Args:text: input textlabels: list of labels+Returns:list of {id: value, score: value} per text element"""@@ -32,9 +34,11 @@ def batchlabel(texts: List[str] = Body(...), labels: List[str] = Body(...)):Applies a zero shot classifier to list of text using a list of labels. Returns a list of{id: value, score: value} sorted by highest score, where id is the index in labels pertext element.+Args:texts: list of textlabels: list of labels+Returns:list of {id: value score: value} per text element"""diff --git a/src/python/txtai/api/routers/segmentation.py b/src/python/txtai/api/routers/segmentation.pyindex 778355e7..37ef3fcd 100644--- a/src/python/txtai/api/routers/segmentation.py+++ b/src/python/txtai/api/routers/segmentation.py@@ -14,7 +14,7 @@ router = APIRouter()@router.get("/segment")def segment(text: str):"""- Segments input text.+ Segments text into semantic units.Args:text: input text@@ -29,10 +29,10 @@ def segment(text: str):@router.post("/batchsegment")def batchsegment(texts: List[str] = Body(...)):"""- Extracts text from a file at path.+ Segments text into semantic units.Args:- text: list of texts to segment+ texts: list of texts to segmentReturns:list of segmented textdiff --git a/src/python/txtai/api/routers/transcription.py b/src/python/txtai/api/routers/transcription.pyindex e187590b..4e1f5747 100644--- a/src/python/txtai/api/routers/transcription.py+++ b/src/python/txtai/api/routers/transcription.py@@ -20,7 +20,7 @@ def transcribe(file: str):file: file to transcribeReturns:- list of transcribed text+ transcribed text"""return application.get().pipeline("transcription", (file,))@@ -32,7 +32,7 @@ def batchtranscribe(files: List[str] = Body(...)):Transcribes audio files to text.Args:- file: list of files to transcribe+ files: list of files to transcribeReturns:list of transcribed text