Nextcloud PHP API (master)

IProviderWithUserId extends IProvider

This is the interface that is implemented by apps that implement a text to image provider

Tags
since
29.0.0

Table of Contents

Methods

generate()  : void
Processes a text
getExpectedRuntime()  : int
The expected runtime for one task with this provider in seconds
getId()  : string
An arbitrary unique text string identifying this provider
getName()  : string
The localized name of this provider
setUserId()  : void

Methods

generate()

Processes a text

public generate(string $prompt, array<string|int, resource> $resources) : void
Parameters
$prompt : string

The input text

$resources : array<string|int, resource>

The file resources to write the images to

Tags
since
28.0.0
throws
RuntimeException

If the text could not be processed

getExpectedRuntime()

The expected runtime for one task with this provider in seconds

public getExpectedRuntime() : int
Tags
since
28.0.0
Return values
int

getId()

An arbitrary unique text string identifying this provider

public getId() : string
Tags
since
28.0.0
Return values
string

getName()

The localized name of this provider

public getName() : string
Tags
since
28.0.0
Return values
string

setUserId()

public setUserId(string|null $userId) : void
Parameters
$userId : string|null
Tags
since
29.0.0

        
On this page

Search results