> ## 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.

# I/O nodes

> Pass data into and out of a pipeline and work with files.

Add these nodes with the pipeline builder: `pipeline.add(name="...").<node>(...)`. Each entry lists the node's configuration parameters. See the [Pipeline reference](/sdk/pipeline/reference) for `add`, `run`, and lifecycle methods.

## `append_files`

Append files together in successive fashion

<CodeGroup>
  ```python Sync theme={"languages":{}}
  pipeline.add(name="node").append_files()
  ```
</CodeGroup>

**Parameters**

<ParamField path="file_type" type="str" default="'PDF'">
  One of: `PDF`, `PPTX`
</ParamField>

<ParamField path="selected_files" type="AcceptsFileList" default="[]" />

## `file`

Load a static file into the workflow as a raw File or process it into Text.

<Info>Platform docs: [Load a static file into the workflow as a raw File or process it into Text.](/nodes/file/overview)</Info>

<CodeGroup>
  ```python Sync theme={"languages":{}}
  pipeline.add(name="node").file(file_name="...", file=...)
  ```
</CodeGroup>

**Parameters**

<ParamField path="selected_option" type="str" default="'upload'">
  Select an existing file from the VectorShift platform
  One of: `name`, `upload`
</ParamField>

<ParamField path="file_name" type="str" required>
  The name of the file from the VectorShift platform (for files on the File tab)
</ParamField>

<ParamField path="file_parser" type="str" default="'default'">
  The processing model with which the document will be processed. Default processing model includes standard document parsing / OCR. Llamaparse will allow for ability to read documents with complex features (e.g., tables, charts, etc.). Llamaparse will be charged at 0.3 cents per page. Textract for most advanced data extraction and will be charged at 1.5 cents per page.
  One of: `contextual_ai`, `default`, `docling`, `llama_parse`, `mistral_ocr`, `reducto`, `textract`
</ParamField>

<ParamField path="file" type="AcceptsFile" required>
  The file that was passed in
</ParamField>

## `file_operations`

Process and manipulate files

<CodeGroup>
  ```python Sync theme={"languages":{}}
  pipeline.add(name="node").file_operations()
  ```
</CodeGroup>

**Parameters**

<ParamField path="sub_type" type="str" default="''" />

## `file_save`

Save a file on the VectorShift platform (under the 'Files' tab).

<Info>Platform docs: [Save a file on the VectorShift platform (under the 'Files' tab).](/nodes/file-save/overview)</Info>

<CodeGroup>
  ```python Sync theme={"languages":{}}
  pipeline.add(name="node").file_save(files=..., name="...")
  ```
</CodeGroup>

**Parameters**

<ParamField path="files" type="AcceptsFileList" required />

<ParamField path="name" type="str" required />

## `file_to_text`

Convert data from type File to type Text

<CodeGroup>
  ```python Sync theme={"languages":{}}
  pipeline.add(name="node").file_to_text(file=...)
  ```
</CodeGroup>

**Parameters**

<ParamField path="chunk_text" type="bool" default="False">
  Whether to chunk the text into smaller pieces.
</ParamField>

<ParamField path="decrypt" type="bool" default="False">
  Use a password to decrypt the file.
</ParamField>

<ParamField path="file" type="AcceptsFile" required>
  The file to convert to text.
</ParamField>

<ParamField path="file_parser" type="str" default="'default'">
  The type of file parser to use.
  One of: `contextual_ai`, `default`, `docling`, `llama_parse`, `mistral_ocr`, `reducto`, `textract`
</ParamField>

<ParamField path="password" type="str" default="''">
  The password to decrypt the file.
</ParamField>

<ParamField path="chunk_overlap" type="int" default="400">
  The overlap of each chunk of text.
</ParamField>

<ParamField path="chunk_size" type="int" default="1024">
  The size of each chunk of text.
</ParamField>

## `get_run_data`

Fetch run metrics (trace, latency, cost, tokens, status) for a session

<Info>Platform docs: [Fetch run metrics (trace, latency, cost, tokens, status) for a session](/nodes/get-run-data/overview)</Info>

<CodeGroup>
  ```python Sync theme={"languages":{}}
  pipeline.add(name="node").get_run_data(session_id="...")
  ```
</CodeGroup>

**Parameters**

<ParamField path="session_id" type="str" required />

## `input`

Pass data of different types into your workflow

<Info>Platform docs: [Pass data of different types into your workflow](/nodes/input/overview)</Info>

<CodeGroup>
  ```python Sync theme={"languages":{}}
  pipeline.add(name="node").input()
  ```
