> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/guardrails/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/guardrails/_mcp/server.

# nemoguardrails.llm.completion_parsing

Text helpers for interpreting raw LLM completions.

Pure string transformations with no Colang, event, or configuration dependency, so
they can be used from a rail action that runs without a Colang runtime.

The completion parsers that do depend on Colang intent/action vocabulary stay in
`nemoguardrails.actions.llm.utils`.

## Module Contents

### Functions

| Name                                                                                                          | Description                                                                     |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [`get_multiline_response`](#nemoguardrails-llm-completion_parsing-get_multiline_response)                     | Helper that extracts multi-line responses from the LLM.                         |
| [`remove_action_intent_identifiers`](#nemoguardrails-llm-completion_parsing-remove_action_intent_identifiers) | Removes the action/intent identifiers.                                          |
| [`strip_quotes`](#nemoguardrails-llm-completion_parsing-strip_quotes)                                         | Helper that removes quotes from a string if the entire string is between quotes |

### API

```python
nemoguardrails.llm.completion_parsing.get_multiline_response(
    s: str
) -> str
```

Helper that extracts multi-line responses from the LLM.
Stopping conditions: when a non-empty line ends with a quote or when the token "user" appears after a newline.
Empty lines at the begging of the string are skipped.

```python
nemoguardrails.llm.completion_parsing.remove_action_intent_identifiers(
    lines: typing.List[str]
) -> typing.List[str]
```

Removes the action/intent identifiers.

```python
nemoguardrails.llm.completion_parsing.strip_quotes(
    s: str
) -> str
```

Helper that removes quotes from a string if the entire string is between quotes