unified-llm-client
Preparing search index...
ConversationClient
Interface ConversationClient
Minimal client contract consumed by
Conversation
.
interface
ConversationClient
{
resolveContext
?
(
options
:
{
budgetUsd
?:
number
;
maxTokens
?:
number
;
messages
:
CanonicalMessage
[]
;
model
?:
string
;
provider
?:
CanonicalProvider
;
responseFormat
?:
ResponseFormat
;
sessionId
?:
string
;
system
?:
string
;
tenantId
?:
string
;
toolChoice
?:
CanonicalToolChoice
;
tools
?:
CanonicalTool
<
JsonObject
>
[]
;
}
,
)
:
ConversationRoute
;
complete
(
options
:
{
budgetExceededAction
?:
BudgetExceededAction
;
budgetUsd
?:
number
;
metadata
?:
Record
<
string
,
JsonValue
>
;
maxTokens
?:
number
;
messages
:
CanonicalMessage
[]
;
model
?:
string
;
provider
?:
CanonicalProvider
;
resolvedRoute
?:
{
attempts
?:
{
decision
:
string
;
model
:
string
;
provider
:
CanonicalProvider
;
}
[]
;
model
:
string
;
provider
:
CanonicalProvider
;
}
;
providerOptions
?:
ProviderOptions
;
requestId
?:
string
;
responseFormat
?:
ResponseFormat
;
sessionId
?:
string
;
signal
?:
AbortSignal
;
system
?:
string
;
tenantId
?:
string
;
toolChoice
?:
CanonicalToolChoice
;
tools
?:
CanonicalTool
<
JsonObject
>
[]
;
}
,
)
:
Promise
<
CanonicalResponse
>
;
stream
(
options
:
{
budgetExceededAction
?:
BudgetExceededAction
;
budgetUsd
?:
number
;
metadata
?:
Record
<
string
,
JsonValue
>
;
maxTokens
?:
number
;
messages
:
CanonicalMessage
[]
;
model
?:
string
;
provider
?:
CanonicalProvider
;
resolvedRoute
?:
{
attempts
?:
{
decision
:
string
;
model
:
string
;
provider
:
CanonicalProvider
;
}
[]
;
model
:
string
;
provider
:
CanonicalProvider
;
}
;
providerOptions
?:
ProviderOptions
;
requestId
?:
string
;
responseFormat
?:
ResponseFormat
;
sessionId
?:
string
;
signal
?:
AbortSignal
;
system
?:
string
;
tenantId
?:
string
;
toolChoice
?:
CanonicalToolChoice
;
tools
?:
CanonicalTool
<
JsonObject
>
[]
;
}
,
)
:
AsyncIterable
<
StreamChunk
>
;
}
Index
Methods
resolve
Context?
complete
stream
Methods
Optional
resolve
Context
resolveContext
?
(
options
:
{
budgetUsd
?:
number
;
maxTokens
?:
number
;
messages
:
CanonicalMessage
[]
;
model
?:
string
;
provider
?:
CanonicalProvider
;
responseFormat
?:
ResponseFormat
;
sessionId
?:
string
;
system
?:
string
;
tenantId
?:
string
;
toolChoice
?:
CanonicalToolChoice
;
tools
?:
CanonicalTool
<
JsonObject
>
[]
;
}
,
)
:
ConversationRoute
Parameters
options
:
{
budgetUsd
?:
number
;
maxTokens
?:
number
;
messages
:
CanonicalMessage
[]
;
model
?:
string
;
provider
?:
CanonicalProvider
;
responseFormat
?:
ResponseFormat
;
sessionId
?:
string
;
system
?:
string
;
tenantId
?:
string
;
toolChoice
?:
CanonicalToolChoice
;
tools
?:
CanonicalTool
<
JsonObject
>
[]
;
}
Returns
ConversationRoute
complete
complete
(
options
:
{
budgetExceededAction
?:
BudgetExceededAction
;
budgetUsd
?:
number
;
metadata
?:
Record
<
string
,
JsonValue
>
;
maxTokens
?:
number
;
messages
:
CanonicalMessage
[]
;
model
?:
string
;
provider
?:
CanonicalProvider
;
resolvedRoute
?:
{
attempts
?:
{
decision
:
string
;
model
:
string
;
provider
:
CanonicalProvider
;
}
[]
;
model
:
string
;
provider
:
CanonicalProvider
;
}
;
providerOptions
?:
ProviderOptions
;
requestId
?:
string
;
responseFormat
?:
ResponseFormat
;
sessionId
?:
string
;
signal
?:
AbortSignal
;
system
?:
string
;
tenantId
?:
string
;
toolChoice
?:
CanonicalToolChoice
;
tools
?:
CanonicalTool
<
JsonObject
>
[]
;
}
,
)
:
Promise
<
CanonicalResponse
>
Parameters
options
:
{
budgetExceededAction
?:
BudgetExceededAction
;
budgetUsd
?:
number
;
metadata
?:
Record
<
string
,
JsonValue
>
;
maxTokens
?:
number
;
messages
:
CanonicalMessage
[]
;
model
?:
string
;
provider
?:
CanonicalProvider
;
resolvedRoute
?:
{
attempts
?:
{
decision
:
string
;
model
:
string
;
provider
:
CanonicalProvider
;
}
[]
;
model
:
string
;
provider
:
CanonicalProvider
;
}
;
providerOptions
?:
ProviderOptions
;
requestId
?:
string
;
responseFormat
?:
ResponseFormat
;
sessionId
?:
string
;
signal
?:
AbortSignal
;
system
?:
string
;
tenantId
?:
string
;
toolChoice
?:
CanonicalToolChoice
;
tools
?:
CanonicalTool
<
JsonObject
>
[]
;
}
Returns
Promise
<
CanonicalResponse
>
stream
stream
(
options
:
{
budgetExceededAction
?:
BudgetExceededAction
;
budgetUsd
?:
number
;
metadata
?:
Record
<
string
,
JsonValue
>
;
maxTokens
?:
number
;
messages
:
CanonicalMessage
[]
;
model
?:
string
;
provider
?:
CanonicalProvider
;
resolvedRoute
?:
{
attempts
?:
{
decision
:
string
;
model
:
string
;
provider
:
CanonicalProvider
;
}
[]
;
model
:
string
;
provider
:
CanonicalProvider
;
}
;
providerOptions
?:
ProviderOptions
;
requestId
?:
string
;
responseFormat
?:
ResponseFormat
;
sessionId
?:
string
;
signal
?:
AbortSignal
;
system
?:
string
;
tenantId
?:
string
;
toolChoice
?:
CanonicalToolChoice
;
tools
?:
CanonicalTool
<
JsonObject
>
[]
;
}
,
)
:
AsyncIterable
<
StreamChunk
>
Parameters
options
:
{
budgetExceededAction
?:
BudgetExceededAction
;
budgetUsd
?:
number
;
metadata
?:
Record
<
string
,
JsonValue
>
;
maxTokens
?:
number
;
messages
:
CanonicalMessage
[]
;
model
?:
string
;
provider
?:
CanonicalProvider
;
resolvedRoute
?:
{
attempts
?:
{
decision
:
string
;
model
:
string
;
provider
:
CanonicalProvider
;
}
[]
;
model
:
string
;
provider
:
CanonicalProvider
;
}
;
providerOptions
?:
ProviderOptions
;
requestId
?:
string
;
responseFormat
?:
ResponseFormat
;
sessionId
?:
string
;
signal
?:
AbortSignal
;
system
?:
string
;
tenantId
?:
string
;
toolChoice
?:
CanonicalToolChoice
;
tools
?:
CanonicalTool
<
JsonObject
>
[]
;
}
Returns
AsyncIterable
<
StreamChunk
>
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
On This Page
Methods
resolve
Context
complete
stream
unified-llm-client
Loading...
Minimal client contract consumed by
Conversation.