chore(migrate apis): move VectorDBWithIndex from embeddings to openai_embeddings (#3294)

# What does this PR do?

migrates VectorDBWithIndex to use openai_embeddings

part of #2365 

## Test Plan

existing unit tests
This commit is contained in:
Matthew Farrellee 2025-08-31 17:48:35 -04:00 committed by GitHub
parent b12cd528ef
commit 478b4ff1e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 8376 additions and 13 deletions

View file

@ -0,0 +1,422 @@
{
"request": {
"method": "POST",
"url": "http://0.0.0.0:11434/v1/v1/embeddings",
"headers": {},
"body": {
"model": "all-minilm:l6-v2",
"input": [
"Python is a high-level programming language with code readability and fewer lines than C++ or Java"
],
"encoding_format": "float"
},
"endpoint": "/v1/embeddings",
"model": "all-minilm:l6-v2"
},
"response": {
"body": {
"__type__": "openai.types.create_embedding_response.CreateEmbeddingResponse",
"__data__": {
"data": [
{
"embedding": [
-0.07649938,
0.021244217,
-0.036287725,
-0.0011695292,
-0.048568938,
-0.13184524,
-0.08424354,
0.059378363,
-0.06171173,
-0.009400254,
-0.08092405,
0.05547966,
0.05243954,
0.026002606,
0.06304219,
-0.062263194,
-0.06520713,
-0.022376515,
0.017407224,
-0.11619268,
-0.03641897,
0.04050772,
-0.032505907,
-0.017739171,
0.057254575,
0.012360873,
-0.018550506,
-0.029990712,
0.00235547,
0.0067841834,
-0.088615544,
0.07800687,
0.037015557,
0.029492933,
-0.019656634,
0.054334868,
-0.0006793985,
-0.08961444,
-0.05305694,
-0.012659472,
-0.0860912,
0.07697376,
-0.038515005,
-0.011632789,
-0.032334387,
-0.0075316867,
-0.024749892,
-0.068094365,
-0.030428912,
-0.02603917,
-0.09692951,
0.009892155,
-0.05358676,
-0.09094546,
-0.009154104,
-0.008819028,
0.048186116,
-0.0033502842,
-0.005917261,
-0.13302499,
-0.09727019,
0.013533918,
0.047219984,
0.062738694,
-0.01572617,
-0.037660386,
-0.016604222,
0.029844316,
0.093244925,
-0.06728843,
-0.13382566,
-0.020838322,
-0.025856238,
0.11628718,
0.0306645,
-0.10493003,
0.038982447,
-0.010721579,
-0.0013596424,
0.020682583,
0.0018240656,
0.027716527,
-0.078466296,
0.10784201,
0.029109064,
-0.05404029,
0.030583676,
0.07008342,
-0.03429503,
0.009839805,
0.03469849,
-0.042428855,
0.06508966,
0.026623009,
-0.032148074,
0.07619082,
0.020044614,
-0.030803965,
-0.071872465,
0.027219178,
-0.018790914,
-0.0541197,
0.07494771,
0.01770988,
0.03380063,
0.024214497,
0.09087066,
-0.052000217,
0.04061227,
-0.018418813,
-0.012485012,
-0.06401856,
-0.023183277,
-0.06190061,
0.053444423,
0.047886662,
-0.010557972,
0.078470305,
0.03581419,
0.02720849,
0.022449464,
-0.004947443,
-0.024473231,
0.003690138,
0.00033914045,
-0.00892056,
0.00927688,
2.0050864e-34,
-0.03232352,
-0.0242469,
0.02715213,
0.021707827,
0.06515407,
-0.019538436,
0.0531206,
0.007928102,
-0.039223887,
-0.020031622,
0.007848442,
0.02391591,
0.014990736,
0.11268782,
0.06107525,
-0.011977935,
0.016781967,
0.045509085,
0.0013573953,
0.009146736,
0.013215661,
-0.01195797,
0.02703829,
0.007053157,
0.022530165,
-0.013689941,
-0.004301088,
-0.0007768117,
0.033448935,
0.011239952,
-0.05143586,
-0.07399211,
-0.031036023,
0.019600574,
-0.0103345895,
-0.0029444918,
-0.0047988347,
-0.10445514,
0.034700666,
-0.024362778,
-0.0471351,
0.03554556,
0.037065983,
-0.016996143,
0.005622871,
0.050610665,
-0.008597168,
0.0059816362,
-0.12275667,
0.03674253,
-0.022365745,
-0.00964108,
0.07596107,
0.08905326,
0.016492268,
0.044219263,
0.06803503,
0.06454952,
-0.050047003,
-0.0017108961,
-0.00074994087,
0.09930796,
0.09251372,
-0.011378917,
0.050366722,
0.07712465,
0.009745006,
0.1009996,
0.03286012,
0.064262226,
-0.044561703,
0.038564857,
-0.019407123,
0.03742708,
-0.0017875227,
0.011954917,
0.01135132,
-0.10406638,
0.06980167,
0.019202363,
-0.028420014,
-0.0136866,
0.048647687,
-0.015362756,
-0.034191117,
-0.055556074,
0.0050155777,
0.025966194,
-0.0009168385,
-0.0042535486,
-0.06399157,
-0.059880342,
0.081461415,
0.014113321,
-0.038159303,
-2.1536519e-33,
-0.027272146,
-0.034751415,
-0.024606032,
0.026892362,
-0.09076156,
-0.045825478,
0.01362092,
0.0023044816,
0.054052215,
0.032981824,
-0.029818065,
-0.058822677,
0.09836217,
0.032525893,
0.110115595,
0.020737587,
-0.09583008,
0.0005333771,
0.0019376605,
0.017484892,
-0.06849545,
0.064435944,
-0.050152197,
-0.048923954,
-0.027651085,
-0.014845199,
-0.12104595,
-0.04417338,
-0.011146107,
0.058580566,
-0.007487375,
0.038694676,
-0.07034722,
0.030289542,
0.055677116,
-0.0011476888,
0.017125413,
-0.042026866,
-0.016522061,
-0.025752945,
0.11801853,
0.042021915,
0.06467938,
0.046182197,
0.015046265,
0.029888034,
-0.039066464,
0.087210484,
-0.012382869,
-0.035691217,
-0.0481768,
0.041446336,
0.03895,
-0.025257591,
-0.028859945,
-0.029144095,
0.029815607,
0.051508367,
-0.08636757,
-0.06916314,
-0.07273463,
-0.059568703,
0.00502403,
0.025671752,
-0.022013027,
0.024832714,
-0.09721394,
0.0063272356,
-0.04942868,
-0.13045275,
0.1247814,
-0.013577642,
-0.022800498,
0.03898444,
-0.07545284,
0.04942631,
0.00082998566,
0.004718136,
-0.04070612,
0.063641116,
0.11005218,
0.020110086,
-0.048857097,
0.05847898,
-0.066304415,
0.026930936,
-0.06279101,
-0.014113123,
0.023336235,
0.023582496,
-0.0020861977,
0.07764345,
0.03095139,
0.020153554,
-0.020101866,
-2.4304368e-08,
0.020170629,
-0.008566916,
0.06203045,
-0.0083030015,
0.02522894,
0.08902528,
-0.008051052,
-0.01893583,
-0.0355399,
0.06187224,
-0.017073143,
-0.030130422,
-0.10230193,
-0.06516148,
-0.004159112,
0.10910979,
-0.021820752,
-0.05356566,
0.011770625,
0.052257556,
0.058287114,
0.0053074392,
-0.05998588,
0.0871507,
-0.082790464,
-0.040782016,
0.06573996,
0.028298022,
-0.012104256,
-0.07195988,
0.014542897,
-0.032275774,
0.0027686171,
0.038691588,
0.05546941,
-0.015204906,
0.054877073,
-0.025119307,
-0.0337842,
0.0030478975,
-0.037556846,
0.015074203,
0.022833891,
0.012173256,
0.035718966,
0.0068811844,
-0.040539283,
-0.04956289,
-0.054521065,
-0.07317816,
-0.024969948,
-0.0021052386,
-0.013215133,
-0.06650142,
0.02316441,
0.046906833,
-0.13285862,
-0.010965043,
-0.024110796,
0.043096602,
0.024323147,
0.069191284,
0.15650614,
0.0177121
],
"index": 0,
"object": "embedding"
}
],
"model": "all-minilm:l6-v2",
"object": "list",
"usage": {
"prompt_tokens": 21,
"total_tokens": 21
}
}
},
"is_streaming": false
}
}