# SmartRealtimeSession

Namespace: **Wisej.AI**

Assembly: **Wisej.AI** (3.5.0.0)

* [SmartObject](/ai/components/api/wisej.ai.smartobject.md)
  * [SmartSession](/ai/components/api/smartsession.md)
    * [SmartRealtimeSession](/ai/components/api/wisej.ai.smartrealtimesession.md)

{% tabs %}
{% tab title="C#" %}

```csharp
public class SmartRealtimeSession : SmartSession
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class SmartRealtimeSession
    Inherits SmartSession
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/ptrKjmmRoQB76pvrIqh0) SmartRealtimeSession(hub, systemPrompt)

Initializes a new instance of the [SmartSession](/ai/components/api/smartsession.md) class with the specified hub and optional system prompt.

| Name             | Type                                             | Description                                                  |
| ---------------- | ------------------------------------------------ | ------------------------------------------------------------ |
| **hub**          | [SmartHub](/ai/components/api/smarthub.md)       | The smart hub associated with the session.                   |
| **systemPrompt** | [SmartPrompt](/ai/components/api/smartprompt.md) | The optional system prompt for the session. Default is null. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)\
  Thrown when the hub is null.

### ![](/files/ptrKjmmRoQB76pvrIqh0) SmartRealtimeSession(endpoint, systemPrompt)

Initializes a new instance of the [SmartSession](/ai/components/api/smartsession.md) class with the specified endpoint and optional system prompt.

| Name             | Type                                                 | Description                                                  |
| ---------------- | ---------------------------------------------------- | ------------------------------------------------------------ |
| **endpoint**     | [SmartEndpoint](/ai/components/api/smartendpoint.md) | The smart endpoint associated with the session.              |
| **systemPrompt** | [SmartPrompt](/ai/components/api/smartprompt.md)     | The optional system prompt for the session. Default is null. |

**Throws:**

* [ArgumentNullException](https://docs.microsoft.com/dotnet/api/system.argumentnullexception)\
  Thrown when the endpoint is null.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/ai/components/api/wisej.ai.smartrealtimesession.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
