PipelineManagerContract
The Contract for the CorporationManager, defining the required methods.
Defines a contract for managing AI pipelines in LaravelNeuro. Provides easy access to various AI functionalities such as chat completion, text-to-speech, image generation, and speech-to-text via a structured and modular approach.
Table of Contents
Methods
- chatCompletion() : PipelineManagerContract
- Instantiates and configures an AI ChatCompletion pipeline.
- connection() : Pipeline
- Retrieves the current pipeline instance after initialization.
- generateImage() : PipelineManagerContract
- Instantiates and configures an AI Image Generation pipeline.
- prompt() : BasicPrompt
- Retrieves the corresponding prompt class instance for the selected pipeline.
- speechToText() : PipelineManagerContract
- Instantiates and configures a Speech-to-Text (STT) pipeline.
- textToSpeech() : PipelineManagerContract
- Instantiates and configures a Text-to-Speech (TTS) pipeline.
Methods
chatCompletion()
Instantiates and configures an AI ChatCompletion pipeline.
public
chatCompletion([string|null $model = null ][, Driver|null $driver = null ]) : PipelineManagerContract
Parameters
- $model : string|null = null
-
The model name (e.g., "gpt-4-turbo-preview").
- $driver : Driver|null = null
-
The driver instance to use (defaults to GuzzleDriver).
Return values
PipelineManagerContract —Returns the current instance for method chaining.
connection()
Retrieves the current pipeline instance after initialization.
public
connection() : Pipeline
Tags
Return values
Pipeline —The pipeline instance associated with the current selection.
generateImage()
Instantiates and configures an AI Image Generation pipeline.
public
generateImage([string|null $model = null ][, Driver|null $driver = null ]) : PipelineManagerContract
Parameters
- $model : string|null = null
-
The model name (e.g., "dall-e-3").
- $driver : Driver|null = null
-
The driver instance to use (defaults to GuzzleDriver).
Return values
PipelineManagerContract —Returns the current instance for method chaining.
prompt()
Retrieves the corresponding prompt class instance for the selected pipeline.
public
prompt() : BasicPrompt
Tags
Return values
BasicPrompt —The prompt class instance.
speechToText()
Instantiates and configures a Speech-to-Text (STT) pipeline.
public
speechToText([string|null $model = null ][, Driver|null $driver = null ]) : PipelineManagerContract
Parameters
- $model : string|null = null
-
The model name (e.g., "whisper-1").
- $driver : Driver|null = null
-
The driver instance to use (defaults to GuzzleDriver).
Return values
PipelineManagerContract —Returns the current instance for method chaining.
textToSpeech()
Instantiates and configures a Text-to-Speech (TTS) pipeline.
public
textToSpeech([string|null $model = null ][, Driver|null $driver = null ]) : PipelineManagerContract
Parameters
- $model : string|null = null
-
The model name (e.g., "tts-1", "eleven-monolingual-v1").
- $driver : Driver|null = null
-
The driver instance to use (defaults to GuzzleDriver).
Return values
PipelineManagerContract —Returns the current instance for method chaining.