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.
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)
Source: examples/pipelines/llm_pipeline.py in the SDK repo.