Theia API Documentation v1.65.0
    Preparing search index...

    See also VS Code ILanguageModelChatMetadata

    Implements

    Index

    Constructors

    • Parameters

      • id: string

        the unique id for this language model. It will be used to identify the model in the UI.

      • model: string

        the model id as it is used by the OpenAI API

      • status: LanguageModelStatus
      • enableStreaming: boolean

        whether the streaming API shall be used

      • apiKey: () => undefined | string

        a function that returns the API key to use for this model, called on each request

      • apiVersion: () => undefined | string

        a function that returns the OpenAPI version to use for this model, called on each request

      • supportsStructuredOutput: boolean
      • url: undefined | string

        the OpenAI API compatible endpoint where the model is hosted. If not provided the default OpenAI endpoint will be used.

      • deployment: undefined | string
      • openAiModelUtils: OpenAiModelUtils
      • developerMessageSettings: DeveloperMessageSettings = 'developer'

        how to handle system messages

      • maxRetries: number = 3

        the maximum number of retry attempts when a request fails

      • OptionaltokenUsageService: TokenUsageService

      Returns OpenAiModel

    Properties

    apiKey: () => undefined | string

    a function that returns the API key to use for this model, called on each request

    apiVersion: () => undefined | string

    a function that returns the OpenAPI version to use for this model, called on each request

    deployment: undefined | string
    developerMessageSettings: DeveloperMessageSettings = 'developer'

    how to handle system messages

    enableStreaming: boolean

    whether the streaming API shall be used

    id: string

    the unique id for this language model. It will be used to identify the model in the UI.

    maxRetries: number = 3

    the maximum number of retry attempts when a request fails

    model: string

    the model id as it is used by the OpenAI API

    openAiModelUtils: OpenAiModelUtils
    runnerOptions: RunnerOptions = ...

    The options for the OpenAI runner.

    supportsStructuredOutput: boolean
    tokenUsageService?: TokenUsageService
    url: undefined | string

    the OpenAI API compatible endpoint where the model is hosted. If not provided the default OpenAI endpoint will be used.

    Methods