</CodeGroup>

**Parameters**

<ParamField path="input_type" type="str" default="'string'">
  Raw Text

  <Expandable title="Allowed values">
    `agent`, `audio`, `bool`, `dataframe`, `file`, `float`, `image`, `int32`, `knowledge_base`, `pipeline`, `string`, `table`, `timestamp`, `vec&lt;file&gt;`, `vec&lt;string&gt;`, `vec&lt;vec&lt;file&gt;&gt;`, `vec&lt;vec&lt;string&gt;&gt;`
  </Expandable>
</ParamField>

<ParamField path="use_default_value" type="bool" default="False">
  Set default value to be used if no value is provided
</ParamField>

<ParamField path="description" type="str" default="''">
  The input description. If pipeline is used as a tool in an agent, the description will be passed to the agent to help the agent know how to fill this input.
</ParamField>

<ParamField path="default_value" type="AcceptsAgent | AcceptsAudio | AcceptsDataframe | AcceptsFile | AcceptsFileList | AcceptsImage | AcceptsKnowledgeBase | AcceptsPipeline | AcceptsTable | AcceptsTimestamp | ListType | bool | float | int | list[AcceptsFileList] | list[list[str]] | list[str] | str" default="{}">
  The default value to be used if no value is provided
</ParamField>

<ParamField path="dataframe_type" type="str" default="'table'">
  The type of dataframe to be used
  One of: `csv`, `dataframe_file`, `json`, `md`, `sql`, `table`
</ParamField>

<ParamField path="file_parser" type="str" default="'default'">
  The processing model with which the document will be processed. Default processing model includes standard document parsing / OCR. Llamaparse will allow for ability to read documents with complex features (e.g., tables, charts, etc.). Llamaparse will be charged at 0.3 cents per page. Textract for most advanced data extraction and will be charged at 1.5 cents per page. Reducto enables rich structured parsing.
  One of: `contextual_ai`, `default`, `docling`, `llama_parse`, `mistral_ocr`, `reducto`, `textract`
</ParamField>

## `output`

Output data of different types from your workflow.

<Info>Platform docs: [Output data of different types from your workflow.](/nodes/output/overview)</Info>

<CodeGroup>
  ```python Sync theme={"languages":{}}
  pipeline.add(name="node").output(value=...)
  ```
</CodeGroup>

**Parameters**

<ParamField path="output_type" type="str" default="'string'">
  <Expandable title="Allowed values">
    `audio`, `bool`, `dataframe`, `file`, `float`, `image`, `int32`, `json`, `stream&lt;string&gt;`, `string`, `timestamp`, `vec&lt;file&gt;`
  </Expandable>
</ParamField>

<ParamField path="description" type="str" default="''">
  The output description. If pipeline is used as a tool in an agent, the description will be passed to the agent to help the agent know how to fill this output.
</ParamField>

<ParamField path="format_output" type="bool" default="True" />

<ParamField path="value" type="AcceptsAudio | AcceptsDataframe | AcceptsFile | AcceptsFileList | AcceptsImage | AcceptsStream | AcceptsTimestamp | bool | float | int | str" required />

<ParamField path="dataframe_type" type="str" default="'table'">
  The type of dataframe to be used
  One of: `csv`, `dataframe_file`, `json`, `md`, `sql`, `table`
</ParamField>

## `rename_file`

Rename an existing file, assigning a new name along with the file extension.

<CodeGroup>
  ```python Sync theme={"languages":{}}
  pipeline.add(name="node").rename_file(file=..., new_name="...")
  ```
</CodeGroup>

**Parameters**

<ParamField path="file" type="AcceptsFile" required />

<ParamField path="new_name" type="str" required />

## `text`

Accepts Text from upstream nodes and allows you to write additional text / concatenate different texts to pass to downstream nodes.

<CodeGroup>
  ```python Sync theme={"languages":{}}
  pipeline.add(name="node").text(text="...")
  ```
</CodeGroup>

**Parameters**

<ParamField path="text" type="str" required />

## `text_to_file`

Convert data from type Text to type File.

<CodeGroup>
  ```python Sync theme={"languages":{}}
  pipeline.add(name="node").text_to_file(text="...", file_name="...")
  ```
</CodeGroup>

**Parameters**

<ParamField path="text" type="str" required />

<ParamField path="file_name" type="str" required />

<ParamField path="file_type" type="str" default="'PDF'">
  One of: `DOCX`, `PDF`, `TXT`
</ParamField>
