Replicate predictions API doesn't return the model name
simonw opened this issue · 2 comments
simonw commented
Spotted this while working on:
This API endpoint here: https://replicate.com/docs/reference/http#predictions.get
{
"id": "rrr4z55ocneqzikepnug6xezpe",
"version": "be04660a5b93ef2aff61e3668dedb4cbeb14941e62a3fd5998364a32d613e35e",
"urls": {
"get": "https://api.replicate.com/v1/predictions/rrr4z55ocneqzikepnug6xezpe",
"cancel": "https://api.replicate.com/v1/predictions/rrr4z55ocneqzikepnug6xezpe/cancel"
},
"created_at": "2022-09-13T22:54:18.578761Z",
"started_at": "2022-09-13T22:54:19.438525Z",
"completed_at": "2022-09-13T22:54:23.236610Z",
"source": "api",
"status": "succeeded",
"input": {
"prompt": "oak tree with boletus growing on its branches"
},
"output": [
"https://replicate.com/api/models/stability-ai/stable-diffusion/files/9c3b6fe4-2d37-4571-a17a-83951b1cb120/out-0.png"
],
"error": null,
"logs": "Using seed: 36941...",
"metrics": {
"predict_time": 4.484541
}
}
Doesn't include a field telling you the owner and name of the model.
(Reporting it here because I couldn't find a relevant repo for reporting API issues.)
simonw commented
I shipped a tool for recording predictions to a SQLite database here:
https://github.com/simonw/llm-replicate/blob/0.3/README.md#fetching-all-replicate-predictions
That tool will automatically record any future additions to the JSON, so if you add a model_owner
and model_name
field my tool can start recording those as well.