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": [
"What is the secret string?"
],
"encoding_format": "float"
},
"endpoint": "/v1/embeddings",
"model": "all-minilm:l6-v2"
},
"response": {
"body": {
"__type__": "openai.types.create_embedding_response.CreateEmbeddingResponse",
"__data__": {
"data": [
{
"embedding": [
-0.07471535,
0.08136051,
-0.0646403,
0.011820692,
-0.074530184,
0.02182932,
0.077565186,
0.012791591,
0.05854512,
-0.014144753,
0.054007743,
-0.026551379,
-0.018058892,
-0.060439672,
-0.019246193,
-0.0065063615,
-0.047261372,
-0.048988443,
-0.0904866,
-0.066554815,
0.09284568,
0.021294983,
-0.013393054,
-0.0066470345,
0.008009612,
0.016829057,
0.039714802,
0.021865955,
0.014889775,
-0.039430078,
0.025233349,
-0.036833033,
0.016638417,
0.008795953,
-0.05348616,
0.0361554,
-0.034618407,
-0.009877053,
0.064839765,
-0.015148702,
0.020900138,
-0.07136567,
-0.008516019,
0.051174764,
-0.06211658,
0.059481908,
-0.047928233,
0.07046077,
-0.024866259,
-0.010772497,
0.06539378,
-0.03691645,
-0.08241172,
0.081707805,
0.017110538,
0.0129555175,
-0.047113538,
0.0025686903,
0.008714549,
0.09987858,
0.0496949,
-0.025898866,
-0.017353507,
0.03393223,
0.038376898,
-0.054239143,
0.00860024,
-0.040809266,
0.02656175,
-0.071856335,
-0.019946808,
-0.041174017,
-0.07246157,
0.00040759498,
0.018743936,
0.023058625,
0.0166551,
-0.063356385,
0.034956083,
0.05005474,
0.00041865162,
-0.06177827,
0.006278017,
0.11141626,
0.0040813377,
0.08571246,
0.023260446,
0.057005797,
-0.03149278,
-0.013331491,
-0.04513824,
-0.11731193,
0.0160608,
-0.016902346,
-0.028950376,
0.03577902,
-0.051558092,
0.03297068,
-0.11266136,
0.06640369,
0.037849367,
0.022930682,
0.05809001,
-0.03963197,
-0.03245654,
0.01767903,
-0.005010206,
0.019044327,
0.07743703,
-0.020407042,
-0.020311069,
-0.00953332,
0.003143125,
-0.00456264,
-0.02911311,
0.03384037,
0.00048523775,
0.06419016,
0.01071009,
0.124172516,
-0.0053817774,
0.004929672,
-0.059669737,
0.029508028,
-0.13410243,
0.016187606,
-0.048119176,
-6.608228e-33,
0.012317927,
0.060396116,
0.036468223,
-0.035990786,
-0.041977834,
0.01232469,
-0.08480998,
0.012524896,
0.027948672,
0.086107045,
-0.030785998,
-0.06136775,
-0.0009515558,
-0.025208496,
0.045449734,
-0.027582139,
-0.0095786555,
0.0067018326,
0.043680843,
-0.021498295,
0.003277214,
0.11862199,
0.047027264,
-0.13488089,
0.025457613,
-0.010294456,
0.0022531834,
-0.061856117,
0.10388324,
0.01866347,
-0.0017658875,
-0.051914714,
0.04644036,
0.037606996,
0.03376949,
0.006641087,
0.022004316,
-0.07835444,
-0.008207682,
0.027414316,
0.0173955,
-0.075223684,
0.006482484,
0.02727821,
0.00059299107,
-0.010945533,
-0.020044776,
-0.000120837554,
0.013701114,
0.004716937,
0.02277811,
0.015490094,
-0.0142633,
-0.013935009,
0.015847908,
-0.02308094,
0.033789054,
-0.039197993,
-0.043216396,
0.029982513,
-0.016503252,
0.0698185,
0.046076864,
0.053330805,
-0.055297256,
0.025112566,
0.014026739,
-0.09400958,
0.035901215,
0.029467817,
-0.1319919,
-0.0050726864,
-0.037837584,
-0.0318086,
-0.09549526,
-0.027866103,
0.002436243,
-0.007881375,
0.058288272,
-0.031986125,
-0.0607737,
-0.023380116,
-0.00047972053,
0.13766052,
-0.060590804,
-0.008125084,
-0.03488867,
-0.102469996,
-0.009079019,
-0.018955158,
-0.0016528872,
-0.07709843,
-0.043352164,
-0.03619871,
0.039568264,
3.0214064e-33,
0.0050480226,
0.00017108663,
-0.063063554,
0.012236582,
0.10636841,
0.015972469,
0.0066562137,
0.018790383,
-0.047090903,
0.04585031,
0.007611995,
0.032441676,
0.03210589,
-0.02090312,
0.106981054,
0.0075532557,
0.036063127,
0.14623925,
0.037788242,
-0.043172225,
-0.02176524,
-0.009350843,
-0.06982138,
0.015577218,
0.02114412,
0.030659605,
0.084352896,
-0.09288308,
0.00815284,
0.07806744,
-0.0816394,
0.011901701,
0.017101644,
0.0040163086,
-0.14144793,
0.0040214215,
0.04631442,
0.008958798,
-0.0056624487,
-0.055584785,
0.028006915,
0.055925272,
0.062281866,
0.0860523,
-0.12157215,
0.021931145,
-0.0050777225,
0.029814675,
-0.012117963,
0.048798613,
0.06408485,
-0.041422654,
0.018091682,
-0.028209666,
-0.021357967,
0.055625696,
-0.15479031,
0.027474454,
0.018845506,
0.04327976,
0.011504344,
0.017370872,
-0.023188887,
0.050985955,
0.029468553,
0.012529372,
-0.045431048,
-0.00222149,
-0.05612193,
-0.07891998,
0.0796125,
-0.02043551,
-0.076230876,
0.011581566,
-0.035624538,
-0.0480372,
-0.066065714,
-0.057384264,
-0.040163297,
0.071754575,
0.031339016,
0.023032097,
-0.023996511,
0.023609873,
0.09607155,
-0.06843605,
0.014263025,
0.088031664,
-0.037747264,
0.029464351,
-0.028663024,
0.10216597,
-0.06609628,
0.0228385,
0.04214049,
-1.4813483e-08,
0.030838875,
0.043892786,
-0.024579313,
-0.09817689,
0.0566737,
0.09298153,
-0.010350536,
-0.09840461,
0.018022444,
-0.0131554445,
0.026413994,
0.00880124,
-0.052855253,
-0.04217533,
0.030118503,
0.017092122,
-0.06243192,
-0.018758481,
-0.015982535,
-0.018381983,
-0.026471734,
0.010303105,
-0.03048123,
-0.08456848,
-0.054054197,
0.0100427205,
0.029534454,
0.1355571,
0.033424437,
0.12097715,
0.04077808,
0.0081999,
-0.018245617,
-0.056846414,
-0.12899645,
0.12415884,
-0.053460255,
-0.038143307,
0.030224878,
0.019799955,
0.047839224,
0.029400205,
0.0015434423,
0.06115486,
-0.055583358,
-0.030215869,
0.10799345,
-0.07073566,
-0.08214588,
0.0045075943,
-0.0155852465,
-0.013693905,
-0.00234985,
0.026380839,
-0.015793327,
0.016262477,
-0.040624544,
-0.013973127,
-0.08311349,
0.03198475,
0.05000169,
-0.0038599824,
0.07030323,
0.0049196184
],
"index": 0,
"object": "embedding"
}
],
"model": "all-minilm:l6-v2",
"object": "list",
"usage": {
"prompt_tokens": 6,
"total_tokens": 6
}
}
},
"is_streaming": false
}
}