ILanguageModelV4
Namespace: E2E.Decision.Sdk
public interface ILanguageModelV4The AI SDK’s LanguageModelV4 (language-model/v4/language-model-v4.ts): a language model that implements the language model
interface version 4.
Properties
Section titled “Properties”ModelId
Section titled “ModelId”string ModelId { get; }The provider-specific model ID.
Value: string
Provider
Section titled “Provider”string Provider { get; }The provider ID.
Value: string
SpecificationVersion
Section titled “SpecificationVersion”string SpecificationVersion { get; }The language model interface version the model implements: v4.
Value: string
SupportedUrls
Section titled “SupportedUrls”IReadOnlyDictionary<string, IReadOnlyList<Regex>> SupportedUrls { get; }Supported URL patterns by media type: the keys are media type patterns or full media types (*/*, audio/*,
application/pdf) and the values are the patterns that match the lower-case URLs. A matched URL is supported natively by the
model and is not downloaded.
Value: IReadOnlyDictionary<string, IReadOnlyList<Regex>>
Methods
Section titled “Methods”DoGenerateAsync(LanguageModelV4CallOptions, CancellationToken)
Section titled “DoGenerateAsync(LanguageModelV4CallOptions, CancellationToken)”Task<LanguageModelV4GenerateResult> DoGenerateAsync(LanguageModelV4CallOptions options, CancellationToken cancellationToken = default)Generates a language model output (non-streaming).
Parameters
| Name | Type | Description |
|---|---|---|
options |
LanguageModelV4CallOptions | |
cancellationToken |
CancellationToken |
Returns: Task<LanguageModelV4GenerateResult>
DoStreamAsync(LanguageModelV4CallOptions, CancellationToken)
Section titled “DoStreamAsync(LanguageModelV4CallOptions, CancellationToken)”Task<LanguageModelV4StreamResult> DoStreamAsync(LanguageModelV4CallOptions options, CancellationToken cancellationToken = default)Generates a language model output (streaming).
Parameters
| Name | Type | Description |
|---|---|---|
options |
LanguageModelV4CallOptions | |
cancellationToken |
CancellationToken |
Returns: Task<LanguageModelV4StreamResult>