VS Code API
    Preparing search index...

    Class LanguageModelDataPart

    A language model response part containing arbitrary data. Can be used in responses, chat messages, tool results, and other language model interactions.

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    The byte data for this part.

    mimeType: string

    The mime type which determines how the data property is interpreted.

    Methods

    • Create a new LanguageModelDataPart for a json.

      Note that this function is not expecting "stringified JSON" but an object that can be stringified. This function will throw an error when the passed value cannot be JSON-stringified.

      Parameters

      • value: any

        A JSON-stringifyable value.

      • Optionalmime: string

        Optional MIME type, defaults to application/json

      Returns LanguageModelDataPart