Types
This section documents the types and constants used by the Orga React Native SDK, providing type safety and configuration options for developers. These types are used in OrgaAI.init, useOrgaAI, and other SDK features.
Constants
Constants define fixed values used throughout the SDK, such as available models, voices, and video constraints.
|
Name |
Type |
Description |
|---|---|---|
|
|
|
Array of supported AI models. Currently includes "orga-1-beta". Used in |
|
|
|
Enum-like object defining supported modalities ("video", "audio"). Used to construct the Modality type. |
|
|
|
Array of supported AI voice options. Used in |
|
|
|
Defines the valid range for the temperature parameter (0.0 to 1.0). Used to configure AI response randomness. |
|
|
|
Defines video quality constraints (low, medium, high) for width, height, and frame rate. Used in |
|
|
|
Enum of data channel event types for WebRTC communication (e.g., "conversation.item.input_audio_transcription.completed"). Used in |
Configuration Types
Types related to SDK and session configuration
|
Name |
Type |
Description |
|---|---|---|
|
|
|
Union type of supported AI models, derived from |
|
|
|
Union type of supported modalities, derived from MODALITIES_ENUM. Specifies interaction modes (audio, video) in |
|
|
|
Union type of supported AI voices, derived from |
|
|
|
Configuration for |
|
|
|
Configuration for |
Session Types
Types related to session state and media handling.
|
Name |
Type |
Description |
|---|---|---|
|
|
|
Specifies the camera facing direction. Used in |
|
|
|
WebRTC connection state (e.g., "new", "connecting", "connected"). Derived from react-native-webrtc. Used in |
|
|
|
Constraints for media streams, used in |
Event Types
Types related to WebRTC events and conversation data.
|
Name |
Type |
Description |
|---|---|---|
|
|
|
Represents a WebRTC ICE candidate event. Used in WebRTC connection setup. |
|
|
|
Represents a WebRTC data channel event, with event types defined in |
|
|
|
Represents a single conversation item (e.g., user speech or AI response). Returned via |
|
|
|
Callbacks for session events, used in |
WebRTC Types
Types related to WebRTC integration, sourced from react-native-webrtc.
|
Name |
Type |
Description |
|---|---|---|
|
|
|
Configuration for WebRTC ICE servers, used in |
Hook Return Type
Type returned by the useOrgaAI hook.
|
Name |
Type |
Description |
|---|---|---|
|
|
|
Return type of the |