Documentation

Maho_Ai_Model_Platform_ProviderInterface
in

Table of Contents

Methods

complete()  : string
Send a completion request
getLastModel()  : string
Get the model that was used in last complete() call
getLastTokenUsage()  : array{input: int, output: int}
Get token usage from last complete() call
getPlatformCode()  : string
Get the platform code (e.g. 'openai', 'anthropic')

Methods

complete()

Send a completion request

public complete(array<string|int, array{role: string, content: string}> $messages[, array<string, mixed> $options = [] ]) : string
Parameters
$messages : array<string|int, array{role: string, content: string}>
$options : array<string, mixed> = []
Return values
string

getLastModel()

Get the model that was used in last complete() call

public getLastModel() : string
Return values
string

getLastTokenUsage()

Get token usage from last complete() call

public getLastTokenUsage() : array{input: int, output: int}
Return values
array{input: int, output: int}

getPlatformCode()

Get the platform code (e.g. 'openai', 'anthropic')

public getPlatformCode() : string
Return values
string
On this page

Search results