Preparing search index...
The search index is not available
LiveKit Agents
LiveKit Agents
plugins/agents-plugin-xai
realtime
RealtimeSession
Class RealtimeSession
Hierarchy
OpenAIRealtimeSession
RealtimeSession
Index
Constructors
constructor
Accessors
chat
Ctx
realtime
Model
tools
Methods
_update
Session
clear
Audio
close
commit
Audio
generate
Reply
interrupt
push
Audio
send
Event
set
Input
Audio
Stream
start
User
Activity
truncate
update
Chat
Ctx
update
Instructions
update
Options
update
Tools
Constructors
constructor
new
Realtime
Session
(
realtimeModel
)
:
realtime
.
RealtimeSession
Parameters
realtimeModel
:
realtime
.
RealtimeModel
Returns
realtime
.
RealtimeSession
Accessors
chat
Ctx
get
chatCtx
(
)
:
ChatContext
Returns
ChatContext
realtime
Model
get
realtimeModel
(
)
:
llm
.
RealtimeModel
Returns
llm
.
RealtimeModel
tools
get
tools
(
)
:
ToolContext
<
unknown
>
Returns
ToolContext
<
unknown
>
Methods
_update
Session
_update
Session
(
instructions
?
,
chatCtx
?
,
tools
?
)
:
Promise
<
void
>
Parameters
Optional
instructions
:
string
Optional
chatCtx
:
ChatContext
Optional
tools
:
ToolContext
<
unknown
>
Returns
Promise
<
void
>
clear
Audio
clear
Audio
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
close
close
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
commit
Audio
commit
Audio
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
generate
Reply
generate
Reply
(
instructions
?
,
options
?
)
:
Promise
<
GenerationCreatedEvent
>
Parameters
Optional
instructions
:
string
Optional
options
:
{
signal
?:
AbortSignal
;
}
Optional
signal
?:
AbortSignal
Returns
Promise
<
GenerationCreatedEvent
>
interrupt
interrupt
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
push
Audio
push
Audio
(
frame
)
:
void
Parameters
frame
:
AudioFrame
Returns
void
send
Event
send
Event
(
command
)
:
void
Parameters
command
:
ClientEvent
Returns
void
set
Input
Audio
Stream
set
Input
Audio
Stream
(
audioStream
)
:
void
Parameters
audioStream
:
ReadableStream
<
AudioFrame
>
Returns
void
start
User
Activity
start
User
Activity
(
)
:
void
Notifies the model that user activity has started
Returns
void
truncate
truncate
(
_options
)
:
Promise
<
void
>
Parameters
_options
:
{
audioEndMs
:
number
;
audioTranscript
?:
string
;
messageId
:
string
;
modalities
?:
Modality
[]
;
}
audio
End
Ms
:
number
Optional
audio
Transcript
?:
string
message
Id
:
string
Optional
modalities
?:
Modality
[]
Returns
Promise
<
void
>
update
Chat
Ctx
update
Chat
Ctx
(
_chatCtx
)
:
Promise
<
void
>
Parameters
_chatCtx
:
ChatContext
Returns
Promise
<
void
>
update
Instructions
update
Instructions
(
_instructions
)
:
Promise
<
void
>
Parameters
_instructions
:
string
Returns
Promise
<
void
>
update
Options
update
Options
(
__namedParameters
)
:
void
Parameters
__namedParameters
:
{
toolChoice
?:
llm
.
ToolChoice
;
}
Optional
tool
Choice
?:
llm
.
ToolChoice
Returns
void
update
Tools
update
Tools
(
_tools
)
:
Promise
<
void
>
Parameters
_tools
:
ToolContext
<
unknown
>
Returns
Promise
<
void
>
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
On This Page
constructor
chat
Ctx
realtime
Model
tools
_update
Session
clear
Audio
close
commit
Audio
generate
Reply
interrupt
push
Audio
send
Event
set
Input
Audio
Stream
start
User
Activity
truncate
update
Chat
Ctx
update
Instructions
update
Options
update
Tools
LiveKit Agents
Loading...
Notifies the model that user activity has started