Documentation

CorporatePrompt

Defines the contract for prompts that are compatible with LaravelNeuro Networking features.

Implementers must provide methods to encode the prompt into a JSON representation and decode a JSON string back into a prompt instance.

Table of Contents

Methods

promptDecode()  : static
Decodes a JSON-encoded prompt string back into a prompt instance.
promptEncode()  : string
Encodes the prompt into a JSON string.

Methods

promptDecode()

Decodes a JSON-encoded prompt string back into a prompt instance.

public static promptDecode(string $promptString) : static

This static method takes a JSON-encoded string and converts it back into an instance of a prompt that implements this contract.

Parameters
$promptString : string

The JSON-encoded prompt string.

Return values
static

An instance of the prompt.

promptEncode()

Encodes the prompt into a JSON string.

public promptEncode() : string

This method should convert the prompt data into a JSON-encoded string, suitable for storage or transmission.

Return values
string

JSON-encoded representation of the prompt.


        
On this page

Search results