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
stringgetLastModel()
Get the model that was used in last complete() call
public
getLastModel() : string
Return values
stringgetLastTokenUsage()
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