-
txtai
💡 All-in-one open-source embeddings database for semantic search, LLM orchestration and language model workflows
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
import {Segmentation, Textractor, Summary, Transcription, Translation, Workflow} from "txtai"; /** * Example pipeline and workflow functionality. * * Uses files from txtai unit tests: https://github.com/neuml/txtai/releases/download/v2.0.0/tests.tar.gz */ const run = async () => { try { let service = "http://localhost:8000" let segment = new Segmentation(service); let sentences = "This is a test. And another test."; console.log("---- Segmented Text ----"); console.log(await segment.segment(sentences)); let textractor = new Textractor(service); let text = await textractor.textract("/tmp/txtai/article.pdf") console.log("\n---- Extracted Text ----"); console.log(text); let summary = new Summary(service); let summarytext = await summary.summary(text); console.log("\n---- Summary Text ----"); console.log(summarytext); let translate = new Translation(service); let translation = await translate.translate(summarytext, "es"); console.log("\n---- Summary Text in Spanish ----"); console.log(translation); let workflow = new Workflow(service); let output = await workflow.workflow("sumspanish", ["file:///tmp/txtai/article.pdf"]); console.log("\n---- Workflow [Extract Text->Summarize->Translate] ----"); console.log(output); let transcribe = new Transcription(service); let transcription = await transcribe.transcribe("/tmp/txtai/Make_huge_profits.wav") console.log("\n---- Transcribed Text ----"); console.log(transcription); } catch (e) { console.trace(e); } }; run();
Related posts
-
txtai 4.0 - semantic search with SQL, content storage, object storage and reindexing in JavaScript
-
txtai 3.0 released - Machine-learning workflows, similarity search and JavaScript support via API
-
txtai: AI-powered search engine for JavaScript
-
What contributing to Open-source is, and what it isn't
-
Build knowledge graphs with LLM-driven entity extraction