dolibarr 25.0.0-alpha
log_viewer.php File Reference

AI Request Log Viewer with Payload Inspection. More...

Go to the source code of this file.

Functions

 aiModelPrice ($model)
 Price (in/out, per 1M tokens, in the admin's own currency and contract) for a model, from the JSON map AI_MODEL_PRICES_JSON, e.g.
 

Detailed Description

AI Request Log Viewer with Payload Inspection.

Definition in file log_viewer.php.

Function Documentation

◆ aiModelPrice()

aiModelPrice ( $model)

Price (in/out, per 1M tokens, in the admin's own currency and contract) for a model, from the JSON map AI_MODEL_PRICES_JSON, e.g.

{"gemini-2.5-flash":{"in":0.30,"out":2.50},"default":{"in":1,"out":3}} Cost is computed at DISPLAY time, so a price update re-prices the history.

Parameters
string$modelModel id as logged
Returns
array{in:float,out:float}|null Price entry, or null when not configured

Definition at line 252 of file log_viewer.php.

References getDolGlobalString().