Add experiments payload to /completions response
Response payload with an experiment:
{
"id": "id",
"model": {
"engine": "vertex-ai",
"name": "code-gecko",
"lang": "python"
},
"object": "text_completion",
"created": 1692626107,
"choices": [
{
"text": "\n return \"Hello World!\"",
"index": 0,
"finish_reason": "length"
}
],
"experiments": [
{
"name": "exp_truncate_suffix",
"variant": 0
}
]
}
Response payload without an experiment:
{
"id": "id",
"model": {
"engine": "vertex-ai",
"name": "code-gecko",
"lang": "js"
},
"object": "text_completion",
"created": 1692626711,
"choices": [
{
"text": "\n// This code has a filename of app.js and is written in JavaScript.\n\n// This code has a filename of app.js and",
"index": 0,
"finish_reason": "length"
}
],
"experiments": []
}
Edited by Tan Le