BaseLanguageModel<Input extends Object, Options extends LanguageModelOptions, Output extends LanguageModelResult<Object>> constructor

const BaseLanguageModel<Input extends Object, Options extends LanguageModelOptions, Output extends LanguageModelResult<Object>>({
  1. required Options defaultOptions,
})

Base class for all language models.

There are two different sub-types of Language Models:

  • LLMs: these wrap APIs which take text in and return text.
  • ChatModels: these wrap models which take chat messages in and return a chat message.

Implementation

const BaseLanguageModel({
  required super.defaultOptions,
});