Run machine learning models, such as LLMs in your Edge-first application.

Constructors

Properties

ai: Ai

Accessors

Methods

  • Parameters

    • model: "@cf/microsoft/resnet-50"
    • inputs: AiImageClassificationInput
    • Optionaloptions: AI.Options

    Returns Promise<AiImageClassificationOutput>

  • Parameters

    • model: BaseAiImageToTextModels
    • inputs: AiImageToTextInput
    • Optionaloptions: AI.Options

    Returns Promise<AiImageToTextOutput>

  • Parameters

    • model: "@cf/facebook/detr-resnet-50"
    • inputs: AiObjectDetectionInput
    • Optionaloptions: AI.Options

    Returns Promise<AiObjectDetectionOutput>

  • Parameters

    • model: BaseAiSpeechRecognitionModels
    • inputs: AiSpeechRecognitionInput
    • Optionaloptions: AI.Options

    Returns Promise<AiSpeechRecognitionOutput>

  • Parameters

    • model: "@cf/facebook/bart-large-cnn"
    • inputs: AiSummarizationInput
    • Optionaloptions: AI.Options

    Returns Promise<AiSummarizationOutput>

  • Parameters

    • model: "@cf/huggingface/distilbert-sst-2-int8"
    • inputs: AiTextClassificationInput
    • Optionaloptions: AI.Options

    Returns Promise<AiTextClassificationOutput>

  • Parameters

    • model: BaseAiTextEmbeddingsModels
    • inputs: AiTextEmbeddingsInput
    • Optionaloptions: AI.Options

    Returns Promise<AiTextEmbeddingsOutput>

  • Parameters

    • model: BaseAiTextGenerationModels
    • inputs: AiTextGenerationInput
    • Optionaloptions: AI.Options

    Returns Promise<AiTextGenerationOutput>

  • Parameters

    • model: BaseAiTextToImageModels
    • inputs: AiTextToImageInput
    • Optionaloptions: AI.Options

    Returns Promise<AiTextToImageOutput>

  • Parameters

    • model: "@cf/meta/m2m100-1.2b"
    • inputs: AiTranslationInput
    • Optionaloptions: AI.Options

    Returns Promise<AiTranslationOutput>