Skip to main content

Overview

@acromedia/gesso-ai

AI Integration Provider

Provides required functionality for interacting with AI services.

Overview

The AI provider exposes the following hooks/methods for developers to use to fetch data from their configured ai platform.

AI

aiProvider(plugin: Plugin, config = {}): Used to register plugin with the provider. The plugin parameter is an object containing plugin functions for various AI operations. The config parameter allows for customization of how the provider should function.

useAI

useAI(prompt, options: { responseStructure }): Used for fetching a response from the AI service.

  • prompt: The prompt to send to the AI service.
  • options: An object containing options for the request.
    • responseStructure: The component structure of the response from the AI service.

Installation

pnpm install @acromedia/gesso-ai