smoltalk
Preparing search index...
FallbackStrategy
Class FallbackStrategy
Hierarchy (
View Summary
)
BaseStrategy
FallbackStrategy
Index
Constructors
constructor
Properties
config
primary
Strategy
statelog
Client?
Methods
_
text
_
text
Sync
_
text
With
Fallbacks
text
text
Stream
text
Sync
to
JSON
to
Short
String
to
String
from
JSON
Constructors
constructor
new
FallbackStrategy
(
primaryStrategy
:
ModelParam
,
config
:
FallbackStrategyConfig
,
)
:
FallbackStrategy
Parameters
primaryStrategy
:
ModelParam
config
:
FallbackStrategyConfig
Returns
FallbackStrategy
Properties
config
config
:
FallbackStrategyConfig
primary
Strategy
primaryStrategy
:
Strategy
Optional
statelog
Client
statelogClient
?:
StatelogClient
Methods
_
text
_text
(
config
:
SmolPromptConfig
)
:
Promise
<
Result
<
PromptResult
>
>
Parameters
config
:
SmolPromptConfig
Returns
Promise
<
Result
<
PromptResult
>
>
_
text
Sync
_textSync
(
config
:
SmolPromptConfig
)
:
Promise
<
Result
<
PromptResult
>
>
Parameters
config
:
SmolPromptConfig
Returns
Promise
<
Result
<
PromptResult
>
>
_
text
With
Fallbacks
_textWithFallbacks
(
config
:
SmolPromptConfig
,
strategy
:
Strategy
,
fallbackStrategies
:
FallbackStrategyConfig
,
)
:
Promise
<
Result
<
PromptResult
>
>
Parameters
config
:
SmolPromptConfig
strategy
:
Strategy
fallbackStrategies
:
FallbackStrategyConfig
Returns
Promise
<
Result
<
PromptResult
>
>
text
text
(
config
:
SmolPromptConfig
)
:
Promise
<
Result
<
PromptResult
>
>
Parameters
config
:
SmolPromptConfig
Returns
Promise
<
Result
<
PromptResult
>
>
text
Stream
textStream
(
config
:
SmolPromptConfig
,
)
:
Promise
<
Result
<
AsyncIterable
<
PromptResult
,
any
,
any
>
>
>
Parameters
config
:
SmolPromptConfig
Returns
Promise
<
Result
<
AsyncIterable
<
PromptResult
,
any
,
any
>
>
>
text
Sync
textSync
(
config
:
SmolPromptConfig
)
:
Promise
<
Result
<
PromptResult
>
>
Parameters
config
:
SmolPromptConfig
Returns
Promise
<
Result
<
PromptResult
>
>
to
JSON
toJSON
()
:
StrategyJSON
Returns
StrategyJSON
to
Short
String
toShortString
()
:
string
Returns
string
to
String
toString
()
:
string
Returns
string
Static
from
JSON
fromJSON
(
json
:
unknown
)
:
FallbackStrategy
Parameters
json
:
unknown
Returns
FallbackStrategy
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
config
primary
Strategy
statelog
Client
Methods
_
text
_
text
Sync
_
text
With
Fallbacks
text
text
Stream
text
Sync
to
JSON
to
Short
String
to
String
from
JSON
smoltalk
Loading...