Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vectorshift.ai/llms.txt

Use this file to discover all available pages before exploring further.

What this builds. The simplest possible pipeline — one input, one output, no transforms. You’ll end up with. A deployed pipeline named llm_pipeline on your account that echoes its input_node into its output_node, plus the printed run result.
This example is the canonical “first pipeline” used to verify your install and API key. To actually call an LLM, see rag-pipeline (which wires an LLM node behind a knowledge-base reader) or any of the streaming examples — each starts from the same Pipeline.fetch(...) / Pipeline.new(...) idiom shown here.
from os import name
import vectorshift
from vectorshift.pipeline import BumpLevel, Pipeline


# pipeline = Pipeline.fetch(id="69b40ffc29211e33e4956331")
PIPELINE_NAME = "llm_pipeline"
try:
    pipeline = Pipeline.fetch(name=PIPELINE_NAME)
    print(f"Pipeline fetched: id={pipeline.id}, branch_id={pipeline.branch_id}")
except Exception as e:
    print(f"Error fetching pipeline: {e}")
    pipeline = Pipeline.new(name=PIPELINE_NAME)
    print(f"Pipeline created: id={pipeline.id}, branch_id={pipeline.branch_id}")

input_node = pipeline.add(name="input_node", id="input_node").input(input_type="string")
output_node = pipeline.add(name="output_node", id="output_node").output(
    output_type="string", value=input_node.text
)

output = pipeline.save(deploy=True)
print(output)

result = pipeline.run(inputs={"lol": "true"})
print(result)

Expected output

Pipeline created: id=6a0…, branch_id=6a0…
{'status': 'success', ...}
{'outputs': {'output_node': 'true'}, 'status': 'success', 'run_id': '...'}
The first line varies between “Pipeline fetched” and “Pipeline created” depending on whether you’ve run the script before. The output_node value mirrors whatever you pass under the input key in inputs={...}.

See also

RAG pipeline

Add a knowledge-base reader + LLM to this skeleton.

Text processing

A more substantive single-pipeline example.

Pipeline reference

Every method on Pipeline.