WordPress\AiClient\Providers\Models\TextGeneration\Contracts

TextGenerationModelInterface{}interfaceWP 0.1.0

Interface for models that support text generation.

Provides synchronous and streaming methods for generating text from prompts.

Хуков нет.

Использование

$TextGenerationModelInterface = new TextGenerationModelInterface();
// use class methods

Методы

  1. public generateTextResult(array $prompt)

Список изменений

С версии 0.1.0 Введена.

Код TextGenerationModelInterface{} WP 7.0.4

interface TextGenerationModelInterface
{
    /**
     * Generates text from a prompt.
     *
     * @since 0.1.0
     *
     * @param list<Message> $prompt Array of messages containing the text generation prompt.
     * @return GenerativeAiResult Result containing generated text.
     */
    public function generateTextResult(array $prompt): GenerativeAiResult;
}