■ OpenAI 클래스의 embeddings 변수를 사용해 텍스트에서 임베딩을 생성하는 방법을 보여준다.
• 임베딩은 자연어 처리 및 머신러닝 분야에서 널리 사용되는 개념으로, 텍스트를 컴퓨터가 처리하기 쉬운 형태로 표현하기 위한 기법이다.
• 구체적으로는 텍스트를 벡터 표현(부동소수점 배열)으로 변환한다.
• 벡터 표현은 유사한 의미를 가진 단어나 문장은 벡터 거리가 가깝고, 유사하지 않은 의미를 가진 단어나 문장은 벡터 거리가 멀어지도록 설계되어 있다.
• text-embedding-3-small 모델이 생성하는 임베딩의 차원은 1536이며, 텍스트의 길고 짧음에 관계없이 1536이 된다.
▶ 예제 코드 (PY)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
import os from openai import OpenAI os.environ["OPENAI_API_KEY"] = "<OPEN_API_KEY>" openAI = OpenAI() text = "이것은 테스트 문자열 입니다." text = text.replace("\n", " ") createEmbeddingResponse = openAI.embeddings.create( model = "text-embedding-3-small", input = [text] ) print(createEmbeddingResponse) """ CreateEmbeddingResponse ( data = [ Embedding( embedding = [ 0.0021132892, 0.015360947, -0.02388107, -0.03647066, -0.0042317295, -0.008602543, -0.007659869, -0.0046773106, 0.028352331, 0.017782021, -0.0026348506, 0.00117963, -0.0065935655, -0.00846861, 0.03315327, 0.0022575236, -0.022685986, 0.0014359034, -0.021223038, 0.028888058, 0.010549705, -0.023984095, 0.010941198, -0.005527262, 0.026333053, -0.03432775, 0.0023747138, 0.021758767, 0.04052982, -0.07590842, -0.034307145, -0.030969152, 0.045248345, -0.06375153, 0.0210582, 0.08629329, 0.0032710265, 0.023407158, 0.0058775456, -0.036862154, -0.040241353, 0.020831546, 0.005527262, 0.011631462, 0.0068459753, 0.040406194, -0.028743824, 0.023221713, 0.007376551, 0.020161888, -0.025405832, 0.030103747, 0.030886734, 0.0030572508, 0.035131343, 0.017287504, 0.011301783, 0.043187853, 0.00047809788, 0.0068974877, 0.03778937, 0.008324376, -0.017946862, 0.0155360885, 0.00039857588, 0.0064956923, 0.0015041571, 0.034863476, -0.0044970177, 0.021027293, 0.0690676, -0.008731323, -0.035831906, 0.0016664206, 0.020821244, -0.0042471834, -0.015618508, 0.0051280423, 0.020234004, -0.012280515, 0.017761417, -0.0036960025, 0.00741261, -0.050811663, -0.0035414658, -0.015906977, -0.14522327, 0.012373238, 0.01638089, -0.030165562, -0.026168212, -0.03651187, -0.011785998, 0.027074829, -0.024787685, -0.021552717, -0.03403928, -0.028105073, -0.022479936, -0.025817929, 0.012465959, 0.02791963, -0.007716532, 0.048627544, -0.01086908, -0.009838836, -0.0064184237, 0.0048241206, -0.026559705, 0.0020695038, -0.013125316, 0.028743824, 0.004118403, -0.0066656824, 0.061938304, 0.022768406, 0.06498783, -0.017483251, -0.0014964303, -0.017318413, 0.035728883, -0.005614833, 0.053861186, -0.07722714, -0.05892999, -0.015680322, -0.0032323925, -0.028764429, -0.0459077, 0.03861357, 0.011353295, 0.015381552, -0.00014407327, 0.037212435, 0.020800639, 0.027796, -0.056704663, 0.02565309, -0.010817569, 0.009359772, -0.01912134, -0.019863116, 0.009019791, 0.014804615, 0.020573985, -0.04912206, -0.024787685, 0.039952885, 0.029073503, 0.016669357, -0.045124713, -0.007386854, -0.026580311, -0.010544553, -0.029217737, -0.031772744, 0.0038016026, -0.01613363, -0.022871431, 0.036738522, 0.0007198834, -0.016751777, -0.0060629896, 0.044959873, -0.034018677, -0.011342993, 0.077762865, 0.02000735, -0.019914629, -0.01882257, 0.004937447, -0.04114797, -0.038016025, -0.0058311843, -0.028022652, 0.025508856, -0.0007301859, -0.008288317, -0.040158935, -0.0031319435, 0.027981443, 0.029959513, -0.01091029, 0.022747802, -0.04949295, -0.019749789, 0.06379274, 0.03142246, 0.030062538, -0.029217737, -0.024375588, -0.012280515, 0.03980865, 0.00046972715, -0.011713881, -0.06494662, 0.05563321, -0.015402157, -0.025591277, 0.06910881, 0.020728521, -0.011054524, -0.04570165, 0.009467948, -0.052336425, -0.0036419146, 0.015824556, -0.022273889, -0.0018917867, -0.0294856, 0.052913364, 0.009050699, -0.005151223, -0.037377276, -0.039478973, -0.034162913, 0.008824045, 0.01722569, 0.009230992, -0.02173816, -0.0069902097, 0.013722858, 0.018946199, 0.031443067, -0.06811977, 0.06581202, 0.029135317, -0.016267562, -0.0037140318, -0.035481624, 0.0074332147, -0.0152785275, -0.0062329797, -0.028661406, 0.030041933, -0.00408492, -0.04912206, 0.015412459, -0.010838173, -0.0015286254, -0.022294493, 0.034307145, 0.031525485, 0.0051254667, 0.05340788, 0.004030832, -0.021243643, 0.009699753, 0.030206772, 0.015062176, 0.030866127, 0.011569647, -0.024705265, -0.030886734, -0.022170864, 0.030763105, -0.020192795, 0.006557507, 0.039458368, -0.010338505, -0.034966502, -0.029671045, -0.03175214, 0.0017385378, -0.062144354, 0.026106399, 0.050852872, 0.0269512, 0.0010991422, -0.040921316, 0.016226353, 0.013516809, 0.026333053, 0.025076153, -0.00075143465, 0.025529461, -0.017163875, -0.03189637, 0.028764429, 0.048091818, -0.061608627, -0.017575974, 0.020687312, -0.048091818, -0.025508856, 0.0036779733, -0.015268225, -0.031834558, 0.024581635, 0.037500903, 0.013980419, -0.015968792, 0.03509013, 0.004888511, 0.0068768826, 0.009236143, 0.033689, -0.021655742, 0.0003063368, -0.016020304, 0.011312086, -0.0168445, -0.01494885, -0.016246958, -0.036965176, 8.117201e-05, -0.02783721, 0.030206772, -0.045083504, -0.017565671, 0.021882396, 0.017380226, 0.017627485, -0.00062136626, -0.015309434, -0.0345338, 0.01482522, 0.028929269, 0.033173878, -0.009061001, 0.020182492, 0.0019381477, 0.009962466, -0.005112589, 0.01718448, 0.023283528, 0.0073404927, -0.0017952012, 0.0069696046, 0.017163875, -0.020038258, -0.020130979, 0.054767802, -0.050605614, 0.0123217255, -0.022809615, -0.04102434, 0.073518254, 0.0075877514, 0.04347632, -0.036408845, 0.0038943246, 0.037315458, -0.022294493, 0.0041802176, -0.014887035, 0.013115014, -0.008988884, 0.04570165, -0.0022922943, 0.015175503, 0.0018570159, 0.025137968, 0.0015015815, 0.031051572, -0.06886155, -0.046525847, 0.0070623267, 0.048792385, 0.0009800202, -0.014382214, -0.011868418, -0.004697915, 0.054149657, 0.0059651164, -0.022685986, -0.020419449, 0.054190867, 0.04450657, 0.008751928, -0.049863838, 0.018812267, 0.0404268, -0.029032294, 0.02101699, -0.0007179517, -0.037171226, 0.056498613, 0.010281841, -0.010426075, 0.009447343, 0.018647427, -0.023015665, -0.011167851, 0.03315327, 8.829518e-05, 0.012393842, 0.027816605, 0.010786661, -0.013558019, 0.025426436, 0.0589712, 0.0040668906, -0.015556693, -0.029918304, 0.031525485, -0.028908664, 0.0007907127, -0.027981443, -0.019347994, 0.044341728, -0.05167707, -0.050729245, -0.018513495, 0.022232678, 0.01091029, -0.00022713674, 0.024354983, 0.03292662, 0.0072683757, 0.05732281, 0.029959513, 0.023448367, -0.0062278286, -0.011425412, 0.010848476, -0.010477588, 0.007211712, -0.009385528, 0.0013702253, -0.03154609, 0.0024609969, -0.055756837, -0.024725871, -0.0459077, 0.033503555, 0.035955537, -0.016731173, 0.0045433785, -0.052006748, -0.017163875, -0.015371249, -0.027116038, 0.019100735, -0.02763116, -0.012641101, 0.009807928, 0.042775758, -0.002771358, -0.033297505, 0.030907338, 0.013939209, -0.013341667, 0.016865104, 0.0256943, 0.011312086, 0.031319436, 0.04090071, 0.0041209785, -0.026497891, -0.028496565, -0.016710568, -0.03962321, -0.03626461, 0.016628148, -0.06647138, 0.017658392, -0.010462134, 0.0155360885, -0.024458006, -0.015783347, -0.0116211595, -0.04347632, 0.0018969378, 0.048091818, -0.024725871, 0.039396554, -0.033895046, 0.05110013, -0.024458006, -0.015556693, 0.019152246, 0.007211712, -0.0091073625, 0.03045403, 0.036614895, -0.038716592, -0.020522473, -0.026642125, -0.05542716, 0.021243643, -0.015700927, -0.008937372, -0.009859441, -0.010431226, 0.14917941, -0.016586939, -0.026023978, 0.029155923, -0.023242319, 0.0023631235, -0.010003675, 0.02598277, -0.0058826967, -0.009313411, 0.0026889385, 0.040838897, -0.034966502, -0.0036110072, -0.02851717, -0.047226414, 0.015474274, 0.016772382, 0.03352416, 0.06577081, 0.028661406, -0.020254608, -0.0057590674, 0.011744789, -0.010838173, -0.019554043, 0.0020038257, 0.008736474, -0.018400168, -0.017246295, -0.0074332147, -0.045536812, 0.031443067, 0.007438366, -0.008535577, 0.0033714755, -0.0028151434, -0.015546391, -0.06935607, -0.017452344, -0.010307597, -0.009370075, -0.06807856, -0.022191469, 0.027239667, -0.0068974877, 0.024828894, 0.044176888, -0.02456103, 0.0033998073, -0.01667966, 0.030989757, 0.023365948, 0.0148355225, 0.00024081967, -0.0105136465, 0.0125071695, 0.0077268346, 0.013115014, 0.0072374684, 0.045083504, -0.008798289, 0.011013315, 0.025838535, 0.01655603, 0.028537776, -0.029835884, 0.044836245, -0.0067378, 0.014691288, -0.01976009, 0.010580612, -0.032226052, -0.01191993, 0.0014127229, -0.009045548, -0.00619177, -0.010920593, 0.0143204, -0.025550066, -0.013290156, -0.0018338354, -0.0026554554, 0.020017652, 0.033977468, -0.011785998, 0.033091456, -0.040200144, 0.048297867, -0.020069165, -0.014804615, 0.0002944246, -0.012805941, -0.04561923, 0.018760754, 0.01861652, -0.0013058351, 0.014083444, 0.031401854, -0.008370738, 0.027219063, 0.020862453, -0.037686348, -0.018771056, 0.006923244, 0.05369635, 0.02109941, 0.03785119, -0.010096397, -0.005640589, -0.020800639, 0.017081456, -0.015402157, 0.014258585, -0.01781293, 0.0037243343, 0.021552717, 0.037913002, 0.006171165, 0.004628374, 0.033462346, -0.03723304, 0.010271539, 0.031525485, 0.0123217255, -0.03154609, -0.0038222075, -0.031834558, -0.033689, 0.028331727, 0.02489071, -0.0053469697, -0.0076289615, 0.004224003, -0.0055118087, 0.002724997, 0.012939872, 0.035522833, -0.0152785275, -0.03844873, 0.030701289, 0.020883057, 0.020543078, -0.026209423, 0.014330703, -0.052789733, 0.022892036, 0.027013013, -0.014887035, -0.032184843, -0.010472436, -0.00043109298, 0.002612958, -0.038881432, 0.0050069885, 0.022479936, 0.0046773106, -0.007886522, 0.003799027, 0.014093746, -0.00644418, 0.027425112, -0.00497093, -0.002910441, 0.005635438, 0.04784456, 0.018307447, 0.00028331726, 0.006634775, -0.023510182, -0.0144646345, -0.06844945, -0.008798289, 0.013980419, -0.032741174, 0.037088804, -0.011693276, -0.014866429, -0.048174236, -0.021223038, 0.048462708, -0.029176528, -0.014413122, -0.007561995, 0.020192795, -0.015196108, 0.02186179, 0.025261598, -0.0052954573, -0.017390529, 0.030206772, -0.032123026, -0.064410895, -0.028764429, 0.040756475, 0.024087118, -0.00027076117, 0.0011236105, -0.057693698, 0.047061574, 0.007067478, 0.020532776, 0.0082162, 0.030165562, 0.011291481, -0.016308771, -0.043105435, -0.010982407, 0.0010862642, 0.027899023, 0.0055581694, 0.02182058, 0.015381552, 0.0023373675, 0.07533149, -0.014711893, 0.024169538, 0.00050417596, -0.011930233, 0.0019175428, -0.0063875164, 0.019955838, -0.0103282025, 0.03142246, -0.00039020515, 0.009529763, 0.01714327, -0.024354983, -0.015690625, -0.008484065, -0.0017617183, -0.00039342465, -0.05901241, -0.017915953, 0.015422761, -0.012033257, 0.010204573, 0.04156007, -0.024952523, -0.009282504, -0.05526232, 0.04578407, -0.012465959, -0.01575244, 0.025550066, 0.00014246351, 0.013702253, -0.016597241, 0.043599952, 0.004229154, -0.033400528, 0.00047520033, 0.016123328, -0.014814917, -0.014186468, -0.0152785275, -0.011229666, 0.009818231, 0.044547778, -0.021326063, 0.038531147, -0.021758767, 0.0038659929, 0.00926705, -0.029835884, -0.025673695, 0.0039278073, 0.022541752, -0.013248946, 0.008236806, -0.017431738, 0.031566694, -0.0024803139, -0.012198096, 0.054067235, -0.021511508, 0.014773708, 0.012125979, 0.019420112, -0.007819557, 0.010405471, -0.027095433, 0.0053212135, 0.00047616617, 0.005377877, 0.00204246, -0.012919268, -0.011270876, -0.009988221, 0.027857814, 0.0065935655, -0.018503193, -0.0061557116, 0.023180503, 0.022212073, -0.03500771, 0.009859441, 0.015948186, 0.017751114, -0.004965779, -0.024540426, -0.03206121, 0.0126926135, -0.043229062, -0.032020003, -0.0045382273, -0.012301121, 0.042569708, -0.029753463, 0.005527262, -0.00526455, -0.0005814443, -0.029794674, -0.008710718, -0.0085149715, -0.0056045307, -0.010549705, -0.00884465, -0.008180142, 0.034059886, -0.031855162, 0.004981233, 0.052995782, -0.024911314, -0.013619834, 0.005723009, 0.0020746551, -0.019481925, 0.04936932, -0.03230847, -0.027528135, 0.00030955632, -0.029732859, 0.0044249007, 0.013671346, -0.003175729, 0.0044326275, -0.009581274, -0.033647787, 0.016391192, -0.0067996145, -0.025137968, 0.0029722557, -0.031649113, 0.052501265, -0.013115014, 0.0047777593, -0.0067068925, -0.025673695, 0.027219063, 0.040612243, -0.04094192, -0.0014964303, -0.03783058, -0.025220389, 0.024952523, -0.014938546, -0.008319225, -0.038716592, 0.0127647305, 0.006093897, -0.045248345, -0.021449693, -0.009555519, 0.04094192, 0.001829972, -0.004793213, 0.034471985, 0.029980117, 0.0052671256, -0.004468686, 0.042858176, -0.020707916, -0.019286178, -0.022850825, 0.022253284, 0.009261899, -0.009910953, -0.048833594, 0.051883116, 0.020316424, -0.0066965898, 0.02557067, -0.001777172, -0.005630287, -0.033173878, -0.0026889385, -0.011816906, -0.038510542, 0.013042897, 0.0043244516, 0.041044947, 0.042775758, 0.03408049, 0.034183517, 0.014804615, -0.0053984816, 0.033627182, 0.0021532113, -0.009066152, -0.0069593024, -0.020501867, 0.039643813, 0.008715869, 0.0060372334, 0.02565309, 0.0056921015, -0.028146282, 0.004605193, -0.031319436, -0.006366912, -0.026765754, -0.011600554, -0.0013303034, 0.0007198834, -0.0065214485, 0.006949, 0.013156223, 0.029320762, 0.030845523, 0.0067532533, -0.05538595, -0.003992198, 0.012991385, 0.032947224, -0.024993734, -0.00036766854, 0.0148355225, -0.0067378, 0.019090433, -0.032329075, -0.042404868, -0.036697313, 0.042734545, 0.021305459, -0.037809975, -0.05344909, 0.024313772, -0.020615194, 0.0037578172, 0.012599891, 0.016123328, -0.043270275, 0.01857531, 0.039540786, -0.032123026, -0.016710568, -0.014371912, -0.023695625, 0.0480094, -0.027548742, 0.000120892764, 0.018369261, 0.00711899, 0.0084428545, -0.0099212555, -0.0036238853, -0.0062947944, -0.011239968, 0.0077783465, -0.021552717, 0.010693939, 0.013176829, 0.024602242, -0.0075259367, 0.007278678, -0.056622244, 0.011188457, -0.03861357, -0.014444029, -0.0030083142, 0.01014791, -0.052583683, 0.011631462, 0.008375889, 0.018678335, 0.017246295, -0.003672822, -0.043311484, 0.0028151434, 0.0059033018, -0.00876223, 0.0041879443, 0.04401205, -0.014866429, -0.008854953, 0.026415471, 0.03255573, 0.0015608206, 0.018101398, 0.008901313, 0.038057234, -0.0052284915, 0.008818894, -0.009483402, 0.020223701, 0.026559705, 0.010632125, 0.0041209785, 0.010796963, 0.0125071695, 0.031092782, -0.007979244, -0.003276178, -0.007979244, -0.0012742837, 0.010431226, -0.033400528, 0.036285214, 0.0035491926, 0.0057796724, -0.005259399, 0.052089166, 0.025920954, 0.019997047, -0.013187131, -0.010019129, 0.000749503, -0.004976081, -0.0051074377, 0.011940535, 0.021964815, 0.025962165, 0.003992198, 0.015484576, 0.011744789, -0.0103642605, -0.00024420017, -0.010070641, 0.022644777, 0.025611881, -0.0071241413, -0.035955537, -0.007953488, -0.003281329, -0.007871069, -0.03647066, 0.014804615, 0.010663032, -0.0022098746, 0.007654717, -0.008813743, -0.06387517, -0.008612845, -0.019842511, -0.009947011, 0.04401205, 0.013743463, 0.010302446, 0.013722858, 0.01996614, -0.0032967827, -0.007572298, 0.028620195, 0.0006657956, -0.01962616, 0.0024094845, 0.016422099, 0.021923605, 0.012496867, -0.03807784, 0.04413568, -0.0058105798, 0.00023679528, -0.009673997, -0.0030546752, -0.011775696, -0.028991083, 0.00020009282, -0.016288167, 0.02291264, 0.039066873, 0.008731323, 0.010652729, 0.026250632, -0.026188817, -0.018626822, 0.019265573, -0.012785335, -0.014794312, -0.0009896787, -0.048174236, 0.03702699, 0.007979244, 0.034945898, -0.015834859, -0.005815731, 0.01976009, 0.01331076, 0.007134444, 0.034554403, -0.005867243, -0.009952162, -0.039994095, 0.009833685, 0.0074538197, 0.0024030455, 0.008813743, 0.008715869, 0.027260272, 0.004182793, 0.021779371, -0.00039696612, -0.013176829, 0.005496355, -0.029011687, -0.022892036, -0.021593926, -0.002100411, -0.0057796724, 0.024087118, -0.0031061876, 0.016020304, 0.030186167, 0.0044661104, -0.054561753, -0.03509013, 0.018431077, 0.01528883, -0.008798289, 0.00450732, 0.0073404927, -0.002346382, 0.010343656, 0.031051572, 0.027054222, -0.013733161, 0.0019471623, 0.008638601, 0.002809992, -0.0022549478, 0.011672671, -0.025529461, -0.023757441, -0.029217737, -0.02118183, 0.0075156344, 0.070345104, 0.030083142, -0.00038280027, -0.009442192, 0.013053199, 0.027857814, -0.030144958, 0.034636825, 0.025941558, 0.009256748, -0.035522833, -0.024045909, 0.003044373, -0.028372936, 0.016020304, 0.024293168, -0.018884383, -0.022294493, -0.014928244, -0.020646103, 0.012218701, 0.023695625, 0.0172669, -0.0013290156, 0.0072477707, 0.03795421, 0.00018818061, -0.0140216295, -0.0031989096, 0.010168514, -0.003183456, -0.02215026, -0.0041493103, -0.05765249, -0.008520123, 0.011755091, -0.0027559043, 0.041127365, -0.010127304, 0.011095734, 0.0063875164, -0.04372358, -0.030268587, 0.021779371, -0.018482588, -0.0017192207, 0.007943186, 0.013073804, 0.011930233, -0.011569647, -0.010395168, -0.039108086, 0.042899385, 0.019605555, 0.005702404, 0.00892707, 0.026085794, -0.009699753, -0.03066008, 0.010580612, -0.015268225, -0.03921111, 0.0023656993, 0.012496867, -0.04545439, -0.014104049, 0.01579365, -0.013290156, 0.0145779615, -0.0019304209, 0.016792987, -0.01908013, -0.018637124, 0.024746476, -0.021799976, 0.0037114562, -0.015433064, -0.005019867, -0.0034848023, 0.034781057, -0.046937943, 0.034636825, -0.01706085, 0.038428124, -0.053613927, 0.034760453, 0.005826033, 0.018513495, -0.020038258, -0.013661044, -0.026291842, -0.009364923, 0.0002551465, -0.023262924, 0.004288393, -0.02067701, 0.0008988884, -0.033915654, -0.008988884, 0.005563321, -0.03150488, -0.0008132493, -0.026436076, -0.020625496, 0.008973431, 0.03138125, 0.03352416, 0.012404145, 0.022933245, 0.0073095853, -0.0020965477, -0.028352331, -0.05724039, 0.017380226, -0.015690625, -0.011219364, -0.028166888, -0.0046309493, 0.0010399031, 0.0168445, -0.017122665, -0.001113952, 0.007227166, 0.03138125, -0.027095433, 0.007907127, 0.039272923, -0.003992198, 0.012867755, 0.0013753766, -0.024581635, -0.036450054, 4.382564e-05, -0.025261598, 0.027981443, 0.011219364, 0.005424238, 0.045330763, -0.059053622, -0.025302807, 0.029341366, -0.012641101, 0.01752446, -0.0007907127, 0.025508856, 0.012033257, 0.0025872018, 0.018904988, -0.0099573145, 0.0007153761, -0.022273889, 0.005681799, 0.026992409, -0.009442192, -0.040818293, 0.023984095, -0.05732281, -0.002493192, -0.007984396, 0.03255573, -0.005619984, 0.005429389, -0.009885197, 0.0019574647, -0.041683696, 0.04763851, 0.007824708, -0.008138932, -0.048503917, 0.041621882, 0.030845523, 0.0004655418, -0.007984396, -0.046196166, -0.025364622, -0.012517472, 0.008679811, -0.011332691, -0.0103282025, 0.011590252, 0.060413543, -0.045001086, -0.005444843, -0.02186179, 0.012167188, -0.0015530938, 0.00490654, -0.03445138, 0.0057384623, 0.0032246655, -0.012661706, 0.004785486, -0.015773045, -0.0001565489, -0.036965176, -0.006423575, 0.011260574, 0.03785119, 0.0043012714, 0.0033817778, -0.023201108, 0.004976081, 0.027486926, 0.006104199, 0.022315098, -0.012486565, -0.035172552, -0.027301483, 0.00884465, 0.0065059946, -0.016143933, -0.009864592, -0.027734185, -0.00015308791, 0.030144958, 0.035151947, -0.017720208, 0.0065884143, -0.0010173665, -0.03129883, 0.023819255, -0.045042295, -0.016411796, 0.006305097, 0.00644418, 0.019935234, -0.018657729, 0.05888878, -0.0041673393, 0.0144646345, -0.001067591, -0.025467647, -0.0062278286, -0.04961658, -0.02118183, 0.0023154747, 0.0029851338, -0.010941198, -0.026230028, -0.0010727422, -0.022892036, -0.032329075, -0.014536751, -0.0324321, 0.012527774, 0.004633525, 0.019255271, 0.0054860525, 0.0008499518, 0.0054654474, -0.0148355225, -0.008272864, -0.0025678847, -0.0018750451, -0.012229003, -0.014052536, -0.009076455, -0.0051306183, -0.0031783045, -0.0164324, 0.026023978, -0.03727425, 0.01815291, 0.032020003, -0.0118787205, -0.016205747, 0.017555367, -0.00064003945, 0.004064315, 0.018132305, 0.0047391253, -0.027383901, 0.009457645, -0.0036341879, -0.0010997861, 0.050317146, 0.04139523, -0.002956802, -0.012167188, -0.0067738583, -0.013094408, 0.024313772, 0.012095071, 0.012589589, -0.019481925, -0.029114712, -0.016288167, 0.0014655229, -0.018307447, -0.013125316, -0.007015966, 0.023242319, -0.012053862, -0.047926977, 0.03601735, -0.017246295, -0.04052982, 0.0016921768, -0.0017617183, -0.00107403, -0.014495541, 0.007922581, 0.007752591, -0.010735149, -0.012661706, -0.021758767, -0.025302807, -0.015227015, -0.009694601, 0.004224003, -0.0038634173, 0.010446681, -0.008484065, -0.020161888, -0.0033482949, -0.018142607, 0.009555519, 0.01335197, -0.014979756, -0.0019703428, 0.014423424, 0.0018312598, 0.037933607, 0.0069386973, -0.010338505, -0.03908748, -0.025137968, 0.008520123, -0.03210242, -0.026127003, -0.022479936, 0.047020365, 0.008159537, -0.014897337, 0.028187493, -0.018863779, 0.0042574857, -0.001040547, 0.038984455, 0.001730811, -0.0030237678, 0.014248283, 0.0014552205, -0.0023103235, 0.0025034943, -0.040715266, 0.025756115, -0.028743824, 0.021202434, 0.010183968, -0.020584287, -0.0029799824, 0.008710718, -0.010209724, 0.036862154, 0.003507983, 0.013640438, 0.0052233404, 0.0058105798, 0.03383323, 0.00084930786, 0.011703579, -0.013228341, -0.0013650741, 0.006768707, -0.009148572, 0.024622846, 0.023427762, -0.0172669, 0.00998307, 0.020481262, -0.005166677, -0.0032710265, 0.009622484, -0.025838535, -0.033627182, 0.01903892, 0.049699, -0.04582528, -0.021161225, 0.016772382, 0.036759127, 0.028331727, 0.0078504635, -0.038304493, 0.059465718, 0.010013977, 0.044630196, -0.0037243343, -0.00214806, -0.020316424, 0.0031036118, 0.030206772, 0.008298621, 0.019286178, -0.004628374, 0.015803952, -0.008406796, -0.017885046, 0.009287655, 0.004381115, -0.01107513, -0.009972768, -0.016525123, -0.026168212, -0.020409146, 0.0019342842, 0.008097722, -0.005619984, -0.0109515, 0.006305097, -0.010292144, -0.048091818, -0.023489578 ], index = 0, object = 'embedding' ) ], model = 'text-embedding-3-small', object = 'list', usage = Usage( prompt_tokens = 12, total_tokens = 12 ) ) """ |
▶ requirements.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
annotated-types==0.7.0 anyio==4.4.0 certifi==2024.6.2 distro==1.9.0 exceptiongroup==1.2.1 h11==0.14.0 httpcore==1.0.5 httpx==0.27.0 idna==3.7 openai==1.31.0 pydantic==2.7.3 pydantic_core==2.18.4 sniffio==1.3.1 tqdm==4.66.4 typing_extensions==4.12.1 |