Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/project.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "name": "nemo-guardrails-toolkit", "version": "0.14.1" }
{ "name": "nemo-guardrails-toolkit", "version": "0.15.0" }
25 changes: 24 additions & 1 deletion docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,32 @@ For a complete record of changes in a release, refer to the

(v0-15-0-features)=

### Features
### Key Features

- Added parallel execution for input and output rails. To learn more, refer to [](parallel-rails).
- Implemented a new way of configuring tracing. You can now use the OpenTelemetry SDK and the OpenTelemetry Protocol (OTLP) exporter while configuring the NeMo Guardrails clients in your application code directly. To learn more, refer to the [basic tracing configuration guide](tracing-configuration) and the [advanced tracing configuration guide](tracing).
- Updated the streaming capability of output rails to support parallel execution.
- Added support for external async token generators. To learn more, refer to the [](external-async-token-generators) section.

### Breaking Changes

With the new tracing configuration, the following old configuration for tracing in `config.yml` is no longer supported.

```yaml
# No longer supported
tracing:
enabled: true
adapters:
- name: OpenTelemetry
service_name: "my-service"
exporter: "console"
```

To find the new way of configuring tracing, refer to [](tracing-configuration).

### Deprecated Functions

- `register_otel_exporter()` is deprecated and will be removed in v0.16.0. Configure exporters directly in your application instead.

(v0-14-1)=

Expand Down
4 changes: 3 additions & 1 deletion docs/user-guides/advanced/streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ result = await app.generate_async(
print(result)
```

### Using External Token Generators
(external-async-token-generators)=

### Using External Async Token Generators

You can also provide your own async generator that yields tokens, which is useful when:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@ rails:
flows:
- content safety check output $model=content_safety
- self check output
streaming:
enabled: True
chunk_size: 200
context_size: 50
stream_first: True
streaming: True
```

## Retrieval Rails
Expand Down
12 changes: 7 additions & 5 deletions docs/user-guides/configuration-guide/tracing-configuration.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
(tracing-configuration)=

# Tracing Configuration

NeMo Guardrails includes tracing capabilities to monitor and debug your guardrails interactions. Tracing helps you understand:
Expand All @@ -9,7 +11,7 @@ NeMo Guardrails includes tracing capabilities to monitor and debug your guardrai

### Basic Configuration

Enable tracing in your `config.yml`:
To enable tracing in your `config.yml`, add the following configuration.

```yaml
tracing:
Expand All @@ -23,7 +25,7 @@ This configuration logs traces to local JSON files, which is suitable for develo

### OpenTelemetry Integration

For production environments and integration with observability platforms:
For production environments and integration with observability platforms, use the `OpenTelemetry` adapter.

```yaml
tracing:
Expand All @@ -33,11 +35,11 @@ tracing:
```

```{important}
Install tracing dependencies: `pip install nemoguardrails[tracing]`
To use this tracing feature, install tracing dependencies in the NeMo Guardrails SDK by running `pip install nemoguardrails[tracing]`.
```

```{note}
OpenTelemetry integration requires configuring the OpenTelemetry SDK in your application code. NeMo Guardrails follows OpenTelemetry best practices where libraries use only the API and applications configure the SDK. See the [Tracing Guide](/docs/user-guides/tracing/index.md) for detailed setup instructions and examples.
OpenTelemetry integration requires configuring the OpenTelemetry SDK in your application code. NeMo Guardrails follows OpenTelemetry best practices where libraries use only the API and applications configure the SDK. See the [Tracing Guide](tracing) for detailed setup instructions and examples.
```

### Configuration Options
Expand All @@ -47,4 +49,4 @@ OpenTelemetry integration requires configuring the OpenTelemetry SDK in your app
| FileSystem | Development, debugging, simple logging | `filepath: "./logs/traces.jsonl"` |
| OpenTelemetry | Production, monitoring platforms, distributed systems | Requires application-level SDK configuration |

For advanced configuration, custom adapters, and production deployment examples, see the [detailed tracing guide](user-guides/tracing/index.md).
For advanced configuration, custom adapters, and production deployment examples, see the [detailed tracing guide](tracing).
2 changes: 2 additions & 0 deletions docs/user-guides/tracing/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
(tracing)=

# Tracing

Tracing enhances the observability of guardrails execution. This section explains the configuration process for implementing tracing with NeMo Guardrails.
Expand Down
4 changes: 4 additions & 0 deletions docs/versions1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[
{
"preferred": true,
"version": "0.15.0",
"url": "../0.15.0/"
},
{
"version": "0.14.1",
"url": "../0.14.1/"
},
Expand Down