Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add pgvector as vectorstore #522

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Conversation

Abirdcfly
Copy link
Collaborator

@Abirdcfly Abirdcfly commented Jan 8, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it

Which issue(s) this PR fixes

Fixes #122

Special notes for your reviewer

collection_id embedding document cmetadata custom_id uuid
a79c2a40-f294-4f41-9329-dfbb7587ce42 [-0.0012137949,-0.01627453,-0.29887754,-0.15064785,0.18556964,-0.0054863095,-0.018341854,0.14186022,-0.15160587,0.32042432,0.12986974,0.10587247,0.062361706,0.19167428,-0.122019455,-0.19534577,0.18896861,0.074173495,-0.20890827,-0.114406824,0.058532856,-0.13274224,-0.03907444,-0.027943974,0.10992267,0.11519617,-0.12559476,-0.13631818,-0.096149966,-0.28476387,-0.036539335,0.07999022,0.10625024,-0.081889704,-0.012332646,0.0511827,-0.30168033,0.25154486,0.22629686,-0.07815949,-0.012347159,0.30410376,0.14833578,-0.057312656,-0.0022729754,0.062316865,0.115179636,0.078375235,-0.019557651,0.13999477,0.0026726245,-0.0486658,-0.142802,-0.13045342,-0.24166664,-0.24624738,-0.16341826,0.09350339,0.18473077,0.4284048,-0.06657189,0.32504377,0.064574026,0.13750733,-0.099156424,-0.02423546,0.11913091,0.00695329,-0.24502592,-0.27141935,-0.012099944,0.032004178,-0.24789572,-0.04784686,0.17778829,-0.07966299,0.16059065,-0.1467757,0.19080648,0.21836963,0.20416877,0.2002398,-0.09443957,0.050842285,-0.1425586,0.08621045,-0.0014072836,0.15081774,0.2979713,-0.054784674,-0.12767677,0.33520865,0.06613692,-0.058446027,-0.011237973,0.105889365,0.16255923,-0.15268524,-0.17803614,-0.13315453,0.053300798,-0.053506482,-0.12538627,-0.07583292,-0.018486986,0.35445178,0.05397554,-0.029658651,0.16016385,0.047108337,-0.043380104,0.2796821,-0.04973564,-0.08290937,0.04997021,0.060030054,0.02208012,-0.07208617,0.20205872,-0.33760506,-0.027052347,-0.011205064,0.09237504,0.0014191329,-0.03541252,-0.04602454,0.30219704,-0.20137262,-0.09911149,-0.08688988,0.04972934,-0.17415316,-0.24589154,0.029692184,-0.26894826,0.12542208,-0.16370349,0.033127576,-0.22902513,0.12925275,0.03842619,0.06592233,0.108465746,0.366819,0.0590656,-0.36322707,0.054757185,0.047969557,0.14267996,0.19340834,0.2779137,0.21363243,-0.021875393,-0.21688259,0.19810452,0.09590119,-0.29552466,-0.092654504,0.09103398,-0.13666482,0.07758307,0.106437005,0.024839401,0.013622075,-0.25166267,0.07433418,-0.030963516,-0.35626417,0.07873474,-0.34017643,0.12742274,0.2321529,0.029199917,-0.2307467,-0.20127635,-0.003339513,-0.014847132,0.0067399233,0.012364805,0.021094654,0.21676917,-0.32497483,0.079431176,0.16660671,0.19502953,0.016223159,0.0071525513,0.032592498,-0.15752788,-0.01890325,-0.062320806,-0.36790416,0.044657104,0.092752546,0.23554568,0.24326412,-0.1263734,-0.2635668,-0.17287974,0.13353108,0.082927406,-0.20786023,0.08502566,-0.031721868,-0.13940695,0.011748376,0.11471371,-0.13394335,0.057450026,0.32656735,-0.20116258,-0.08884704,0.017516539,-0.17212987,-0.08419243,0.16023593,0.17248526,0.35698545,-0.02530522,0.114697434,-0.38529307,-0.02747267,0.095379435,-0.030384678,-0.067339495,-0.20595868,-0.059295572,-0.045949113,0.077019274,-0.06557373,-0.21299405,0.11277471,-0.0018990592,0.116786346,-0.038882762,-0.023051104,0.08063882,0.31854373,0.081830405,0.06540259,-0.09817882,-0.22638173,-0.2766449,0.076662675,0.29853,-0.11754377,-0.11114283,0.020340208,-0.03874865,-0.045976363,-0.22232647,0.09774196,-0.19859213,-0.20114632,-0.28875536,0.010973337,-0.15269789,-0.101234235,-0.05759543,-0.26849586,0.18741485,0.07826705,0.36285567,-0.1694862,0.10275892,0.115667,0.08599068,-0.124871776,0.039363477,0.10798719,-0.08584738,-0.135667,-0.14323823,0.012743945,0.07137223,0.3434019,-0.16571918,-0.015593651,0.14362608,-0.09795326,-0.15382405,-0.09223075,0.0898623,0.23007254,-0.12909117,-0.21103902,0.10210954,-0.22464141,-0.08775505,0.22562127,0.07097672,-0.18151513,0.16695444,-0.089870945,-0.38296142,0.12426078,-0.24274679,-0.13657501,-0.080066346,0.114820585,-0.026254814,0.12708475,-0.07946059,-0.078123316,-0.033568762,0.02819525,-0.045604866,0.07869432,0.15290047,0.1297495,0.03769469,0.040938795,-0.028377812,0.08166784,0.13124733,-0.17225532,-0.10505494,-0.13580497,0.025383735,-0.14786895,-0.2760997,0.31993487,0.11639042,-0.010311494,0.01284188,-0.16434388,0.011988032,-0.13174647,-0.11749931,-0.13822027,0.04663176,0.13450964,-0.053085715,0.00026913063,0.1535886,-0.1735427,0.1049483,-0.045983654,-0.13808817,-0.19282928,0.22031288,-0.21674907,-0.010833937,-0.033284098,0.11744124,0.12786579,-0.3145692,0.05414653,-0.08739773,0.11737295,0.32660708,-0.024006376,-0.010516489,0.19013275,-0.032883912,0.19758609,-0.12055139,0.02808721,-0.040796943,0.06787499,0.121222615,-0.15359206,-0.09140733,-0.11350989,-0.010341877,0.1575319,0.02610753,0.22167566,0.090685174,0.03804333,0.037979733,0.05742029,-0.033608675,-0.0084355455,-0.046110567,-0.056862764,0.037491415,0.23342879,0.1460526,0.016794842,0.04038862,-0.08757304,0.023402834,0.07001301,0.07408565,-0.023577165,0.0036034673,-0.16102715,0.018971456,0.22069617,-0.16070214,0.08103865,-0.09438695,-0.19222975,-0.10494866,-0.0011375204,-0.09431766,-0.29002458,0.22614431,-0.11916206,-0.20667568,-0.15737103,-0.11038387,-0.033033054,0.2748346,-0.21248627,0.06435461,0.15322971,-0.0409408,0.14914581,-0.03258024,0.0437159,0.0004085841,0.14304978,0.08841152,0.21691473,-0.15346165,-0.16894004,0.06571084,0.075187124,0.17904958,0.18569154,-0.22827646,-0.112693444,-0.049323995,0.04476766,-0.15157442,0.007886285,0.13137542,0.16959342,0.019437332,0.3034669,-0.21984538,0.046143025,-0.05200086,0.22618024,-0.12811515,-0.04395021,0.018662851,0.2666656,0.055861842,-0.07550811,-0.13424301,-0.044374038,-0.09816122,-0.0378616,0.026718572,0.28944704,-0.011605704,-0.078224674,0.09135046,-0.015131461,0.14277944,-0.124198854,-0.1264849,-0.1916459,-0.20634827,-0.14875652,-0.023308074,-0.07814376,0.076192774,-0.043312706,0.2975331,-0.063550815,-0.0781299,-0.14858826,0.012995395,-0.04056874,0.21839842,-0.038585477,-0.15336837,-0.1976771,-0.003640391,-0.119367026,0.009487239,0.055576872,-0.11735777,0.28139457,0.36074105,-0.40528947,0.26464868,0.028161779,0.01668623,0.13530973,0.032194488,0.13331492,-0.12788332,0.00012236834,-0.112648726,0.15321861,0.06924368,-0.017459398,0.03303682,0.042544913,-0.11520469,-0.24368283,0.052214693,-0.017674807,0.11536841,-0.101808034,-0.10408932,0.06251663,0.09485161,-0.12621412,-0.28671166,0.31958708,0.26776093,-0.08657151,-0.1294876,-0.22142084,0.04900673,0.09830935,0.14479086,-0.2155428,-0.08517798,0.094546504,-0.14710455,0.09655792,0.03727327,-0.07315047,-0.15774477,-0.11846864,-0.1614166,0.19353452,-0.12815225,-0.16625981,0.34824443,-0.08587541,-0.13404691,-0.01433638,0.083703734,-0.08646386,0.28575045,0.12313546,-0.039627224,0.22919004,0.13194111,-0.00315713,-0.18475394,-0.14891835,0.074332416,0.031858504,0.10284189,0.21005452,-0.13111202,0.18879102,-0.1453358,-0.1233956,-0.18688017,-0.17172524,0.087689206,-0.18815859,-0.047631096,0.16016446,0.16857186,0.06972718,0.341668,0.10982921,-0.22060609,0.06156236,-0.16898294,-0.09831973,0.038960908,0.03957661,-0.23300305,-0.047734033,-0.13326517,0.22050431,0.19212823,-0.03787114,0.021120742,0.24966268,0.016220324,-0.13309206,0.13722755,-0.06215682,0.15012826,-0.056153554,0.108525515,0.1260101,-0.120458424,-0.056174535,-0.08354898,0.14590257,0.0756943,0.17720458,0.12953606,0.07712829,-0.09195644,0.025114555,-0.14688392,-0.11574571,0.004936653,-0.15788214,-0.11354645,0.021774217,0.22315279,0.16758734,-0.19199035,0.24984542,-0.14508727,-0.015182987,0.03488981,-0.1986157,0.18567285,0.0016622662,0.08468509,0.05601251,-0.30027384,0.029856969,0.04098266,0.118859425,-0.1217386,0.049351793,-0.14092459,-0.18378383,0.13530675,0.22543104,-0.12047567,-0.2150704,0.050391722,-0.21910301,-0.06620353,-0.13465199,0.08723872,0.07143836,-0.061856292,0.059810985,0.24955764,0.15004578,-0.1489398,-0.028155213,-0.02591927,-0.19586173,0.07016875,0.022824585,0.14966114,-0.03360662,0.14284138,0.1713458,-0.13050325,0.04056429,-0.12979981,-0.1972702,0.02269763,0.021324387,-0.27750868,-0.08088839,0.08631213,-0.05408119,0.16004011,-0.16166274,0.2091649,-0.08543437,0.19403635,0.39749315,0.029443884,0.16504829,-0.14703006,0.009466055,0.2342668,0.053985715,-0.08539684,-0.25745425,-0.1159595,-0.19106126,0.18172005,0.23501906,-0.215023,-0.323414,0.32340354,-0.2792732,-0.2567249,-0.019907331,0.03823605,-0.38382795,-0.14623606,0.02747103,-0.347159,0.010028121,0.06760897,0.13632074,0.06340208,0.14206883,0.2345753,0.080727145,-0.15564673,-0.024865095,-0.08898155,0.031218445,0.09585983,6.373153e-05,-0.1637986,0.30124307,-0.011609349,0.056100834,-0.1937637,-0.16387022,0.39119545,0.30788156,0.16239011,-0.18149185,-0.080758065,-0.12412661,0.021951173,-0.28123343,0.18607137,-0.14966851,0.10303108,-0.0024485625,0.21423975,-0.0057421983,0.4328487,0.012095576,-0.035211556,0.29022866,-0.03798087,0.1984971,-0.105520055,-0.2522771,-0.19096348,-0.4750665,0.16674903,0.091776274,0.051136963,-0.2122499,-0.150732,0.32473555,0.06284635,0.08699967,0.12265225,0.12865898,0.16183023,0.081473485,0.0065360083,-0.0808399,0.12219375,-0.047004193,-0.008061928,-0.042328034,-0.0065724356,0.11471844,0.035449058,0.04170733,0.061031353,0.07106969,0.3383735,0.1318867,-0.2556902,-0.3076729,-0.044307195,0.19105208,0.028545931,0.13342485,-0.1358627,0.18742475,-0.028500315,-0.1497369,0.28714794,0.18945235,-0.10645827,0.00517585,0.06587036,-0.04183644,0.03882249,-0.25685543,-0.018529631,-0.08309035,-0.14309162,-0.05948738,0.004470716,0.041996438,-0.022123957,0.1931319,-0.023905132,-0.05986593,0.10936747,0.11848509,-0.0047284663,-0.12214198,0.15904304,-0.42881694,-0.023537135,0.018674273,-0.4506051,-0.072636224,0.10764074,-0.06893481,-0.05931682,0.07690036,0.0051036654,0.13066404,0.23117967,0.1271193,-0.09848816,0.10070238,0.10268321,0.069573835,0.07129276,0.15142234,2.6952488e-08,-0.17795818,-0.092227444,0.010382788,0.099097416,-0.13359335,-0.016316168,-0.054000378,0.03692802,0.19407253,-0.122464195,-0.12985182,-0.10343224,0.027980229,-0.02925679,-0.069459036,0.26077658,0.2325761,-0.22494979,-0.35052785,-0.18488026,0.016772753,-0.16411692,-0.06401871,0.29066893,0.046266332,0.17858358,-0.08507654,0.4093646,0.021241898,0.01666185,-0.11904751,0.18386474,0.18999591,0.23513703,-0.2918889,-0.048257437,0.15092187,-0.13608257,-0.07820374,-0.08509189,0.025134867,-0.20177901,0.07099413,-0.0005590923,0.030711407,0.13437945,-0.2766088,0.13121772,0.13664015,0.04606528,0.122526005,-0.36132658,-0.033400647,-0.23706226,0.17108075,0.050895117,-0.006458399,0.2846263,-0.20494004,0.101886556,-0.010426725,0.3907953,0.026768267,-0.023191502,-0.16400321,0.19998226,0.3281369,0.10478467,-0.25703892,-0.25895566,-0.24948911,0.025767332,0.009872859,0.4012494,0.21715176,-0.12517363,-0.10176875,0.1430722,0.008418471,0.1046566,-0.16841504,-0.123989485,-0.12723605,-0.009732494,0.009725938,-0.33919978,0.31841502,-0.18722284,0.13420987,-0.079814,0.04116376,-0.100009605,0.12049477,0.22349708,0.16837278,-0.035339296,-0.30119655,-0.1242799,0.29853153,-0.036236234,-0.07938617,0.11440082,-0.049718417,-0.04456926,0.20100817,-0.007291584,-0.020609934,0.15228572,0.11598585,-0.15913704,-0.12522918,-0.17781723,-0.060534786,0.31549016,-0.30503604,0.13317318,0.13611548,-0.008808553,0.18597165,-0.18858114,0.03518981,0.31020394,-0.13543317,-0.078912005,-0.08679686,0.17449239,-0.09263186,-0.010966027,0.13572778,0.15571497,0.15192756,0.11532233,-0.013091694,0.15492032,0.106454395,-0.063637495,-0.22009988,0.028187012,0.049077738,0.12239257,0.5830882,0.28530228,0.0758682,-0.4135266,-0.14716871,0.09000088,-0.19009797,0.20973916,0.014257302,-0.08131992,-0.117750145,-0.27979678,-0.053777557,0.018542215,0.11327298,-0.1382599,-0.060703795,-0.053437077,-0.14069197,-0.3001089,0.038753945,-0.15088207,0.08383961,-0.008418026,0.18105833,-0.22659521,0.29692104,0.39215142,-0.012091652,0.17343655,-0.21304849,-0.09548889,-0.020550843,0.14315537,0.21086541,0.046838112,0.02191762,0.023431713,0.20443794,-0.08538741,0.02601314,-0.16972753,0.11462836,-0.11805041,0.39604622,-0.025860485,0.05184076,0.03356752,-0.045890413,0.19937256,0.04414761,-0.06486678,0.17000762,0.20330913,0.057763327,0.06836419,-0.12669459,-0.29591,-0.3165992,-0.24508218,-0.38491094,-0.21221805,0.036103904,0.019153569,0.14388251,-0.0377556,-0.035323378,-0.06883999,-0.043445915,-0.041686647,0.023585027,-0.1399101,-0.1010129,-0.18053892,-0.029968912,-0.17923358,0.22831741,0.08030359,-0.16442463,0.1414377,0.13718733,-0.03144061,-0.0054521905] q: 产假的具体内容是什么? {"a":"符合国家计划生育条例规定的女员工依法享受相应产假,在产前 15 天开始计入产假。配偶生育的给予男员工相应陪产假。2、孕期女员工在工作时间内进行产前检查必须提供政府计生部门出具的准生证明原件及当地区级或二级以上医院开具的产检证明,则视同出勤,产检假期如下:怀孕第 1-6 个月,每个月可享受 1 天假期;怀孕第 7-8 个月,每月可享受 2 天假期;怀孕 9 个月以上,每月可享受 4 天假期,但其中 2 天已包括在预产假中。产检假提前至少 1 天在钉钉申请。3、女员工申请产假前须提供准生证明原件,提前至少 3 天在钉钉申请产假,人力资源部审核确认并存档。在产后 90 天内将婴儿出生证明原件及其他证明原件交至人力资源部,以便核实具体产假时间及办理相关生育费用报销手续。4、女员工在婴儿 1 周岁以前,公司给予其每天 1 小时的哺乳时间,对于生育多胞胎的,每多 1 个婴儿每天增加 1 小时哺乳时间。具体时间须提前与直属上级和部门负责人协商,报人力资源部审核确认并存档。5、男员工申请陪产假必须提供婴儿出生证明原件和结婚证原件,自婴儿出生后 2 个月内休完,逾期视其自动放弃休假,且公司不予任何形式补偿。试用期男员工陪产假需转正后方可申请。6、产假、产检假、陪产假、流产、男女员工节育假期按国家规定必须为连续不间断计算,均包括法定节假日和双休日。产假及相关衍生假期间按照不低于当地最低工资标准发放工资,待生育津贴报销后补齐差额,不计发其他奖金福利补助。7、违反国家计划生育条例规定的女员工不享受产假与产检假期间的工资待遇及其他奖金福利补助,期间按事假规定处理,且自行承担生育等费用。","fileName":"dataset/dataset-playground/v1/qa.csv","lineNumber":16} 1f8d07a4-1ffe-4c93-b2eb-94982e94a775 06a80369-75ad-4269-86bc-7e7a7da2b356

@Abirdcfly Abirdcfly force-pushed the pgvector branch 15 times, most recently from 1c12849 to ddc4352 Compare January 8, 2024 09:58
@Abirdcfly Abirdcfly marked this pull request as ready for review January 8, 2024 11:01
@Abirdcfly Abirdcfly force-pushed the pgvector branch 3 times, most recently from 9786b46 to 2b4bb7e Compare January 9, 2024 03:32
@Abirdcfly Abirdcfly marked this pull request as draft January 9, 2024 03:32
@Abirdcfly Abirdcfly force-pushed the pgvector branch 8 times, most recently from 3a10050 to 90aeed7 Compare January 9, 2024 06:06
@Abirdcfly Abirdcfly force-pushed the pgvector branch 18 times, most recently from 8af7292 to fbb43c1 Compare January 9, 2024 16:45
@Abirdcfly Abirdcfly marked this pull request as ready for review January 9, 2024 23:58
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
@bjwswang bjwswang merged commit 0dd9a1f into kubeagi:main Jan 10, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support pgvector
2 participants