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": [
"test query"
],
"encoding_format": "float"
},
"endpoint": "/v1/embeddings",
"model": "all-minilm:l6-v2"
},
"response": {
"body": {
"__type__": "openai.types.create_embedding_response.CreateEmbeddingResponse",
"__data__": {
"data": [
{
"embedding": [
0.06829144,
0.061772227,
-0.0064161597,
0.082678765,
-0.07824987,
0.026521353,
0.13125585,
0.041369338,
-0.019540362,
-0.02709599,
0.0887907,
-0.10275329,
0.050712623,
-0.07134879,
-0.009282846,
-0.039247703,
0.028860288,
-0.01049117,
-0.024684245,
-0.035460133,
-0.04094595,
-0.009883736,
-0.026154075,
0.057957783,
-0.00061253883,
0.0076184087,
0.013905776,
-0.0016500223,
0.044650607,
-0.05900644,
-0.037936445,
0.037789088,
-0.03326097,
0.07172011,
0.09720765,
-0.082623295,
0.027609807,
-0.014166528,
0.018201344,
-0.0026497827,
-0.024251994,
-0.114919275,
0.08516042,
-0.01674906,
-0.0063111004,
0.06525075,
-0.058014978,
0.09666779,
-0.014186084,
-0.006836795,
-0.09889106,
-0.015126775,
-0.0783394,
-0.03557229,
-0.008273864,
-0.013632112,
-0.07621237,
-0.03039195,
-0.0135569805,
0.050146695,
-0.01059567,
-0.03840819,
0.0674032,
0.035650622,
0.010801949,
-0.07822949,
-0.0068962453,
-0.03009482,
0.055947337,
-0.07680802,
-0.009078504,
-0.002788809,
-0.02937109,
0.06879565,
0.013748122,
0.030850956,
-0.03644146,
-0.07147028,
0.05473256,
-0.028970802,
-0.064664625,
-0.059753876,
-0.067655295,
0.022762805,
0.07949517,
0.051779337,
0.14793634,
-0.0025083658,
-0.05545431,
-0.027768994,
0.019383226,
0.06685648,
-0.0795505,
0.01904091,
-0.00094253226,
0.0134609025,
0.03820869,
-0.040206373,
0.0649827,
0.13925305,
0.059302386,
0.018050361,
-0.049063586,
-0.057463937,
-0.17034325,
0.0098234955,
0.04479311,
-0.08709996,
0.046848226,
-0.02031104,
-0.062256135,
0.030291956,
0.04995267,
-0.03062274,
-0.007244306,
-0.06063938,
-0.0057327296,
0.028709931,
-0.055921447,
-0.006099839,
0.07552849,
0.073059924,
-0.031967085,
-0.027995033,
-0.0013227675,
0.0237769,
0.08236448,
-2.0790976e-33,
0.014696224,
-0.0849667,
0.05938996,
-0.007827523,
-0.015969144,
0.025970377,
0.03762491,
0.1256464,
-0.04001108,
0.024740757,
0.014459392,
-0.063038975,
0.0340931,
-0.0076668505,
0.008167134,
0.10462719,
0.018821232,
-0.021525906,
-0.04383254,
0.05684103,
0.016244315,
-0.07351815,
0.02012839,
0.05243149,
0.015002977,
-0.06589196,
-0.032537818,
0.024986163,
0.018428918,
-0.0003134351,
-0.06270619,
-0.0061910586,
-0.16043852,
0.028163772,
0.033009354,
0.03727067,
0.05406701,
-0.007932531,
-0.008608034,
0.054109853,
-0.046951395,
-0.03869324,
0.084930494,
-0.005905675,
0.021937586,
-0.052074514,
-0.047481276,
-0.054886986,
0.034032077,
-0.02832154,
-0.032060325,
-0.0013834401,
-0.040383566,
-0.017775834,
0.05222146,
0.0038051854,
0.008726582,
0.032692313,
0.010791591,
0.11194475,
-0.019752404,
-0.045764305,
-0.0020202047,
0.020939285,
-0.006159919,
-0.0017409867,
-0.0068266885,
-0.081341885,
0.091841556,
0.048661314,
0.07770758,
-0.058719456,
0.0063417573,
0.0036042097,
-0.071244255,
0.022036737,
0.019486615,
0.101281255,
0.0066442927,
-0.044674896,
0.06144362,
-0.09196092,
-0.0133002605,
0.014585881,
-0.017600225,
0.007354116,
0.006177494,
-0.048051644,
0.013157643,
-0.07767093,
0.014147597,
0.035391673,
-0.026176892,
0.002718191,
0.08641935,
9.148517e-34,
-0.022012252,
0.05088286,
-0.02727955,
0.028613139,
0.013718326,
-0.07109317,
0.09039982,
-0.090625234,
-0.06567498,
0.06685471,
0.066993244,
-0.05015442,
0.019033352,
-0.041487213,
0.012605603,
0.06907699,
0.0281946,
-0.070972204,
-0.061149873,
0.031668104,
-0.09625139,
0.13133687,
-0.0035538,
-0.027149519,
-0.06298852,
-0.0009207272,
-0.008693039,
-0.031348817,
-0.018568903,
0.011527607,
0.07185478,
-0.071952716,
-0.0059043416,
0.09352268,
0.046653684,
-0.031974927,
0.069581434,
-0.045875963,
0.010133493,
0.064104505,
0.07243221,
0.04723149,
0.04880478,
0.06762142,
0.005496453,
0.035764992,
0.01831371,
-0.038210426,
0.050088413,
0.041379653,
-0.02544787,
0.021565115,
0.014279919,
-0.0071081445,
-0.014286643,
-0.010122217,
-0.091654085,
0.009356054,
0.0043320316,
-0.009591156,
-0.029850187,
0.17471492,
-0.0045922897,
0.05783941,
-0.044838578,
-0.051453117,
-0.045911513,
0.007451434,
0.0054590874,
0.039563954,
-0.05625489,
-0.0022330268,
0.047820278,
-0.039598763,
0.027334856,
0.039694488,
-0.07971524,
0.03508072,
0.029276432,
0.010155507,
-0.039020576,
-0.027874392,
-0.040846046,
0.046112783,
-0.069308,
0.061977327,
0.039240442,
0.025863856,
0.0064374707,
0.053631745,
0.06962397,
-0.008001055,
-0.03827026,
-0.10952415,
0.018512232,
-1.3332562e-08,
-0.025684418,
-0.07470214,
-0.019860886,
0.0385072,
0.027302178,
-0.010903615,
-0.03522558,
0.036009304,
-0.06320341,
0.011506822,
0.03339635,
-0.012044345,
0.004013396,
0.016582591,
-0.007978201,
-0.041656163,
-0.07090684,
0.008757652,
0.004474724,
-0.038768765,
-0.05130229,
0.017759493,
-0.018255858,
0.043951545,
-0.04284978,
0.08247418,
0.015467272,
0.022083104,
0.044421837,
0.022857197,
0.08298176,
-0.012647776,
0.013097686,
-0.06692538,
0.047861587,
-0.04503364,
0.006510086,
0.0056154854,
-0.019552445,
-0.017313117,
-0.038419757,
-0.00048296133,
-0.008638455,
-0.026783587,
-0.06596831,
-0.14337558,
0.041494913,
-0.04859091,
0.012739855,
-0.085007615,
-0.010923813,
-0.03816371,
0.03006815,
-0.03887654,
-0.036665756,
0.046499304,
0.036260363,
0.052359663,
-0.09627654,
-0.041531097,
0.05020932,
-7.9168685e-06,
0.0019163007,
0.0195528
],
"index": 0,
"object": "embedding"
}
],
"model": "all-minilm:l6-v2",
"object": "list",
"usage": {
"prompt_tokens": 2,
"total_tokens": 2
}
}
},
"is_streaming": false
}
}