package main

import (
	"context"
	"errors"
	"github.com/tmc/langchaingo/embeddings"
)

var t1 = []float32{-0.19121443, 0.34286803, 0.40902084, 0.047348194, -0.32481748, 0.0051567033, 0.07293971, -0.6107403, -0.19684817, 0.047386274, -0.1409694, 0.73655474, 0.10105973, -0.019799076, 0.61873704, -0.43438008, 0.19578803, -0.26879746, -1.7869432, 0.21504664, 0.4970493, 0.025132779, -0.13080633, -0.006680183, -0.5592129, 0.052710425, -0.0815456, 0.03819731, -0.8814612, -1.7748914, 0.6023569, 0.026833337, -0.43163744, -0.25863242, -0.20984507, -0.53379035, -0.15115891, 0.11847749, -0.23092246, -0.5238373, 0.04419835, -0.05166214, 0.14645651, 0.1387456, 0.37181693, -0.057095274, 0.11375597, -0.28874397, 0.49316362, 0.5928646, -0.5351512, -0.6168553, -0.06555119, -0.3352088, -0.35607615, 0.123938724, 0.7468926, -0.5565136, -0.2640898, 0.13542408, -0.15094833, 0.46504438, -3.2117484, 0.4922499, 0.29566795, 0.00639705, 0.12013119, 0.16475192, -0.21446626, -0.0697085, 0.63009727, 0.011232292, -0.2040121, 0.47114974, 0.28699598, -0.42556414, 0.11505306, 0.7566533, 0.78397363, -0.68816566, -0.027946224, 0.45444137, 0.03948899, -0.16312043, -0.26125246, 0.77945614, -0.13094705, 0.0670124, 0.5213122, 0.48480424, 0.32871938, 0.2666412, 0.124046855, -0.047739267, -0.6296897, 0.3182435, 0.029315315, 0.31866717, 0.31355864, 3.8551424, 0.33145386, -0.12073119, 0.54955596, -0.10388991, 0.35334054, -0.38010025, -0.17931472, -0.18218017, -0.19907522, -0.36437616, -0.37496817, -0.82005525, 0.31535375, -0.31068486, 0.23142995, 0.52120185, -0.4809667, 0.074249715, -0.025227424, -0.16425551, -0.8893783, 0.40269098, -0.4354802, -0.012632459, 0.06599815, -0.2362825, -0.124956295, 0.6254327, -0.17826125, 0.07642759, 0.14666337, 0.010701425, -0.9050158, -0.008203043, 0.1989796, 0.12228873, 0.369781, -0.72354394, -0.21171421, -0.16975582, -0.22353438, -1.611891, 0.6847516, -0.7610214, 1.4312967, 0.17649898, -0.096508525, 0.07888305, -0.36833045, -0.03675485, -0.01611771, 0.50126034, -0.012338487, 0.1465282, 1.0002092, -0.103120826, -0.4713838, 0.14057201, -0.2802481, 0.3023692, -0.10821377, 0.16201377, 0.34081215, 0.39818048, 0.46591175, -0.3090245, -0.107036024, 0.4430081, -0.3158589, -0.3078561, 0.39269906, -0.059996538, -0.074301265, 0.08580883, -0.10402736, 0.274085, 0.018673673, -0.018524587, 0.15136057, -0.4550865, 0.22033714, 0.92819494, -0.36175257, -0.4832101, -0.029335685, -0.35576585, -0.15265179, -0.33718833, -0.07529578, 1.2270757, -1.4076717, 1.3047758, -0.44560957, -0.33141804, -0.11675396, -0.0030003097, -0.36562318, -0.15015186, 0.16149485, -0.15640718, 0.38555315, -0.021875117, -0.43760312, 0.28733337, 0.008477204, -0.27241182, 0.28900486, 0.25766405, 0.38054746, -0.16828339, 0.10619946, -0.016370602, 0.37829924, 0.6720837, 0.8484391, 0.4382804, 0.5123557, -0.005151201, 0.38823625, 0.6516347, 0.39878008, 0.3111553, -0.3842165, -0.979904, -0.325824, -0.5300521, -1.2161208, -0.33040017, -0.115181476, 0.22861788, 0.39302352, 0.6154151, 0.86828554, 0.9805749, 0.6234903, -0.04386837, -0.13864693, 0.4821096, 0.1670762, -0.097993344, 0.64983386, -0.088204846, -0.18328677, 0.17057963, 0.25555712, -0.9046632, -0.011591915, 0.39214915, -0.44685045, 2.1315093, 0.6906516, -0.47234318, -0.048569266, 0.45683697, 0.095147975, -0.009420782, -1.491592, -0.14808537, -0.75230575, 0.4339356, -0.001955174, -0.430739, 0.403546, 0.53894913, -0.3183522, 0.09890242, -0.036926836, 0.03772387, 0.12579855, -0.27379727, -0.14027591, 0.6221679, -0.3374979, 0.15053344, 0.18049993, -0.22417727, 0.31732234, 0.22376645, -0.3514128, -0.19982553, 0.371593, -0.22303338, 0.018848479, 0.0661044, -0.30169728, -0.20782976, -0.57495415, -0.01693394, -0.5536308, 0.2689082, 0.16225466, 0.015306033, -0.058152575, -0.6754476, 1.4387031, -0.37330034, 0.4541361, 0.5783494, -0.0270245, 0.36350423, -0.00013953447, 0.08101775, -0.05463975, -0.027426824, -0.44249806, 0.07948848, 0.0019202568, 0.1437714, -0.43869245, -0.63353354, -0.48632455, -0.49253604, 0.41386834, -0.17050621, 0.41616973, -0.26306573, -0.060380593, 0.17517021, -0.07037242, -2.3767045, -0.31149703, 0.015394794, 0.46889454, -0.3681541, -0.36828083, 0.008301549, -0.13396288, 0.013518002, -0.32654184, 1.1705892, 0.038394324, -0.38804454, -0.5983892, 0.5700477, -0.048678547, -0.29950675, 0.43595856, -0.47931966, -0.4924733, -0.11399695, 0.3686201, 1.5309327, 0.18706632, 1.0990256, -0.2528794, 0.18036127, -0.5568727, -1.2959635, 0.49330088, -0.2592352, -0.12846856, 0.6810789, -0.030800017, 0.080826506, 0.88067347, 0.790257, 0.021166675, 0.10119902, -0.34214547, 1.8130573, 0.16204135, -0.047216266, 0.3018759, 0.76003456, 0.57367945, 0.28866506, -0.32452708, -0.98469937, 0.14832832, 0.07402928, -0.2305723, 0.34169385, 0.03316113, -0.062356453, 0.73373264, 0.12458008, -0.23622914, 0.4953871, -0.16398838, -0.026018001, -0.099246085, -0.4963188, -0.98005176, -0.79988587}
var t2 = []float32{-0.29103878, 0.23311868, 0.119307175, -0.035654645, -0.48716292, 0.19780248, -0.160791, -0.82700145, -0.11057775, -0.012242474, -0.50705206, 0.95943886, 0.1991719, 0.121521756, 0.4794459, -0.35268527, 0.49760112, -0.22314657, -1.4903088, 0.127248, 0.33289358, 0.008700032, 0.25808573, 0.06463846, -0.74155235, -0.050904553, -0.23269303, 0.10879983, -0.9087305, -1.8773642, 0.5642511, 0.2196002, -0.46379822, 0.11352514, -0.29496926, -0.6093852, -0.18298301, 0.061270073, -0.049140558, -0.5005417, 0.09953485, 0.056674607, -0.14350703, -0.15416476, 0.40404642, 0.07931716, -0.00548602, -0.33145168, 0.02959743, 1.0458778, -0.89746296, -0.42943838, 0.11500622, -0.011682376, -0.2929791, 0.29517555, 0.80696404, -0.31865975, -0.20970649, 0.4407999, 0.18875344, 0.30398637, -2.9070837, 0.36484483, 0.2941781, -0.028258786, -0.036642462, -0.28152123, -0.6093519, 0.3174599, 0.5043123, -0.070129365, -0.19367912, 0.82303077, 0.31574672, -0.27325773, -0.030397467, 0.90699565, 0.67857176, -0.6498509, -0.24451834, 0.47923207, 0.23246121, 0.032487907, -0.24759132, 0.70931405, -0.3874223, 0.15472704, 0.31495345, 0.47187924, 0.25965035, 0.39718646, 0.06854395, -0.19198611, -0.7184307, 0.30908617, 0.17636482, 0.56339216, 0.44667977, 3.646104, 0.22566831, 0.12862551, 0.27747294, -0.21957819, 0.29426205, -0.51751864, -0.43140966, -0.19004236, -0.007916259, -0.38266945, -0.24096546, -0.23961896, 0.024652034, -0.17130616, 0.18542336, 0.4863241, -0.3738221, -0.07755293, 0.18648767, 0.054030467, -1.0263898, 0.27110633, -0.5990864, -0.04774314, -0.30704337, -0.0068784207, -0.12151876, 0.540429, -0.16140316, -0.07241504, 0.09571546, -0.03125654, -0.65197724, 0.11939469, 0.31613198, 0.27263078, 0.6261995, -0.34239733, 0.31695902, -0.36903435, -0.19025642, -2.1550782, 0.8678921, -0.58228683, 1.1318809, 0.24278025, -0.025941059, 0.034833483, -0.48601922, -0.25632247, -0.054675017, 0.30151796, 0.19868003, 0.28361732, 0.70255715, -0.28164476, -0.6817943, 0.3936984, -0.47408152, 0.3049221, -0.3625695, 0.029141426, 0.14986043, 0.93188053, 0.39253262, -0.11900401, -0.20872578, 0.053934112, -0.5820594, -0.32773975, 0.21639012, -0.21351156, 0.15459052, 0.13843021, 0.3449581, 0.14542629, -0.11263267, -0.013550565, -0.060970407, -0.56276673, -0.17891665, 0.7525495, -0.040820133, -0.6391703, 0.07905586, 0.020037597, 0.22856098, -0.36160892, 0.29691342, 0.767879, -1.3925536, 1.4704264, -0.4779303, -0.3835221, -0.023554435, -0.06825766, -0.109872624, 0.2055093, 0.43736684, -0.1827577, 0.12995064, -0.5539106, -0.4394507, 0.43868226, 0.15931082, -0.35642138, -0.08786084, -0.03701103, 0.44731712, 0.19322513, 0.09619242, -0.2596845, 0.52045155, 0.75005996, 0.8925594, 0.5227719, 0.111074686, 0.093878716, 0.6014957, 0.4931297, 0.4479884, 0.44160324, -0.22964476, -0.8713605, -0.6204782, -0.19655688, -1.0925924, -0.29989636, -0.293666, 0.246287, 0.63632417, 0.3850774, 0.8864852, 0.80491227, 0.5534682, -0.07080384, -0.4088683, 0.38070217, 0.46979156, 0.039911807, 0.42773122, -0.038587414, -0.101959854, 0.17420308, 0.27085477, -0.7570839, -0.06557259, 0.21330392, -0.3394337, 2.6723385, 0.6017182, -0.48143533, 0.17981973, 0.2758282, -0.1979813, -0.1028352, -1.0561858, -0.047162935, -0.68843824, 0.31740537, 0.042851776, -0.4075136, 0.51705885, 0.17764758, -0.45366558, -0.23266895, -0.26050186, 0.2877104, 0.1186843, -0.49778813, 0.106701866, 0.6899445, -0.43666136, 0.19366568, 0.10378077, -0.18091875, 0.3228362, 0.05295208, -0.5780082, 0.120646834, 0.16375476, -0.38828242, 0.2279101, 0.1231341, -0.58635736, -0.30719945, -0.64591914, 0.018991858, -0.42672944, 0.33452588, 0.10934558, 0.21086147, 0.17538211, -0.67358774, 1.3544751, -0.055709407, 0.36139753, 0.91979486, -0.3103525, 0.22816437, 0.19690624, 0.07529792, -0.01685359, 0.23103553, -0.5183102, -0.1500779, -0.1986415, 0.0015901811, -0.43503928, -0.31951472, -0.3860048, -0.63135403, 0.2632309, -0.08432937, 0.559052, -0.070936285, 0.112843335, 0.30483255, 0.02335038, -2.2506409, -0.3267749, 0.07764033, 0.18399169, -0.48793486, -0.19082531, -0.09139438, -0.3541397, 0.17343155, -0.5851774, 1.2752796, 0.3618666, -0.14888524, -0.6166738, 0.39572036, 0.032399848, -0.4919816, 0.2422423, -0.5121673, -0.5762546, -0.42830187, 0.6662334, 1.5064664, 0.2702801, 1.2943778, -0.42348123, 0.021760806, -0.3420208, -1.3269268, 0.34571293, -0.41079003, -0.3544565, 1.1190263, 0.049227126, -0.34205124, 0.77028656, 0.276464, 0.47106203, 0.007247477, -0.20408583, 1.6853089, 0.021187821, -0.2055681, 0.08187067, 0.6710684, 0.62027943, 0.043175846, 0.058470678, -0.85930353, 0.07039635, 0.053992283, 0.031500246, 0.112862565, 0.39211172, -0.16201492, 0.60837656, -0.16469325, 0.07837187, -0.03909096, 0.29955953, -0.12195324, -0.084076375, -0.79908514, -0.8041487, -0.77974474}

// Simulate vector model
type embedFake struct {
}

var _ embeddings.EmbedderClient = embedFake{}

func (embedFake) CreateEmbedding(ctx context.Context, texts []string) ([][]float32, error) {
	if len(texts) == 0 {
		return [][]float32{}, errors.New("empty texts")
	}
	if texts[0] == "君不见黄河之水天上来，奔流到海不复回。" {
		return [][]float32{t1}, nil
	}
	if texts[0] == "君不见高堂明镜悲白发，朝如青丝暮成雪。" {
		return [][]float32{t2}, nil
	}
	return [][]float32{}, errors.New("not match texts")
}
