llama-stack-mirror/tests/integration/recordings/responses/4ebcaf6c2aee.json
Ashwin Bharambe ef0736527d
feat(tools)!: substantial clean up of "Tool" related datatypes (#3627)
This is a sweeping change to clean up some gunk around our "Tool"
definitions.

First, we had two types `Tool` and `ToolDef`. The first of these was a
"Resource" type for the registry but we had stopped registering tools
inside the Registry long back (and only registered ToolGroups.) The
latter was for specifying tools for the Agents API. This PR removes the
former and adds an optional `toolgroup_id` field to the latter.

Secondly, as pointed out by @bbrowning in
https://github.com/llamastack/llama-stack/pull/3003#issuecomment-3245270132,
we were doing a lossy conversion from a full JSON schema from the MCP
tool specification into our ToolDefinition to send it to the model.
There is no necessity to do this -- we ourselves aren't doing any
execution at all but merely passing it to the chat completions API which
supports this. By doing this (and by doing it poorly), we encountered
limitations like not supporting array items, or not resolving $refs,
etc.

To fix this, we replaced the `parameters` field by `{ input_schema,
output_schema }` which can be full blown JSON schemas.

Finally, there were some types in our llama-related chat format
conversion which needed some cleanup. We are taking this opportunity to
clean those up.

This PR is a substantial breaking change to the API. However, given our
window for introducing breaking changes, this suits us just fine. I will
be landing a concurrent `llama-stack-client` change as well since API
shapes are changing.
2025-10-02 15:12:03 -07:00

421 lines
11 KiB
JSON

{
"request": {
"method": "POST",
"url": "http://0.0.0.0:11434/v1/v1/embeddings",
"headers": {},
"body": {
"model": "all-minilm:l6-v2",
"input": "Test dimensions parameter",
"encoding_format": "base64",
"dimensions": 16
},
"endpoint": "/v1/embeddings",
"model": "all-minilm:l6-v2"
},
"response": {
"body": {
"__type__": "openai.types.create_embedding_response.CreateEmbeddingResponse",
"__data__": {
"data": [
{
"embedding": [
0.04635219,
0.002988263,
-0.054220885,
0.057812735,
-0.0340614,
0.013923248,
-0.005755826,
0.054555666,
-0.09073176,
-0.066910096,
0.046287432,
-0.060912322,
0.0010950539,
0.025724398,
-0.025169374,
-0.026821515,
-0.030190151,
0.0019341545,
-0.0754819,
0.057380512,
0.020332545,
-0.005591279,
-0.0022273492,
0.012063173,
-0.011033521,
-0.03300947,
0.05462081,
0.014426073,
0.024025004,
0.004224287,
0.09837723,
0.08385713,
-0.049175426,
0.03877149,
0.08748876,
-0.0223024,
0.006552746,
-0.0070359865,
0.017893821,
0.015465863,
0.05007282,
-0.019349905,
0.064887345,
0.03184605,
0.0034936152,
0.02317752,
-0.06297051,
0.044468515,
-0.022246253,
-0.017976552,
0.040390052,
-0.0020998395,
-0.05173264,
0.014722753,
0.01640469,
-0.06438627,
-0.043313596,
-0.040564552,
0.044412937,
-0.0031199565,
-0.007237415,
-0.05158015,
0.059660934,
-0.014839656,
0.012902056,
0.028181136,
-0.019578207,
-0.0664231,
-0.06333673,
0.028995825,
-0.114707075,
0.041575413,
-0.022128351,
0.01979776,
0.0630018,
0.011822141,
-0.06492722,
-0.066328146,
0.021114407,
-0.020638306,
-0.009599678,
0.013701863,
-0.060742326,
0.005395315,
0.026589092,
0.11719033,
0.067120634,
0.008300158,
0.036319703,
0.00772981,
0.071582936,
0.019818509,
-0.15945566,
0.047943458,
0.00031571978,
-0.04666597,
0.007148715,
-0.08839544,
0.038042437,
0.06620088,
0.034336157,
-0.035366412,
0.041598067,
0.073756054,
-0.018818064,
-0.017260034,
0.058635473,
-0.01371376,
0.048319146,
-0.023727186,
0.024134034,
0.015763162,
0.06681245,
0.01748244,
0.0825409,
-0.044568237,
0.0015441044,
-0.011225885,
0.0153481,
-0.061364066,
0.05792184,
0.044216745,
-0.047036964,
-0.02634555,
-0.033504363,
0.06713578,
0.030866034,
2.024336e-34,
-0.03532978,
0.021929236,
0.030160688,
0.09271786,
-0.010355268,
0.07196569,
0.052604284,
0.085753724,
0.094942175,
0.053786535,
-0.08900509,
-0.024382822,
-0.008744401,
-0.03167582,
0.01025236,
0.1818434,
-0.0022662894,
0.118558116,
-0.072208576,
-0.005867667,
0.0746222,
-0.024001855,
-0.013938801,
-0.030681474,
-0.029207803,
-0.117624186,
-0.046466038,
-0.002622228,
-0.0902171,
-0.038626853,
-0.037497964,
-0.02418436,
-0.069297835,
0.06424038,
0.0045628003,
-0.0041498984,
-0.01649947,
0.051125433,
-0.0058985935,
-0.0122523345,
-0.047424458,
-0.007806876,
0.07906618,
0.03244041,
-0.044682544,
-0.022625683,
0.028852794,
-0.050480433,
0.043801326,
-0.023512814,
-0.029832385,
0.031089257,
0.07129686,
-0.089649536,
0.011963804,
-0.018448317,
0.019637493,
0.020081993,
0.0012980831,
0.093201645,
-0.064436235,
-0.040581323,
-0.01193043,
0.043884862,
-0.010675756,
-0.030739127,
0.005605308,
-0.110498495,
0.044510514,
0.037110664,
0.04116233,
-0.039460793,
-0.04470639,
-0.027589805,
-0.02073358,
-0.067221105,
0.050390884,
0.031397663,
-0.008031462,
-0.009285899,
0.0013141648,
-0.017254544,
0.010367782,
-0.05940024,
-0.018042587,
-0.15487815,
0.0069424273,
-0.05208202,
0.0014201442,
-0.13956298,
-0.040203292,
0.027910054,
-0.064872995,
-0.016270144,
0.07052549,
5.3188943e-34,
0.012666737,
0.016728623,
-0.013163009,
0.06391275,
-0.043404065,
0.015435096,
0.03720438,
0.05997576,
-0.07789181,
-0.0408386,
0.024137221,
-0.019834999,
-0.034739267,
0.00042199617,
0.048484907,
0.08716056,
-0.101133205,
-0.07535088,
-0.03912376,
-0.031597532,
-0.052266575,
0.022085808,
-0.011040282,
0.005077135,
-0.088432744,
-0.010477913,
0.047780182,
-0.073345095,
0.014382301,
0.038075384,
0.02176859,
-0.029071847,
-0.036925532,
0.14317243,
0.020646103,
-0.08367964,
0.111576855,
-0.009943396,
0.023071144,
0.0926832,
0.011242715,
0.068017475,
-0.007714686,
0.03060742,
-0.011360289,
0.109015204,
0.12930514,
-0.07566831,
0.09001269,
-0.0090979,
0.0148039665,
0.048663232,
0.08894293,
0.038565516,
0.005821986,
0.016084671,
-0.106283545,
-0.033372246,
0.05440088,
-0.005663873,
0.0011572369,
-0.024969472,
0.043092247,
-0.009314855,
-0.11836073,
-0.027310666,
0.009811885,
-0.0052975323,
-0.044883158,
0.066436425,
-0.06750139,
-0.02696421,
0.01402391,
-0.04950559,
-0.084093384,
-0.07380851,
0.04709705,
4.9404687e-05,
0.01672617,
0.01849747,
0.027683195,
0.0047972985,
0.0017495222,
0.07066204,
-0.022430636,
0.06875498,
0.093927115,
0.11101308,
-0.015589739,
0.021178465,
0.033638563,
0.034676168,
-0.026882911,
-0.010514364,
0.0073013064,
-1.2070348e-08,
-0.10034882,
-0.028641108,
-0.061462097,
-0.009792086,
-0.081652306,
-0.011814046,
0.002039501,
0.010384326,
0.01639641,
0.09542911,
0.012538498,
-0.03542602,
0.018125113,
0.062750235,
0.0007333235,
-0.13612862,
-0.049830034,
0.021177148,
0.006589976,
0.007859552,
-0.03270378,
0.024738451,
-0.02542262,
-0.0033008803,
0.030640591,
-0.032442387,
0.04598555,
0.03903257,
0.035755396,
0.01686084,
0.13498692,
0.028296864,
-0.0035224769,
-0.036735818,
-0.046355885,
0.057701495,
0.008000554,
0.047822826,
0.04911064,
0.035214324,
-0.09817153,
0.0050856513,
-0.018094635,
-0.04385158,
0.06649695,
-0.037648164,
-0.006218895,
-0.037976924,
-0.0036204353,
-0.03149386,
0.031777944,
-0.011333557,
0.009081317,
0.022486951,
0.032106593,
0.023041077,
-0.06739943,
0.06294171,
-0.057333894,
-0.041295,
0.060841344,
0.03247397,
-0.05132725,
-0.04992364
],
"index": 0,
"object": "embedding"
}
],
"model": "all-minilm:l6-v2",
"object": "list",
"usage": {
"prompt_tokens": 3,
"total_tokens": 3
}
}
},
"is_streaming": false
}
}