Optional ReadonlyoptionsReadonlytypeReturns a new instance of this Record type with all values set to their default values.
Returns a new instance of this Record type with the value for the specific key set to its default value.
Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.
If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.
OptionalnotSetValue: anyReturns the AI operation type, if this is an AI comparison
Returns true if this operation is an AI comparison
Returns true if this operation is a text comparison
Deeply converts this Record to equivalent native JavaScript Object.
Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.
Shallowly converts this Record to equivalent native JavaScript Object.
Shallowly converts this Record to equivalent JavaScript Object.
ComparisonOperation is a class that provides methods to describe a comparison operation. It encapsulates the type and optional settings for the comparison.
It is an Immutable.Record and thus can be updated using
set(key, value), for example:scale.set("options", { numberOfContextWords: 4 })Example
Create a new text comparison operation.
Example
Create a new AI comparison operation.
Default