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

postgrest.exceptions.APIError, invalid input syntax for type vector #715

Closed
smearumi opened this issue Mar 1, 2024 · 2 comments
Closed

Comments

@smearumi
Copy link

smearumi commented Mar 1, 2024

Bug report

Describe the bug

I'm getting the error "postgrest.exceptions.APIError, invalid input syntax for type vector"

To Reproduce

Code:

from angle_emb import AnglE
from supabase import create_client, Client

angle = AnglE.from_pretrained('WhereIsAI/UAE-Large-V1', pooling_strategy='cls').cuda()

url: str = "https://**************.supabase.co"
key: str = "*************"
supabase: Client = create_client(url, key)

vec = angle.encode("Hello World", to_numpy=True)
response = supabase.table('test_table').insert({"embedding": vec.tolist()}).execute()

Error:

postgrest.exceptions.APIError: {'code': '22P02', 'details': None, 'hint': None, 'message': 'invalid input syntax for type vector: "[[0.503877580165863, 0.5861606597900391, 0.3512960374355316, -0.760463297367096, -0.3244606554508209, -0.11767499893903732, 0.49193480610847473, 0.5839627385139465, 0.8440074920654297, 0.3409149646759033, 0.022288691252470016, 0.32705146074295044, -0.30406156182289124, 0.0651560053229332, -0.7069439888000488, 0.39551305770874023, -0.4320929944515228, -0.45540541410446167, -1.019647240638733, 0.6809148788452148, -0.3553810119628906, 0.07427985966205597, -1.5033824443817139, -0.44530510902404785, -0.36930447816848755, 0.6988912224769592, 0.47240546345710754, 0.015053174458444118, 0.7951098084449768, 0.842624843120575, -0.10242926329374313, 0.055986613035202026, -0.0928923636674881, -0.8606833815574646, -0.15112467110157013, -0.402429461479187, 0.7622116804122925, -0.46801748871803284, -0.47893133759498596, -0.7303699851036072, 0.4982130825519562, 0.12180978059768677, 0.5047042369842529, -0.7136899828910828, -1.1218510866165161, -0.17484703660011292, 0.6192432641983032, -0.04051909223198891, 0.8455267548561096, -0.054765209555625916, -0.02139713428914547, 0.7016275525093079, 0.22310110926628113, -0.05673334002494812, -0.19055955111980438, 0.25424516201019287, -1.1392136812210083, 0.25584790110588074, -0.5141251683235168, 0.1615036129951477, 0.40867650508880615, 0.8825546503067017, 0.32965296506881714, -1.3392213582992554, 0.2889671325683594, 0.7801092267036438, 0.1743249148130417, -0.16851328313350677, 0.706475019454956, 0.3365957736968994, -0.5963008999824524, 0.9178218841552734, -0.1695142537355423, -0.6763699650764465, -0.9045243859291077, 0.5351189374923706, 0.2587016820907593, 0.39540237188339233, -0.27498680353164673, 0.6302534341812134, -0.27752238512039185, 0.58503258228302, -0.020683446899056435, 0.095011867582798, -0.8789777755737305, -0.635942816734314, 0.4630003571510315, 0.41408219933509827, -0.26955944299697876, -0.2748437821865082, 0.7624679207801819, 0.5752103924751282, -0.12133462727069855, -0.10038375109434128, 1.046536922454834, 0.6078914403915405, -0.5948526263237, 0.3181835412979126, -0.5723962187767029, -0.01476280577480793, 0.5698022842407227, 0.8470218181610107, -0.7130628824234009, -0.006540012080222368, -0.9096398949623108, -0.6353643536567688, -0.31439536809921265, 0.10547161102294922, -0.7246946692466736, -0.5533115863800049, -0.0329759456217289, 0.6711985468864441, -0.019555456936359406, 0.2779868245124817, 0.048658646643161774, 0.8020039200782776, 0.18324631452560425, 0.5859261155128479, -0.21691803634166718, -0.25012025237083435, 0.410515695810318, 0.41446590423583984, -0.1797041893005371, -0.42597657442092896, -0.2668624222278595, -0.4095556139945984, -0.5127565264701843, 0.9424688816070557, 0.05641009658575058, 0.1466219276189804, 0.052018988877534866, -0.367571085691452, 0.5538275241851807, 0.5631635785102844, -0.05828903242945671, 0.021553324535489082, -0.35635724663734436, 0.5651767253875732, 0.5895651578903198, -0.7101296186447144, 0.03493872657418251, -0.015550808049738407, -0.4625047743320465, 1.4048900604248047, 0.10102511942386627, 0.5279121994972229, -0.25565171241760254, 0.38471975922584534, 0.03849029168486595, 0.7998693585395813, -0.535726010799408, 0.3130398690700531, 0.11279725283384323, 0.677818775177002, -0.2368507832288742, -0.1387338787317276, -0.07483174651861191, 0.2577565312385559, 0.34294167160987854, -0.23912106454372406, 0.0885295495390892, 0.5513173937797546, -0.5363476872444153, 0.08356675505638123, -0.7511001229286194, 0.1925741583108902, -0.9046719074249268, 0.02294168807566166, 0.1698741614818573, -0.22691552340984344, 0.18806575238704681, -0.5842577219009399, -0.4872804880142212, 0.1351097673177719, 0.4151061475276947, 0.35608020424842834, 0.19448640942573547, 0.024429844692349434, 0.658318042755127, 0.3261869251728058, -0.6470474004745483, 0.21622508764266968, -0.046665940433740616, 0.76929771900177, -0.3777889311313629, -0.008092240430414677, 0.1836843341588974, 0.29603514075279236, -0.28448712825775146, -0.4744850993156433, 0.4576549828052521, 0.3951289653778076, -1.117465853691101, 0.3481579124927521, 0.13316646218299866, -0.014283315278589725, -0.5239906907081604, 0.23758266866207123, -0.5518746376037598, -1.4652931690216064, -0.6944109797477722, 0.056944139301776886, 0.17231008410453796, 0.35045382380485535, -0.01735709048807621, -0.05640551820397377, 0.16715160012245178, 0.3301178216934204, -0.2844690978527069, -0.34480422735214233, 0.18850068747997284, 0.011263913474977016, -0.4103390574455261, 0.21847401559352875, 0.13225671648979187, -0.465664803981781, -0.3467537760734558, 0.357161283493042, -0.005942194256931543, -0.095979243516922, -0.24167190492153168, 0.16041231155395508, 0.5459744930267334, 1.0078396797180176, 0.3953116834163666, 0.09343608468770981, -0.8554040789604187, 0.3832996189594269, -0.5638863444328308, -0.04776150360703468, -0.2869938015937805, 0.5625287294387817, 0.025241460651159286, 0.8578330278396606, 0.08272308856248856, 0.0916747972369194, 1.0366601943969727, 0.8714498281478882, 0.07484225928783417, -0.4142577052116394, -0.7446503043174744, -0.024380803108215332, 0.3710840940475464, 0.23344634473323822, -0.1589411050081253, -0.4749929904937744, 0.8197517991065979, -0.2603882849216461, 0.36885082721710205, 0.34674498438835144, -0.5508525371551514, 0.8911280035972595, 0.5251993536949158, -0.07965021580457687, -0.855410635471344, -0.508158266544342, -0.05071370676159859, 1.133767008781433, -0.8835751414299011, -0.6293979287147522, 0.02534913644194603, 0.5820285081863403, 0.22601696848869324, 0.6720352172851562, -0.4708516299724579, -0.05680786818265915, -0.017025912180542946, 0.23775014281272888, -0.3529239892959595, -1.267593502998352, -0.18544651567935944, -0.012699347920715809, -0.5328546762466431, 0.3912229537963867, -0.41520944237709045, -0.11952076107263565, 0.2645995616912842, 0.21588869392871857, 0.42685744166374207, -0.2965371012687683, 0.2858523726463318, -0.1315392553806305, 0.7914746403694153, 0.4989033639431, 0.3246845006942749, -0.1961997151374817, -0.4474268853664398, -0.8419914245605469, -0.27061569690704346, 0.6056954264640808, -0.8101269602775574, 0.38105225563049316, 0.3460809290409088, 0.33194902539253235, -0.48460566997528076, 0.2873608469963074, -0.5055326819419861, 0.4657876491546631, -0.5113867521286011, -0.7121750712394714, -0.4087097644805908, -0.0006451546214520931, 0.04130954295396805, -0.8044202327728271, -0.4551592171192169, 0.5641916990280151, -0.24571652710437775, -0.2660355865955353, 0.872470498085022, 0.17429165542125702, -0.5037310123443604, 1.1021817922592163, 0.009894661605358124, -0.2865524888038635, -0.8382538557052612, 0.6585918664932251, 0.3846931457519531, 0.6999748349189758, -0.5058303475379944, -0.5579406023025513, -0.3349919319152832, -0.45823565125465393, -0.01131757814437151, -1.2754462957382202, -0.19581012427806854, 0.5885530710220337, 0.29146823287010193, -0.9010819792747498, 0.3232825696468353, -0.6964872479438782, -1.3150275945663452, -0.3308747708797455, -0.4067118763923645, 0.5199198126792908, 0.09216833859682083, -0.12421297281980515, -0.21525165438652039, 0.056040987372398376, 0.27140605449676514, -0.03387721627950668, 0.5984970927238464, -0.8564266562461853, 0.42657384276390076, 0.9054528474807739, -0.20344926416873932, -0.19584976136684418, -0.029458938166499138, -0.6652678847312927, -0.009178298525512218, 0.7379894256591797, -0.06889870762825012, -0.16525569558143616, 0.10879506170749664, 0.6202916502952576, -0.00931699387729168, 0.8655502796173096, -1.2389239072799683, -0.1917639821767807, 1.0813628435134888, -0.5334030389785767, 0.6140729784965515, 0.4067438840866089, -0.026787247508764267, -1.0816352367401123, 0.11635075509548187, -0.7498172521591187, 0.25122374296188354, 0.06859301775693893, 0.4713520407676697, -0.8437803387641907, 1.0700039863586426, -0.31711268424987793, -0.5110363364219666, -0.22180607914924622, -0.5150627493858337, -0.4815385341644287, 0.4753980338573456, -0.06861328333616257, -0.009701695293188095, -0.7400633096694946, 0.3607485890388489, -0.292093962430954, 0.03189947456121445, 1.5555994510650635, 0.9992764592170715, 0.12546443939208984, 0.07022679597139359, -0.03324127197265625, -0.11104357242584229, -0.1666545271873474, -1.141751766204834, -0.34872373938560486, 1.0461366176605225, -0.8633042573928833, -0.041184935718774796, -1.2286601066589355, 0.9147815704345703, 0.21482865512371063, 1.0308595895767212, 0.33401238918304443, -0.5411613583564758, -0.1317545771598816, -0.34400346875190735, 0.13364772498607635, -0.5076044797897339, -0.10384140908718109, -0.6410474181175232, 0.5873023867607117, 0.07655661553144455, -0.37470099329948425, -0.8771485686302185, -0.25221046805381775, -0.18996569514274597, 0.8496540188789368, 0.3232633173465729, 0.3914041519165039, -0.10159815102815628, 0.6055266857147217, 0.1395435333251953, -0.3287512958049774, -0.7539612650871277, -0.28622686862945557, -1.0729255676269531, -0.0388077050447464, 0.3861345648765564, -0.4720248579978943, -0.6475020051002502, -0.612150251865387, 0.21710756421089172, 0.5139845013618469, 0.15385955572128296, -0.5698421597480774, 0.035570453852415085, -0.4293316900730133, -0.7379049062728882, 0.44146138429641724, 0.13690398633480072, -0.4416874945163727, 0.7925466299057007, -1.0907286405563354, 0.399797260761261, 0.43221330642700195, -0.1344449669122696, -0.013624423183500767, -0.10431654751300812, -0.19446218013763428, 0.016128800809383392, 0.38716521859169006, -0.09057284146547318, -0.37729865312576294, 0.6528751850128174, -0.6542313098907471, -0.025350650772452354, -0.0917389765381813, 0.4184231162071228, -0.37813031673431396, -0.19306080043315887, 0.1784438192844391, 0.7620895504951477, -0.013980863615870476, 0.1360097974538803, -0.2881111204624176, 0.7489404082298279, -0.09388547390699387, -0.507746696472168, 1.0770198106765747, -0.38123369216918945, -0.22318455576896667, 0.48118874430656433, -0.12790106236934662, -0.46795526146888733, 0.40597212314605713, 0.5436622500419617, 0.09898362308740616, -0.2243119776248932, -0.09927945584058762, 0.16255752742290497, 0.6809192895889282, -0.22863316535949707, 0.35130006074905396, -0.6127844452857971, -0.0983489528298378, -0.37016892433166504, -0.574722170829773, 0.1312914341688156, -1.5717225074768066, 0.2801799178123474, 0.1507088840007782, 0.33835986256599426, 0.082315593957901, -0.16446276009082794, 0.6650118827819824, -0.29600510001182556, -1.1050143241882324, -0.1783866584300995, -0.5576075315475464, -0.7793334126472473, -0.3081016540527344, -0.05819711834192276, -0.3185819983482361, 0.48846063017845154, -0.5181737542152405, -0.8637243509292603, -0.22052286565303802, -0.2635314166545868, 0.060481294989585876, -0.15897822380065918, 0.5180695652961731, -0.814925491809845, -0.04237791523337364, -0.3078514635562897, 0.4718845784664154, -0.38520553708076477, -0.4322914183139801, -0.034131817519664764, 0.7417306303977966, 0.20373055338859558, 0.6286322474479675, -0.9170209169387817, 0.48559683561325073, -0.03493734076619148, -0.9344006776809692, -0.3258705139160156, 0.44300156831741333, -0.11512381583452225, 0.700150728225708, 0.5556803345680237, 0.30031105875968933, -0.10632786154747009, -0.6973968744277954, -0.4326708912849426, -0.3573225140571594, -0.6486718654632568, -0.9077988862991333, -0.32243862748146057, 0.4203798174858093, 0.06484653055667877, -0.17031507194042206, -1.0904327630996704, -0.3453627824783325, -0.21233196556568146, 0.6183485388755798, -0.8416315913200378, -0.4177319407463074, -0.4065600633621216, 0.638787031173706, -0.6417310833930969, 1.3435604572296143, -0.85183185338974, 0.27770164608955383, -0.21713972091674805, 0.33892807364463806, -0.24864770472049713, 1.1864476203918457, -0.9063671827316284, 0.12198097258806229, 0.4543691873550415, 0.22117091715335846, 0.2240012139081955, 0.43559136986732483, 0.0996704250574112, 0.2775397002696991, -0.33304038643836975, 0.23560744524002075, -0.8452578783035278, -0.3061167597770691, -0.326612263917923, 0.23566541075706482, 0.28525927662849426, 0.3515267074108124, -0.3248260021209717, -0.4049263000488281, 1.0614492893218994, 0.07282308489084244, -0.7535105347633362, -0.73829185962677, -0.7333196401596069, -1.317102074623108, -0.4421561062335968, 0.09475182741880417, -0.1442878395318985, -0.24560849368572235, -0.9880529642105103, 0.43228188157081604, 0.37936437129974365, -0.45120394229888916, 0.5712106823921204, 1.9138569831848145, 0.9497018456459045, -0.13392779231071472, -1.5511218309402466, 0.7570340037345886, 0.08267892897129059, -0.15651774406433105, -0.15303567051887512, 0.4593311846256256, -0.1837671995162964, -0.07567042112350464, -0.425600528717041, -0.7347277998924255, -0.9751829504966736, -0.3622500002384186, 0.8567655682563782, 0.04708660766482353, 0.20969535410404205, -0.021131673827767372, -0.42267757654190063, -1.1903709173202515, 0.30786338448524475, 1.140565037727356, -0.5639907121658325, 0.9644814133644104, 1.055818796157837, 0.23931884765625, 1.0553369522094727, -0.4610443711280823, 0.272884339094162, 0.10227233916521072, 1.310165524482727, 0.6927275657653809, 0.26658591628074646, 0.8790304064750671, 0.8386823534965515, -1.4224203824996948, -0.9543012380599976, -0.020190879702568054, -0.19913096725940704, -0.02561316266655922, -0.689746618270874, 0.09209046512842178, -0.5365646481513977, 0.045813001692295074, 0.8891171216964722, 0.33396223187446594, -0.14397762715816498, 0.3771984279155731, 0.19947181642055511, 0.7820966839790344, -0.0734514519572258, 0.19824673235416412, 1.1013827323913574, -0.6844561696052551, 0.3296557366847992, -0.4437646269798279, 0.19090017676353455, -0.4452245533466339, 0.11876807361841202, 0.25046491622924805, 0.32760679721832275, 0.3544858992099762, 1.0843160152435303, 0.07906100898981094, 0.2865787446498871, -0.7999162077903748, -0.15420351922512054, 0.26195406913757324, -1.055162787437439, -0.8193357586860657, -0.37597769498825073, -0.08095405250787735, -0.38232365250587463, 0.4380035102367401, -0.35953474044799805, -0.2289070188999176, -0.08650290966033936, 0.2764597237110138, -0.1463276892900467, -0.6514564156532288, 0.0757782906293869, -1.4039368629455566, -0.9993868470191956, -0.2695278227329254, 0.15004198253154755, -0.16216136515140533, 0.2626970410346985, 0.2761837840080261, 0.46141842007637024, -0.27963390946388245, 0.10682781785726547, -0.2707141935825348, 0.3636087477207184, -0.04638037458062172, 0.9044926166534424, -1.1339976787567139, -1.3439832925796509, 0.09183701127767563, 0.26007843017578125, -0.3010125160217285, -0.4937974810600281, -0.42022764682769775, -0.26886412501335144, -0.17759940028190613, 1.174991488456726, 0.012781696394085884, 0.242659792304039, -0.4000776410102844, -0.35889574885368347, 0.5410956740379333, 0.08312630653381348, -0.20726469159126282, 0.29865917563438416, -0.10281529277563095, -1.2737345695495605, 0.06896936148405075, -0.23338866233825684, 0.15596161782741547, -0.40207910537719727, -0.16621720790863037, 0.062047552317380905, 0.10104728490114212, -0.5786752104759216, -0.49660030007362366, -0.29562628269195557, -0.628478467464447, -0.17871461808681488, 0.016016004607081413, 0.18459272384643555, -0.3111095428466797, 0.3802507519721985, -0.46559083461761475, 0.5215045809745789, -0.03639564663171768, 0.030279671773314476, -0.09372849762439728, 0.07326988875865936, -0.04297143593430519, -0.2051893025636673, 0.1752244234085083, -0.08381699025630951, 0.23499901592731476, 0.4095242917537689, 0.8738871216773987, 0.5265173316001892, -0.15173251926898956, 0.4124683141708374, -0.5763518810272217, -0.23141370713710785, -0.43927669525146484, -0.19442813098430634, 0.2121724784374237, 0.7644643187522888, -0.013473309576511383, -0.8049162030220032, 0.06482705473899841, -0.09591569751501083, -0.5303781032562256, 0.7402369379997253, -1.2640959024429321, -0.5035977959632874, 0.4241780638694763, -0.9121267199516296, 0.5200210213661194, -0.10860143601894379, -0.6211243867874146, 0.8793715834617615, 0.14816617965698242, -0.26889294385910034, -0.4107324481010437, 0.4247995615005493, 0.23500357568264008, -0.13910935819149017, -1.2903938293457031, -0.413825660943985, 0.1996517926454544, 0.18024428188800812, 0.6731213927268982, -0.9015882015228271, -0.10656537115573883, 0.2901405096054077, -0.005974045488983393, -0.15960820019245148, 0.05648013949394226, 0.17540748417377472, -0.21545863151550293, 0.5511299967765808, 0.1923874467611313, 0.38453409075737, -1.1563310623168945, 0.5418260097503662, 0.16385696828365326, 0.3891375958919525, -1.0297662019729614, 0.13348881900310516, 0.08403405547142029, 0.38633811473846436, -0.0640806183218956, 1.1239899396896362, 0.2966320812702179, 0.4347662031650543, 0.6370536088943481, 0.04220064356923103, 0.19727465510368347, 0.5786296129226685, -0.4985153079032898, 0.007537427358329296, 0.5691367983818054, 0.6188842058181763, 0.6151854991912842, 0.11984699964523315, 0.16023780405521393, 0.35697606205940247, -0.0673159807920456, 0.24408471584320068, -0.004711462650448084, 0.3330470621585846, 0.053838253021240234, 0.15923379361629486, 0.23127058148384094, -0.40256088972091675, 0.15717105567455292, -0.306519478559494, 0.23261864483356476, -0.036634840071201324, -0.44569388031959534, -1.019379734992981, -0.007601823192089796, 0.8579209446907043, 0.25538238883018494, 0.15473219752311707, -0.061565548181533813, -0.20384269952774048, 0.1830310970544815, 0.9680710434913635, -0.12483645975589752, 0.7268366813659668, 0.2871532738208771, 0.43338075280189514, 0.4619444012641907, -0.01639038324356079, 0.5337588787078857, 0.5389819741249084, -1.0533218383789062, -0.4538324177265167, -0.051760535687208176, 0.3681732416152954, -0.02542871981859207, 0.21559029817581177, -0.6267442107200623, 0.8026049137115479, 0.05904432013630867, -0.2658645212650299, 0.07664982229471207, -0.5204322338104248, -0.7462884187698364, -1.0598313808441162, 0.5665283203125, -0.26870056986808777, 0.11136094480752945, 0.9424803853034973, -0.0769168883562088, -0.015729693695902824, 0.2257193624973297, 0.27723249793052673, 0.4840269684791565, 0.26571762561798096, 0.4026198983192444, -0.38303717970848083, 0.7769216299057007, 0.8734740614891052, -0.6750791668891907, 0.31574633717536926, 0.1523866206407547, -0.24448421597480774, 0.2809932231903076, 0.34001293778419495, -0.8879770040512085, -0.15049079060554504, -0.2763969898223877, -0.9094722867012024, 0.46634605526924133, 0.6619006991386414, -0.4985564351081848, -0.2602943181991577, 0.14415092766284943, 0.3531836271286011, -0.45239123702049255, 0.5950140357017517, 0.37030911445617676, 0.36706843972206116, -0.6358084678649902, -0.024346424266695976, -0.5437901616096497, 0.07422809302806854, -0.018645072355866432, -1.2456358671188354, 0.1218041479587555, -0.6283966302871704, 0.20739738643169403, -0.32301071286201477, -0.7615280747413635, -0.11849679052829742, 0.36827993392944336, 0.012873811647295952, -0.5641506314277649, 0.14022745192050934, 0.5145331025123596, 0.04048147052526474, 0.004309770185500383, -0.374186635017395, 0.44097617268562317, 0.21797561645507812, 1.4750815629959106, -0.10005608201026917, 1.0474203824996948, 0.3502711355686188, -0.06461616605520248, 0.5327647924423218, -0.024612275883555412, 0.6915678977966309, 0.09316732734441757, -0.16766983270645142, -0.43062639236450195, 0.25376445055007935, -0.2824556231498718, -0.047334540635347366, 0.2425157129764557, 1.1872774362564087, -0.10384204238653183, -0.1704065501689911, -0.6021284461021423, -0.334451824426651, -0.7634331583976746, -0.6964544057846069, -0.6819332242012024, 1.0949748754501343, 0.02465066686272621, 0.011193649843335152, -0.20354421436786652, -0.7447507977485657, 4.031573295593262, 0.7696543335914612, 0.6920033693313599, 0.9164366722106934, 0.14345267415046692, -0.1795991212129593, 0.27826032042503357, -0.5147870182991028, -0.021181510761380196, -0.641234278678894, 0.24403074383735657, 0.012931731529533863, 0.5001064538955688, 1.050832748413086, 0.008246085606515408, 0.8913045525550842, -0.7943219542503357, 0.1287776380777359, -0.17040827870368958, -0.32775455713272095, -1.0938867330551147, 0.21759147942066193, 0.4282887279987335, 0.04749946668744087, 0.2615479826927185, 0.154099702835083, 0.3227994441986084, -0.8645338416099548, -0.13620081543922424, -0.22105000913143158, 1.0343658924102783, 0.001587524777278304, 0.2629410922527313, 0.1264866441488266, -0.6389542818069458, 0.7534044981002808, -0.3005269765853882, -0.15541304647922516, 0.018878601491451263, 0.8109493255615234, -0.311458945274353, -0.4969717860221863, 0.2927282154560089, 0.11696930229663849, 0.12235055863857269, 0.9320542216300964, -0.7208285331726074, 0.04686983302235603, 0.13964714109897614, -0.4780755639076233, 0.703737199306488, -0.4122650623321533, 0.3890102207660675, -0.7307730913162231, -0.7972222566604614, -0.27084603905677795, 0.03210527077317238, -0.07953273504972458, -0.7043587565422058, 0.13687922060489655, -0.21170562505722046, 0.3176012933254242, -0.4646429717540741, -0.06487270444631577, -0.8224401473999023, -0.059823229908943176, 0.7411442995071411, 1.1274179220199585, -0.07691732048988342, -0.6951682567596436, -0.62369704246521, -0.1558278501033783, -0.020672034472227097, -1.043731689453125, -0.04037591069936752, 0.9679248332977295, -0.848913311958313, 0.0441284216940403, 0.3289100229740143, 0.15690752863883972, -0.08343890309333801, 0.23012253642082214, 0.1459590047597885, -0.15172606706619263, -0.10243978351354599, 0.48119789361953735, -0.18391576409339905, -0.22135058045387268, -0.11881957203149796, 0.16531497240066528, 1.034191370010376, 1.0304031372070312, -0.13643823564052582, -0.1045006662607193, 0.33656036853790283]]"'}

System information

  • OS: Linux
  • Version of supabase: 2.4.0
@smearumi smearumi added the bug Something isn't working label Mar 1, 2024
@silentworks
Copy link
Contributor

What happens when you remove one of the square bracket from each side?

@silentworks silentworks removed the bug Something isn't working label Mar 2, 2024
@smearumi
Copy link
Author

smearumi commented Mar 3, 2024

Thanks, you are right. After removing one bracket from each side, it works fine.

Code that worked:

import numpy as np
from angle_emb import AnglE
from supabase import create_client, Client

angle = AnglE.from_pretrained('WhereIsAI/UAE-Large-V1', pooling_strategy='cls').cuda()

url: str = "https://**************.supabase.co"
key: str = "*************"
supabase: Client = create_client(url, key)

vec = angle.encode("Hello World", to_numpy=True)
response = supabase.table('test_table').insert({"embedding": np.array(vec).flatten().tolist()}).execute()

Best regards.

@smearumi smearumi closed this as completed Mar 3, 2024
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

No branches or pull requests

2 participants