diff --git a/.vscode/settings.json b/.vscode/settings.json index 328aa591..73bd5e1c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,22 +1,4 @@ { - "pgsql.connections": [ - { - "id": "92CC1089-BAD0-44A4-B071-A50A6EC12B67", - "groupId": "F3347CD6-9995-4EE9-8D98-D88DB010FA5B", - "authenticationType": "SqlLogin", - "connectTimeout": 15, - "applicationName": "vscode-pgsql", - "clientEncoding": "utf8", - "sslmode": "prefer", - "server": "localhost", - "user": "admin", - "password": "", - "savePassword": true, - "database": "postgres", - "profileName": "local-pg", - "expiresOn": 0 - } - ], "python.testing.pytestArgs": [ "tests" ], diff --git a/convert_csv_json.py b/convert_csv_json.py index ff4bf2ac..c9d0bfaa 100644 --- a/convert_csv_json.py +++ b/convert_csv_json.py @@ -1,6 +1,7 @@ import ast import csv import json +from typing import Any # Read CSV file - Using the correct dialect to handle quotes properly with open("pittsburgh_restaurants.csv", encoding="utf-8") as csv_file: @@ -15,7 +16,7 @@ item = {} for i in range(len(header)): if i < len(row): # Ensure we don't go out of bounds - value = row[i].strip() + value: Any = row[i].strip() # Check if the value looks like a JSON array if value.startswith("[") and value.endswith("]"): try: diff --git a/evals/generate_ground_truth.py b/evals/generate_ground_truth.py index 44410506..9009312c 100644 --- a/evals/generate_ground_truth.py +++ b/evals/generate_ground_truth.py @@ -56,18 +56,17 @@ def source_retriever() -> Generator[str, None, None]: DATABASE_URI = f"postgresql://{DBUSER}:{DBPASS}@{DBHOST}/{DBNAME}" engine = create_engine(DATABASE_URI, echo=False) with Session(engine) as session: - # Fetch all products for a particular type - item_types = session.scalars(select(Item.type).distinct()) - for item_type in item_types: - records = list(session.scalars(select(Item).filter(Item.type == item_type).order_by(Item.id))) - logger.info(f"Processing database records for type: {item_type}") - yield "\n\n".join([f"## Product ID: [{record.id}]\n" + record.to_str_for_rag() for record in records]) + # Fetch all products for a particular type - depends on the database columns + # item_types = session.scalars(select(Item.type).distinct()) + # for item_type in item_types: + # records = list(session.scalars(select(Item).filter(Item.type == item_type).order_by(Item.id))) + # logger.info(f"Processing database records for type: {item_type}") + # yield "\n\n".join([f"## Product ID: [{record.id}]\n" + record.to_str_for_rag() for record in records]) # Fetch each item individually - # records = list(session.scalars(select(Item).order_by(Item.id))) - # for record in records: - # logger.info(f"Processing database record: {record.name}") - # yield f"## Product ID: [{record.id}]\n" + record.to_str_for_rag() - # await self.openai_chat_client.chat.completions.create( + records = list(session.scalars(select(Item).order_by(Item.id))) + for record in records: + logger.info(f"Processing database record: {record.name}") + yield f"## Product ID: [{record.id}]\n" + record.to_str_for_rag() def source_to_text(source) -> str: diff --git a/src/backend/fastapi_app/api_models.py b/src/backend/fastapi_app/api_models.py index 848ec8e2..6cc543a3 100644 --- a/src/backend/fastapi_app/api_models.py +++ b/src/backend/fastapi_app/api_models.py @@ -45,7 +45,7 @@ class ItemPublic(BaseModel): id: str name: str cuisine: str - rating: int + rating: float price_level: int review_count: int description: str diff --git a/src/backend/fastapi_app/postgres_models.py b/src/backend/fastapi_app/postgres_models.py index 33d10517..cfabe07b 100644 --- a/src/backend/fastapi_app/postgres_models.py +++ b/src/backend/fastapi_app/postgres_models.py @@ -15,7 +15,7 @@ class Item(Base): id: Mapped[str] = mapped_column(primary_key=True) name: Mapped[str] = mapped_column() cuisine: Mapped[str] = mapped_column() - rating: Mapped[int] = mapped_column() + rating: Mapped[float] = mapped_column() price_level: Mapped[int] = mapped_column() review_count: Mapped[int] = mapped_column() description: Mapped[str] = mapped_column() diff --git a/src/backend/fastapi_app/routes/api_routes.py b/src/backend/fastapi_app/routes/api_routes.py index f566886c..b9f86d7f 100644 --- a/src/backend/fastapi_app/routes/api_routes.py +++ b/src/backend/fastapi_app/routes/api_routes.py @@ -45,7 +45,7 @@ async def format_as_ndjson(r: AsyncGenerator[RetrievalResponseDelta, None]) -> A @router.get("/items/{id}", response_model=ItemPublic) -async def item_handler(database_session: DBSession, id: int) -> ItemPublic: +async def item_handler(database_session: DBSession, id: str) -> ItemPublic: """A simple API to get an item by ID.""" item = (await database_session.scalars(select(Item).where(Item.id == id))).first() if not item: @@ -55,7 +55,7 @@ async def item_handler(database_session: DBSession, id: int) -> ItemPublic: @router.get("/similar", response_model=list[ItemWithDistance]) async def similar_handler( - context: CommonDeps, database_session: DBSession, id: int, n: int = 5 + context: CommonDeps, database_session: DBSession, id: str, n: int = 5 ) -> list[ItemWithDistance]: """A similarity API to find items similar to items with given ID.""" item = (await database_session.scalars(select(Item).where(Item.id == id))).first() diff --git a/tests/data.py b/tests/data.py index 3e705dff..86816d88 100644 --- a/tests/data.py +++ b/tests/data.py @@ -6,1039 +6,1038 @@ class TestData(ItemPublic): test_data = TestData( - id=1, - type="Footwear", - brand="Daybird", - name="Wanderer Black Hiking Boots", - description="Daybird's Wanderer Hiking Boots in sleek black are perfect for all your " - "outdoor adventures. These boots are made with a waterproof leather upper and a durable " - "rubber sole for superior traction. With their cushioned insole and padded collar, " - "these boots will keep you comfortable all day long.", - price=109.99, + id="XDqSIoVRrG4JoF79HTT1Zw", + name="Balvanera", + cuisine="Argentine, Wine Bars, Steakhouses", + rating=4.5, + price_level=2, + review_count=132, + description="Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse.", + menu_summary="The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines.", # noqa: E501 embeddings=[ - -0.007164456881582737, - 0.037004418671131134, - -0.009367527440190315, - -0.030484763905405998, - 0.004260613117367029, - 0.04925564303994179, - 0.0005096279783174396, - -0.02253221720457077, - -0.040264248847961426, - 0.03818655386567116, - 0.005865898914635181, - 0.016854384914040565, - 0.014024424366652966, - -0.0031859443988651037, - 0.009412305429577827, - -0.002482932060956955, - -0.036682020872831345, - 0.005346476100385189, - 0.023857641965150833, - 0.009600372053682804, - -0.006174866575747728, - -0.033063970506191254, - -0.03926122561097145, - 0.021851593628525734, - 0.0008630931843072176, - -0.01577076129615307, - 0.018394744023680687, - -0.014866247773170471, - -0.0025209933519363403, - 0.030771343037486076, - -0.03111165389418602, - 0.021779948845505714, - 0.07211025804281235, - 0.06809816509485245, - -0.05613351985812187, - -0.006488311104476452, - -0.012707955203950405, - 0.006618167273700237, - 0.07318492978811264, - 0.02140381559729576, - 0.02194114960730076, - -0.028532449156045914, - -0.03535659611225128, - 0.010173528455197811, - -0.042198650538921356, - -0.0050598978996276855, - 0.03447894752025604, - 0.03772086650133133, - -0.0032172889914363623, - -0.028066759929060936, - -0.06190090999007225, - -0.044204700738191605, - -0.0602530837059021, - 0.011812398210167885, - 0.04936311021447182, - 0.038401488214731216, - 0.0909169614315033, - 0.16492579877376556, - -0.027780182659626007, - -0.024699466302990913, - 0.06759665161371231, - -0.024914398789405823, - -0.024735286831855774, - -0.01000337302684784, - 0.014516981318593025, - 0.028424983844161034, - 0.024341242387890816, - 0.04739288240671158, - -0.03926122561097145, - -0.013209467753767967, - -0.007965981028974056, - 0.0019019393948838115, - -0.029893696308135986, - 0.012027332559227943, - -0.014570713974535465, - -0.022693417966365814, - 0.008239125832915306, - -0.0018426087917760015, - -0.055524542927742004, - -0.051548268646001816, - 0.04911235347390175, - -0.0748685747385025, - 0.015654338523745537, - -0.032849036157131195, - 0.009304838255047798, - -0.013352756388485432, - -0.023427775129675865, - -0.08411072194576263, - -0.02731449156999588, - -0.01668422855436802, - 0.004862875211983919, - -0.006268899887800217, - -0.003902390133589506, - -0.03198929876089096, - -0.020382879301905632, - 0.007339090574532747, - -0.017006630077958107, - 0.016854384914040565, - -0.015896139666438103, - -0.03456850349903107, - 0.0242875088006258, - -0.05803210288286209, - -0.012018376961350441, - -0.06559060513973236, - 0.03793580085039139, - -0.00160416669677943, - 0.011167597025632858, - 0.03747010976076126, - -0.010066062211990356, - -0.09600372612476349, - 0.040586650371551514, - -0.0004382632614579052, - -0.01283333357423544, - 0.048073507845401764, - 0.004072546027600765, - 0.03890300169587135, - 0.000648159475531429, - -0.08661828190088272, - 0.03349383547902107, - -0.03293859213590622, - -0.0018258170457556844, - 0.0013690829509869218, - 0.05391253903508186, - 0.0022624011617153883, - -0.017078274860978127, - -0.019075365737080574, - -0.01986345648765564, - 0.07357897609472275, - 0.027941381558775902, - 0.019917190074920654, - 0.02654431387782097, - -0.00332699459977448, - -0.01884252205491066, - 0.04499278962612152, - -0.0160662941634655, - 0.009537682868540287, - 0.05792463570833206, - -0.005458420608192682, - -0.02946382947266102, - -0.0026217433623969555, - 0.027260757982730865, - -0.07182367891073227, - -0.050079554319381714, - 0.05889183655381203, - 0.011570597998797894, - -0.012967667542397976, - 0.036682020872831345, - -0.06949523091316223, - -0.07974040508270264, - 0.0009151474223472178, - 0.042485229671001434, - 0.0361446850001812, - 0.08711979538202286, - -0.006618167273700237, - 0.014597580768167973, - -0.013737846165895462, - -0.05427076295018196, - 0.013773668557405472, - -0.025863690301775932, - 0.019738078117370605, - -0.01792905293405056, - 0.006170388776808977, - 0.0394403338432312, - 0.014472203329205513, - 0.057351477444171906, - 0.03155943378806114, - -0.04130309447646141, - 0.05828285589814186, - -0.052049778401851654, - 0.02249639481306076, - -0.005131542216986418, - -0.007142067886888981, - 0.028765294700860977, - 0.010433240793645382, - -0.029481740668416023, - -0.052013956010341644, - 0.04671226069331169, - 0.004818097222596407, - 0.014705047942698002, - 0.008471970446407795, - -0.00261950446292758, - 0.03829402104020119, - 0.012519888579845428, - 0.0049972087144851685, - -0.013361711986362934, - -0.01855594292283058, - 0.003756862133741379, - 0.016890207305550575, - 0.0005037508672103286, - 0.018967900425195694, - -0.06379948556423187, - -0.038544777780771255, - -0.006130088586360216, - 0.004408380016684532, - -0.0019444783683866262, - 0.002050825860351324, - 0.006694289389997721, - 0.031828101724386215, - -0.004345690831542015, - -0.0005079488037154078, - -0.055417075753211975, - -0.024036753922700882, - 0.04123144969344139, - -0.01035264041274786, - 0.06225913017988205, - 0.010083973407745361, - 0.011812398210167885, - 0.016334962099790573, - -0.006273377686738968, - -0.010961619205772877, - 0.04653314873576164, - -0.04280763119459152, - -0.02077692560851574, - 0.018502209335565567, - -0.016299139708280563, - -0.014158758334815502, - 0.022156083956360817, - 0.012295999564230442, - 0.017543964087963104, - 0.02457408793270588, - -0.03118329867720604, - -0.000339192250976339, - 0.028138404712080956, - -0.008664514869451523, - -0.06519655883312225, - -0.01961270160973072, - 0.03718353062868118, - 0.08504210412502289, - 0.051655735820531845, - 0.015385671518743038, - -0.009698883630335331, - -0.04141056165099144, - 0.021278437227010727, - -0.08002698421478271, - -0.06190090999007225, - 0.006147999782115221, - -0.053518492728471756, - -0.07895231246948242, - -0.008176436647772789, - -0.02004256844520569, - 0.0026553268544375896, - 0.004598686005920172, - -0.02752942591905594, - -0.015654338523745537, - 0.03451476991176605, - -0.03490881621837616, - 0.04721377044916153, - -0.02151128277182579, - -0.036932773888111115, - -0.029965341091156006, - 0.011991510167717934, - 0.0839674323797226, - 0.01511700451374054, - 0.02512933313846588, - 0.03575063869357109, - -0.024896487593650818, - 0.00018946630007121712, - 0.02249639481306076, - 0.006801756098866463, - 0.055417075753211975, - -0.024932309985160828, - 0.05452151596546173, - -0.047679461538791656, - 0.020687369629740715, - -0.0489332415163517, - -0.03825819864869118, - -0.006671900395303965, - 0.019487323239445686, - -0.03096836432814598, - -0.03370876982808113, - -0.004818097222596407, - 0.02267550677061081, - -0.03297441452741623, - 0.02921307273209095, - 0.01446324773132801, - -0.002599354600533843, - 0.08017027378082275, - 0.04560177028179169, - 0.05101093277335167, - -0.016093160957098007, - 0.03304605931043625, - -0.001496699871495366, - 0.0471063032746315, - -0.006783845368772745, - 0.01276168879121542, - 0.010558618232607841, - -0.03367294743657112, - 0.05108257755637169, - 0.08482716977596283, - 0.01404233556240797, - -0.018538031727075577, - 0.03686113283038139, - 0.02695626951754093, - -0.010639218613505363, - 0.05341102555394173, - 0.026884624734520912, - 0.012260177172720432, - 0.03388788178563118, - 0.022263549268245697, - 0.0427359864115715, - -0.03498046100139618, - -0.0098600834608078, - 0.009752617217600346, - 0.01046010758727789, - 0.051763202995061874, - 0.05022284388542175, - -0.016881251707673073, - -0.01866341009736061, - -0.006147999782115221, - -0.04868248477578163, - 0.0017642475431784987, - -0.05702907592058182, - -0.0014754303265362978, - -0.02147546038031578, - -0.00786746945232153, - -0.0017832780722528696, - 0.009958595037460327, - 0.023893464356660843, - 0.0029351883567869663, - -0.0017496946966275573, - -0.04585252329707146, - 0.06566224992275238, - -0.09836799651384354, - 0.027332402765750885, - -0.006976389791816473, - -0.06401441991329193, - -0.042556874454021454, - -0.024771109223365784, - -0.0525871142745018, - -0.042413584887981415, - -0.01632600650191307, - -0.010182484053075314, - 0.0489332415163517, - 0.018681321293115616, - 0.04008513689041138, - -0.011498953215777874, - -0.02727866917848587, - 0.009886950254440308, - 0.07214608043432236, - 0.03241916745901108, - 0.002263520611450076, - -0.01815294288098812, - -0.008610781282186508, - -0.028299605473876, - -0.01455280277878046, - -0.012457199394702911, - 0.0372551754117012, - -0.00034674853668548167, - -0.05437823012471199, - -0.0014049052260816097, - 0.0008949973853304982, - 0.014140847139060497, - -0.00787194725126028, - -0.0026575657539069653, - -0.006094266194850206, - 0.02749360352754593, - -0.019451500847935677, - -0.00013258443505037576, - -0.0024202431086450815, - 0.057279832661151886, - -0.02161874808371067, - -0.05419911816716194, - -0.0002482372510712594, - 0.04194789379835129, - 0.022012794390320778, - -0.008046580478549004, - 0.002740404801443219, - 0.007970458827912807, - -0.04549430310726166, - -0.03539241850376129, - -0.007509246468544006, - 0.04520772397518158, - -0.03804326802492142, - -0.01232286635786295, - -0.06913700699806213, - 0.0215471051633358, - 0.005467376206070185, - -0.04904070869088173, - -0.030628053471446037, - 0.01303931139409542, - 0.012788555584847927, - -0.03961944580078125, - -0.07178785651922226, - -0.027332402765750885, - 0.03666410967707634, - -0.0328669473528862, - -0.07099977135658264, - 0.04542265832424164, - -0.040264248847961426, - -0.06186508759856224, - 0.014302046969532967, - 0.03811491280794144, - -0.006130088586360216, - 0.013782624155282974, - 0.03739846497774124, - -0.022335194051265717, - 0.00583455478772521, - 0.036019306629896164, - -0.0039292569272220135, - 0.023499418050050735, - -0.019397767260670662, - 0.011400442570447922, - -0.040765758603811264, - 0.029571296647191048, - 0.03490881621837616, - 0.017436496913433075, - 0.05226471275091171, - 0.0313982330262661, - -0.028801117092370987, - 0.03275948017835617, - -0.04144638404250145, - -0.02271132916212082, - -0.017373807728290558, - 0.0438106544315815, - 0.014651314355432987, - 0.030036985874176025, - -0.00441957451403141, - 0.007495813071727753, - 4.323861867305823e-05, - -0.04144638404250145, - -0.021170970052480698, - -0.01279751118272543, - -0.04896906390786171, - 0.01093475241214037, - -0.03465805947780609, - 0.06806234270334244, - 0.012940800748765469, - 0.04180460795760155, - -0.08869598060846329, - 0.02643684670329094, - -0.034084904938936234, - -0.053733427077531815, - 0.008471970446407795, - -0.02136799320578575, - -0.009564549662172794, - -0.01912909932434559, - -0.006340544205158949, - 0.018609676510095596, - 0.0012582577764987946, - -0.0118661317974329, - -0.0474645271897316, - -0.010522795841097832, - 0.0074510350823402405, - 0.047751106321811676, - -0.048252616077661514, - -0.007885380648076534, - -0.03612677380442619, - 0.025362176820635796, - 0.038723889738321304, - 0.01349604595452547, - 0.030950454995036125, - -0.013227378949522972, - 0.023356130346655846, - 0.012672132812440395, - 0.058784369379282, - -0.04355989769101143, - 0.013782624155282974, - 0.021976971998810768, - 0.04488532245159149, - 0.03718353062868118, - -0.000855257036164403, - 0.036717843264341354, - 0.02570248953998089, - 0.031040009111166, - 0.01979181170463562, - -0.03388788178563118, - 0.024162130430340767, - 0.02242475003004074, - -0.007576413452625275, - 0.03546406328678131, - 0.016451384872198105, - -0.03476552665233612, - -0.023642707616090775, - 0.001568344421684742, - -0.003353861393406987, - 0.0043434519320726395, - -0.0365208201110363, - -0.024932309985160828, - -0.008203303441405296, - 0.027744360268115997, - -0.040515005588531494, - -0.026006978005170822, - 0.01629018411040306, - 0.0328669473528862, - 0.022227726876735687, - -0.033690858632326126, - -0.032078854739665985, - -0.00476436410099268, - -0.027869736775755882, - 0.024000931531190872, - -0.022012794390320778, - -0.02709955908358097, - -0.04656897112727165, - -0.017481274902820587, - -0.03901046887040138, - -0.018412655219435692, - 0.005785298999398947, - -0.03342219069600105, - -0.01859176531434059, - 0.040729936212301254, - -0.018278321251273155, - 0.028604093939065933, - 0.051691558212041855, - 0.003273261245340109, - 0.07332821935415268, - 0.08375250548124313, - -0.02446662075817585, - 0.0339595265686512, - 0.055309608578681946, - 0.0008367861737497151, - -0.025397999212145805, - 0.02457408793270588, - -0.058784369379282, - -0.001550433225929737, - -0.011069086380302906, - -0.008776459842920303, - 0.02453826554119587, - 0.024520354345440865, - 0.027439869940280914, - 0.01731111854314804, - 0.009877994656562805, - 0.017248429358005524, - -0.021600836887955666, - -0.019988834857940674, - 0.0273861363530159, - 0.03512375056743622, - 0.03804326802492142, - 0.004063590429723263, - 0.011776575818657875, - -0.023535240441560745, - 0.028657827526330948, - -0.005771865602582693, - -0.011060130782425404, - 0.02742195874452591, - -0.012645266950130463, - 0.040765758603811264, - 0.008637648075819016, - 0.013066178187727928, - 0.0005877093644812703, - 0.01950523443520069, - 0.027296580374240875, - 0.02453826554119587, - -0.030663875862956047, - 0.02457408793270588, - -0.024932309985160828, - 0.013872180134057999, - -0.00787194725126028, - -0.006631600670516491, - -0.0242875088006258, - -0.03388788178563118, - -0.019917190074920654, - -0.0430942103266716, - -0.015134915709495544, - -0.013863224536180496, - 0.04316585138440132, - 0.01676482893526554, - -0.032849036157131195, - 0.049936264753341675, - 0.013890091329813004, - -0.012654222548007965, - 0.0631546899676323, - 0.01708723045885563, - 0.01423935778439045, - -0.013836357742547989, - -0.011642242781817913, - -0.007034601178020239, - -0.03732682019472122, - 0.029660852625966072, - -0.04689137265086174, - 0.021314259618520737, - 0.035911839455366135, - -0.008427192457020283, - 0.012161665596067905, - -0.02801302634179592, - 0.012627355754375458, - 0.007683880161494017, - -0.0029105606954544783, - 0.028174227103590965, - 0.024126308038830757, - -0.061076994985342026, - -0.015090137720108032, - -0.02932053990662098, - -0.010576529428362846, - -0.020221680402755737, - 0.015179692767560482, - 0.012806466780602932, - -0.0056912656873464584, - -0.01757083088159561, - 0.02702791430056095, - 0.005592754110693932, - 0.002259042812511325, - 0.02983996272087097, - 0.029965341091156006, - 0.0031859443988651037, - 0.027618981897830963, - -0.016854384914040565, - 0.019075365737080574, - 0.040264248847961426, - 0.002100081415846944, - 0.01423935778439045, - -0.0006582344649359584, - -0.011472086422145367, - 0.009510817006230354, - 0.029159339144825935, - -0.022442661225795746, - 0.01466026995331049, - 0.07479692995548248, - -0.013316933996975422, - -0.018197720870375633, - -0.029571296647191048, - -0.07515515387058258, - -0.012161665596067905, - 0.0025523377116769552, - 0.014418469741940498, - -0.030144453048706055, - 0.017006630077958107, - 0.023642707616090775, - -0.01859176531434059, - -0.003367294790223241, - 0.013988601975142956, - -0.023929286748170853, - -0.010504884645342827, - 0.018126076087355614, - 0.06286811083555222, - -0.051512446254491806, - 0.02190532721579075, - 0.05058106780052185, - 0.006456966977566481, - 0.008185392245650291, - 0.03954780101776123, - -0.021099325269460678, - -0.0017082751728594303, - 0.007616713177412748, - -0.027672715485095978, - -0.004012095741927624, - 0.006385322194546461, - 0.021045591682195663, - -0.03118329867720604, - -0.03564317151904106, - 0.006886834278702736, - 0.03446103632450104, - 0.015564782544970512, - 0.02271132916212082, - -0.032884858548641205, - -0.003844178980216384, - 0.015000581741333008, - 0.008086880668997765, - 0.024860665202140808, - 0.001491102622821927, - 0.022281460464000702, - -0.023356130346655846, - 0.021421726793050766, - -0.008131658658385277, - 0.03936869278550148, - 0.010075017809867859, - 0.0026150268968194723, - -0.009985461831092834, - 0.014015468768775463, - -0.020579902455210686, - 0.061327751725912094, - 0.046067457646131516, - -0.06942358613014221, - 0.029893696308135986, - -0.024162130430340767, - 0.01625436171889305, - 0.0412672720849514, - 0.01504535973072052, - -0.034962549805641174, - 0.011991510167717934, - -0.014194580726325512, - 0.013522912748157978, - -0.034819260239601135, - 0.0047419751062989235, - -0.029499651864171028, - -0.04270016402006149, - -0.03757757693529129, - 0.017973830923438072, - -0.02457408793270588, - 0.040156781673431396, - -0.027726449072360992, - -0.013316933996975422, - -0.021188881248235703, - 0.019415678456425667, - 0.007580891251564026, - 0.010451151989400387, - -0.006089788395911455, - -0.004381513223052025, - -0.017409630119800568, - 0.03440730273723602, - 0.05265875905752182, - -0.017830541357398033, - -0.02278297394514084, - 0.037076063454151154, - 0.025433821603655815, - -0.0231949295848608, - 0.021493371576070786, - 0.0003632603620644659, - -0.025845779106020927, - -0.01986345648765564, - 0.0032374390866607428, - -0.018538031727075577, - 0.03388788178563118, - -0.05290951579809189, - 0.0033852059859782457, - 0.008910792879760265, - -0.030036985874176025, - -0.030538497492671013, - 0.013370667584240437, - 0.018538031727075577, - -0.023642707616090775, - -0.01303931139409542, - 0.0045942082069814205, - -0.04334496334195137, - -0.028711561113595963, - -0.0019209700403735042, - -0.0017060362733900547, - 0.06286811083555222, - 0.03157734498381615, - 0.017696209251880646, - 0.04266434162855148, - -0.01066608540713787, - 0.04886159673333168, - 0.06673691421747208, - -0.016478251665830612, - -0.019953012466430664, - -0.005574842914938927, - 0.02942800708115101, - -0.022084439173340797, - -0.004260613117367029, - -0.00834659207612276, - -0.06293975561857224, - 0.02914142794907093, - -0.03721935302019119, - 0.005333042703568935, - -0.04535101354122162, - 0.007549546658992767, - -0.006215166300535202, - 0.020150035619735718, - 0.022872528061270714, - -0.020167946815490723, - -0.02289043925702572, - -0.019845545291900635, - -0.0050598978996276855, - -0.09012886881828308, - 0.015134915709495544, - 0.03078925423324108, - -0.03245498985052109, - -0.008995871059596539, - -0.008888404816389084, - -0.010531751438975334, - -0.03757757693529129, - 0.023893464356660843, - -0.04098069295287132, - -0.037040241062641144, - -0.055846940726041794, - 0.004558385815471411, - 0.007921203039586544, - -0.03345801308751106, - -0.0035284950863569975, - -0.06745336204767227, - 0.014893114566802979, - -0.010379507206380367, - -0.016961852088570595, - 0.02709955908358097, - 0.026848802343010902, - 0.029553385451436043, - -0.007562980055809021, - -0.009394394233822823, - 0.029195161536335945, - 0.0025142766535282135, - -0.03100418671965599, - 0.003154600039124489, - 0.00984217319637537, - -0.05025866627693176, - 0.02443079836666584, - -0.008458537049591541, - 0.011839265003800392, - 0.01968434639275074, - -0.017355896532535553, - 0.006779367569833994, - -0.02000674605369568, - 0.018430566415190697, - 0.014525936916470528, - -0.03012654185295105, - -0.06204419583082199, - 0.007862991653382778, - 0.036896951496601105, - 0.03494463860988617, - -0.03338636830449104, - 0.02471737563610077, - 0.026723423972725868, - 0.029195161536335945, - -0.0008972362847998738, - -0.005521109793335199, - 0.0017899947706609964, - -0.008485403843224049, - -0.006868923082947731, - 0.020114213228225708, - 0.025792045518755913, - 0.029660852625966072, - -0.008789893239736557, - -0.010030239820480347, - -0.05967992544174194, - 0.010397418402135372, - 0.03818655386567116, - -0.04094487056136131, - -0.04531519114971161, - 0.01493789255619049, - -0.007607757579535246, - 0.009627238847315311, - 0.01943358965218067, - 0.03370876982808113, - -0.014490114524960518, - 0.03367294743657112, - 0.0035777506418526173, - 0.036896951496601105, - -0.013003489002585411, - 0.027547337114810944, - -0.022997906431555748, - -0.010486973449587822, - -0.02238892763853073, - -0.004925563931465149, - -0.016299139708280563, - -0.02231728285551071, - 0.013272156938910484, - 0.01621853932738304, - 0.08840940147638321, - 0.0035979007370769978, - -0.003938212525099516, - -0.010370551608502865, - 0.02906978502869606, - -0.03435357287526131, - -0.0030628053937107325, - -0.03293859213590622, - -0.030771343037486076, - 0.028066759929060936, - 0.012349733151495457, - 0.059285882860422134, - 0.0006246510893106461, - 0.04764363914728165, - 0.009940683841705322, - 0.018206676468253136, - 0.005601709708571434, - 0.01792905293405056, - -0.004092696122825146, - 0.010370551608502865, - -0.03811491280794144, - 0.021153058856725693, - -0.04853919520974159, - 0.04735706001520157, - -0.004634507931768894, - 0.025218889117240906, - 0.04764363914728165, - 0.006551000289618969, - -0.012358687818050385, - 0.028729472309350967, - -0.008198825642466545, - -0.016370784491300583, - -0.021135147660970688, - 0.0016870057443156838, - -0.004898697603493929, - -0.0253800880163908, - -0.006362933199852705, - 0.0019355227705091238, - 0.017830541357398033, - 0.051763202995061874, - 0.02407257631421089, - -0.032705746591091156, - 0.00883467122912407, - -0.028460804373025894, - -0.004016573540866375, - -0.003295650240033865, - -0.07615818083286285, - 0.003911345731467009, - -0.0032262445893138647, - 0.04112398251891136, - 1.201655777549604e-05, - 0.004547191318124533, - 0.0635487362742424, - 0.0124124214053154, - 0.022156083956360817, - -0.042162828147411346, - 0.03619841858744621, - 0.0063942777924239635, - -0.024197952821850777, - 0.01237659901380539, - -0.021135147660970688, - -0.006680855993181467, - -0.029481740668416023, - -0.029123516753315926, - 0.03743428736925125, - 0.0013869941467419267, - -0.0354282408952713, - 0.051870670169591904, - -0.004050157032907009, - 0.010128751397132874, - 0.038723889738321304, - -0.030466852709650993, - -0.010764596983790398, - 0.029445918276906013, - 0.011472086422145367, - -0.022263549268245697, - -0.016514074057340622, - 0.007401779759675264, - -0.02136799320578575, - -0.0021135148126631975, - 0.012358687818050385, - -0.0020922452677041292, - -0.022299371659755707, - 0.012788555584847927, - 0.014033379964530468, - -0.0018135032150894403, - -0.006398755591362715, - 0.009466039016842842, - -0.025612933561205864, - -0.008794371038675308, - 0.008248081430792809, - 0.015528960153460503, - 0.04098069295287132, - -0.03417446091771126, - 0.022191906347870827, - -0.01574389450252056, - 0.04141056165099144, - 0.01950523443520069, - 0.0019388811197131872, - -0.023051640018820763, - -0.0029195162933319807, - 0.010254128836095333, - 0.030681787058711052, - 0.011078041978180408, - -0.018314143642783165, - -0.01404233556240797, - 0.03363712504506111, - 0.03904629126191139, - 0.019379856064915657, - 0.0010231740307062864, - -0.007164456881582737, - 0.04871830716729164, - -0.025021865963935852, - -0.02548755519092083, - 0.03800744563341141, - 0.03440730273723602, - 0.003100866451859474, - 0.02337404154241085, - -0.044133055955171585, - -0.04209118336439133, - -0.03747010976076126, - -0.025075599551200867, - -0.01520655956119299, - 0.03227587789297104, - 0.010083973407745361, - 0.0438106544315815, - 0.005959932692348957, - -0.004571819212287664, - -0.029929518699645996, - -0.020275413990020752, - -0.014346824958920479, - 0.029410095885396004, - 0.017660386860370636, - -0.019290300086140633, - 0.022156083956360817, - 0.019988834857940674, - -0.03442521393299103, - -0.00014098027895670384, - -0.010128751397132874, - 0.007173412479460239, - -0.023499418050050735, - 0.019415678456425667, - 0.011275064200162888, - -0.008019713684916496, - -0.04008513689041138, - 0.027404047548770905, - 0.044097233563661575, - -0.017337985336780548, - 0.042592696845531464, - -0.015215515159070492, - 0.003190422197803855, - 0.001774322590790689, - -0.0045942082069814205, - -0.02541591040790081, - 0.0063450220040977, - 0.015457316301763058, - -0.03718353062868118, - -0.015528960153460503, - 0.05140497907996178, - 0.032186321914196014, - -0.005444987211376429, - 0.04144638404250145, - -0.02344568632543087, - 0.04463456571102142, - -0.07028332352638245, - -0.02169039286673069, - -0.006277855485677719, - 0.010442196391522884, - -0.024556176736950874, - -0.020024657249450684, - -0.025756223127245903, - 0.031165387481451035, - -0.013675156980752945, - 0.0005292182904668152, - -0.03240125626325607, - 0.0012280327500775456, - -0.05255129188299179, - -0.015618516132235527, - -0.012922889553010464, - 0.030287742614746094, - -0.014722959138453007, - -0.0007869708351790905, - 0.023248663172125816, - -0.021994883194565773, - -0.01905745640397072, - 0.01031681802123785, - -0.053590137511491776, - -0.008207781240344048, - -0.04585252329707146, - 0.015305071137845516, - 0.001373560749925673, - -0.015314026735723019, - -0.017427541315555573, - 0.07056990265846252, - 0.004332257434725761, - 0.0024448710028082132, - -0.014893114566802979, - -0.027404047548770905, + -0.016376802697777748, + 0.023423992097377777, + -0.020325226709246635, + 0.018959105014801025, + -0.00370060745626688, + 0.019325625151395798, + -0.05201258882880211, + -0.05684399604797363, + 0.011303825303912163, + 0.06777296960353851, + 0.012253446504473686, + 0.05064646899700165, + -0.045248620212078094, + 0.03661872819066048, + 0.004060880281031132, + 0.02858859859406948, + -0.03588568791747093, + -0.03758500888943672, + -0.013794498518109322, + -0.0546448715031147, + -0.022957511246204376, + 0.012053526006639004, + -0.040817055851221085, + -0.011670345440506935, + -0.015210600569844246, + 0.04791422560811043, + -0.009871062822639942, + 0.016310160979628563, + -0.006609863601624966, + 0.04591502249240875, + 0.0010245913872495294, + 0.019258985295891762, + 0.03395312651991844, + 0.05234578996896744, + -0.04085037484765053, + -0.010912314988672733, + 0.03701857104897499, + 0.038084812462329865, + 0.051512788981199265, + 0.03691861033439636, + -0.01945890672504902, + -0.02835535816848278, + -0.0018263548845425248, + 0.00665984395891428, + -0.037951529026031494, + -0.06677336990833282, + -0.05204590782523155, + 0.020558467134833336, + -0.028621917590498924, + -0.06963889300823212, + 0.027255795896053314, + 0.012778237462043762, + -0.005018831696361303, + 0.019209004938602448, + 0.05161274969577789, + -0.03988409414887428, + -0.0031487441156059504, + 0.047747623175382614, + 0.014752449467778206, + 0.01990872621536255, + -0.008688201196491718, + 0.014544199220836163, + -0.017476363107562065, + -0.00023389109992422163, + 0.019209004938602448, + -0.007080509327352047, + 0.04728114232420921, + -0.014894059859216213, + -0.026489434763789177, + -0.0006794165237806737, + 0.01321139745414257, + 0.04198325425386429, + -0.04721450433135033, + 0.06863929331302643, + 0.0073720598593354225, + 0.029071738943457603, + -0.02867189794778824, + -0.015510480850934982, + 0.0041566756553947926, + -0.0334533229470253, + -0.0013536268379539251, + -0.02299083024263382, + -0.009937703609466553, + -0.008125925436615944, + -0.018242724239826202, + 0.01223678607493639, + -0.031120920553803444, + -0.09016404300928116, + -0.0058851526118814945, + 0.0680728480219841, + 0.06014268100261688, + -0.0319039411842823, + -0.015552130527794361, + -0.021991228684782982, + 0.06943897157907486, + 0.01569374091923237, + 0.002628118498250842, + 0.024756792932748795, + -0.04268297553062439, + 0.0353192463517189, + -0.054944753646850586, + -0.01541885081678629, + -0.0400506928563118, + -0.06607364863157272, + 0.0350860059261322, + 0.00853826105594635, + 0.0012349241878837347, + 0.01787620410323143, + -0.059476278722286224, + -0.04015065357089043, + -0.04045053571462631, + -0.017259782180190086, + 0.04731446132063866, + -0.03731844946742058, + -0.054478272795677185, + 0.03327006474137306, + 0.022907530888915062, + -0.015493820421397686, + -0.030471181496977806, + 0.03495272621512413, + -0.025639774277806282, + -0.08136754482984543, + 0.012020206078886986, + -0.040017373859882355, + -0.01584368199110031, + 0.006501573603600264, + -0.006734814029186964, + 0.00580601766705513, + -0.0013994418550282717, + 0.02412371151149273, + -0.018625903874635696, + 0.05577775463461876, + 0.0202585868537426, + -0.04324941709637642, + 0.004133767914026976, + -0.03475280478596687, + -0.057776957750320435, + 0.03218716382980347, + 0.043216098099946976, + 0.022374410182237625, + -0.02252434939146042, + -0.012878197245299816, + -0.007088839542120695, + 0.03396978601813316, + 0.015685411170125008, + 0.006168373394757509, + -0.004573176149278879, + 0.012086845934391022, + -0.008938102051615715, + -0.022024549543857574, + 0.04794754460453987, + -0.03588568791747093, + 0.01508564967662096, + -0.022291108965873718, + 0.026339495554566383, + 0.02127484790980816, + -0.01035420410335064, + -0.0008262329502031207, + -0.018475964665412903, + 0.0020221101585775614, + -0.02060844749212265, + -0.0009225487010553479, + -0.01834268495440483, + 0.0628749206662178, + 0.047514382749795914, + -0.013677878305315971, + 0.033303383737802505, + 0.024656832218170166, + -0.043882496654987335, + 0.03541920706629753, + 0.015577120706439018, + 0.011553725227713585, + -0.029754798859357834, + -0.05827675759792328, + -0.08723187446594238, + 0.015002350322902203, + 0.06257504224777222, + 0.0013577918289229274, + -0.0021158228628337383, + 0.014402588829398155, + -0.018609244376420975, + -0.038184769451618195, + -0.0017878286307677627, + -0.003642297349870205, + -0.023040810599923134, + 0.07830210775136948, + -0.02162470854818821, + 0.014494218863546848, + 0.0020481415558606386, + -0.027355756610631943, + -0.01133714523166418, + 0.011512075550854206, + -0.035252608358860016, + 0.0006336014484986663, + 0.0631081610918045, + 0.035685766488313675, + 0.0023615581449121237, + -0.020525148138403893, + 0.0012609554687514901, + 0.006143383216112852, + 0.03528592735528946, + -0.06410776823759079, + 0.03575240820646286, + 0.04611494019627571, + -0.018742524087429047, + 0.06810616701841354, + -0.031220881268382072, + 0.0015087733045220375, + 0.0015400107949972153, + -0.0012713678879663348, + 0.03083770163357258, + -0.03097098134458065, + -0.03995073214173317, + 0.058709919452667236, + 0.015560460276901722, + 0.000535203202161938, + 0.021608049049973488, + 0.017226463183760643, + 0.04155009612441063, + 0.022224469110369682, + -0.0014671231620013714, + -0.023507291451096535, + -0.05671071633696556, + 0.005289556924253702, + -0.01595197059214115, + 0.024340292438864708, + -0.027005895972251892, + 0.004079623147845268, + -0.009171342477202415, + 0.009596172720193863, + 0.004789756145328283, + -0.0035256771370768547, + 0.0003207054396625608, + -0.06034259870648384, + -0.009596172720193863, + 0.05601099506020546, + -0.007805220317095518, + -0.04224981740117073, + -0.02480677329003811, + 0.03855128958821297, + -0.04498206079006195, + 0.11662015318870544, + 0.0009048474603332579, + -0.03781824931502342, + 0.03995073214173317, + 0.029338298365473747, + -0.011587045155465603, + -0.022507689893245697, + 0.0267393346875906, + -0.02277425117790699, + 0.045715101063251495, + -0.030871020630002022, + 0.022491030395030975, + 0.022840891033411026, + 0.06903912872076035, + -0.00677646417170763, + 0.04221649467945099, + 0.005314547102898359, + 0.057910237461328506, + 0.046947941184043884, + 0.0051187919452786446, + -0.009846072643995285, + -0.03040453977882862, + 0.04201657697558403, + -0.02105826884508133, + -0.008350836113095284, + 0.02140812762081623, + -0.02392379194498062, + -0.02938827872276306, + 0.0024511057417839766, + -0.009837742894887924, + -0.04278293624520302, + 0.0060225981287658215, + 0.040817055851221085, + -0.002353228162974119, + 0.00040036116843111813, + 0.01570207066833973, + -0.009254642762243748, + -0.0088881216943264, + -0.02800549753010273, + 0.06793957203626633, + -0.09862732887268066, + 0.03608560934662819, + -0.01957552693784237, + -0.01269493717700243, + 0.05124622955918312, + 0.01331968791782856, + -0.038751211017370224, + 0.08023466914892197, + -0.040483854711055756, + -0.018875805661082268, + 0.0008179029682651162, + 0.05781027674674988, + 0.005672737490385771, + 0.008621561340987682, + 0.005327042192220688, + 0.006709823850542307, + 0.029005099087953568, + -0.02469015307724476, + -0.01132881548255682, + 0.03448624536395073, + 0.02400709129869938, + 0.02528991363942623, + -0.049713507294654846, + 0.006218353286385536, + -0.01994204707443714, + -0.03951757401227951, + 0.04394913837313652, + -0.018842484802007675, + 0.03678533062338829, + -0.0348527655005455, + -0.06693997234106064, + -0.0202585868537426, + 0.019775446504354477, + -0.015918651595711708, + 0.07623626291751862, + 0.0011766140814870596, + -0.019658826291561127, + -0.00826337095350027, + 0.02663937583565712, + -0.03801817074418068, + 0.01809278316795826, + -0.06547388434410095, + -0.06943897157907486, + -0.010820684023201466, + -0.012170146219432354, + 0.011528735049068928, + -0.10829014331102371, + 0.05251238867640495, + -0.014619169756770134, + -0.012919846922159195, + 0.010687404312193394, + 0.05227914825081825, + -0.00038213926018215716, + 0.03268696367740631, + 0.01047915406525135, + 0.00492720166221261, + -5.346175021259114e-05, + -0.024190351366996765, + -0.03451956436038017, + -0.04181665554642677, + 0.01673499308526516, + 0.04454889893531799, + -0.013569587841629982, + 0.0269725751131773, + -0.00036417768569663167, + -0.028855158016085625, + -0.02880517765879631, + -0.01845930516719818, + -0.021208208054304123, + 0.0007319997530430555, + 0.04155009612441063, + -0.022974170744419098, + 0.04408241808414459, + 0.01433594897389412, + 0.004046302754431963, + -0.0725710541009903, + -0.01809278316795826, + 0.03711852803826332, + -0.019642166793346405, + -0.004012982826679945, + -0.024073731154203415, + -0.0640411227941513, + 0.012753247283399105, + -0.011795295402407646, + 0.031487442553043365, + -0.015218930318951607, + -0.02768895775079727, + -0.009529532864689827, + -0.04111693426966667, + -0.027055876329541206, + 0.03027126006782055, + -0.002971731359139085, + 0.0211915485560894, + -0.004973016679286957, + 0.018126104027032852, + -0.019159024581313133, + 0.0031591567676514387, + 0.06554052978754044, + 0.009987683035433292, + -0.006280828267335892, + 0.000574770790990442, + -0.006634853780269623, + -0.018592584878206253, + 0.03915105387568474, + -0.01200354564934969, + 0.004004652611911297, + 0.0032653643283993006, + 0.02857193723320961, + -0.05764367803931236, + -0.006193363107740879, + 0.013019807636737823, + 0.03685196861624718, + 0.011320484802126884, + -0.024906734004616737, + -0.044215697795152664, + -0.0034277995582669973, + 0.018625903874635696, + 0.02525659278035164, + -0.018242724239826202, + -0.037718288600444794, + 0.07117161154747009, + 0.012569986283779144, + 0.036818649619817734, + 0.027122516185045242, + -0.032636985182762146, + 0.019625505432486534, + -0.03621888905763626, + 0.0412168949842453, + -0.017842883244156837, + -0.0003529842069838196, + -0.06930569559335709, + -0.043449338525533676, + -0.001146417809650302, + -0.02653941512107849, + 0.06267500668764114, + -0.014027738943696022, + 0.014094378799200058, + -0.004506535828113556, + -0.01262829639017582, + 0.05950959771871567, + 0.03765165060758591, + -0.046947941184043884, + -0.018592584878206253, + -0.031137581914663315, + 0.06064248085021973, + 0.05967620015144348, + -0.01286153681576252, + -0.02324073016643524, + -0.03302016481757164, + 0.031220881268382072, + -0.01752634346485138, + 0.01924232579767704, + -0.0025927159003913403, + 0.03715185075998306, + -0.03918437287211418, + -0.0029342463240027428, + 0.03925101086497307, + 0.07756906002759933, + -0.059243038296699524, + 0.009687802754342556, + 0.0021762154065072536, + 0.004856396466493607, + 0.026122914627194405, + 0.013627897948026657, + 0.00221994798630476, + 0.015685411170125008, + 0.032270461320877075, + -0.0013598742661997676, + 0.06024264171719551, + 0.0037630824372172356, + -0.011153885163366795, + -0.043782539665699005, + -0.026439454406499863, + 0.004264965653419495, + -0.03598564863204956, + -0.020541807636618614, + 0.03396978601813316, + 0.06637352705001831, + -0.009704463183879852, + -0.09876061230897903, + 0.0060225981287658215, + 0.015143959783017635, + -0.03541920706629753, + -0.02207452990114689, + -0.020558467134833336, + -0.04201657697558403, + -0.04834738373756409, + -0.010154283605515957, + -0.038984451442956924, + 0.034886088222265244, + 0.007192964665591717, + 0.023157430812716484, + -0.037951529026031494, + -0.03731844946742058, + -0.0423830971121788, + -0.036818649619817734, + -0.03128752112388611, + -0.010962294414639473, + 0.0015462583396583796, + 0.030221279710531235, + -0.01922566629946232, + 0.0815008282661438, + -0.02015862613916397, + 0.0013963180826976895, + -0.0003011819499079138, + 0.03985077142715454, + -0.048680584877729416, + -0.029071738943457603, + 0.07230449467897415, + 0.046847984194755554, + -0.01606026105582714, + -0.017676282674074173, + -0.013511277735233307, + -0.018725864589214325, + 0.027005895972251892, + 0.0692390501499176, + 0.018492624163627625, + -0.03708520904183388, + -0.05654411390423775, + 0.03175400197505951, + 0.04011733457446098, + 0.0016004033386707306, + -0.018925786018371582, + 0.07523666322231293, + 0.041716694831848145, + 0.02279091067612171, + 0.01694324240088463, + 0.009571182541549206, + 0.029888080433011055, + 0.03165404126048088, + -0.005722717847675085, + -0.03538588806986809, + 0.03598564863204956, + 0.004298285581171513, + -0.01844264380633831, + -0.009662812575697899, + -0.04278293624520302, + 0.013902788050472736, + 0.012020206078886986, + -0.027738936245441437, + -0.020308567211031914, + 0.03292020410299301, + -0.005876822862774134, + 0.07523666322231293, + 0.024057071655988693, + 0.0398174524307251, + -0.030104659497737885, + -0.04841402545571327, + -0.06437432765960693, + 0.05121290683746338, + -0.04591502249240875, + -0.04608162119984627, + 0.012220126576721668, + 0.005706057418137789, + 0.020441846922039986, + 0.006718154065310955, + 0.024906734004616737, + -0.004048385191708803, + 0.005193762015551329, + -0.007342904806137085, + 0.025523154065012932, + -0.006555718835443258, + 0.011678675189614296, + -0.0070596844889223576, + -0.002817626344040036, + 0.016443442553281784, + -0.01855926401913166, + 0.029354959726333618, + -0.025456514209508896, + 0.006135053001344204, + 0.0019388101063668728, + -0.020691746845841408, + 0.04908042401075363, + -0.003102929098531604, + -0.004427400883287191, + -0.00592263787984848, + 0.003823474980890751, + 0.02105826884508133, + 0.007580310106277466, + 0.02412371151149273, + -0.011512075550854206, + 0.023257391527295113, + -0.03052115999162197, + -0.00132967799436301, + 0.004743941128253937, + -0.006884754169732332, + -0.019642166793346405, + -0.03661872819066048, + -0.007138819433748722, + -0.019275644794106483, + -0.0027634811121970415, + 0.012953166849911213, + -0.010462493635714054, + 0.02027524635195732, + -0.013194737955927849, + 0.014427579008042812, + -0.013811158016324043, + 0.01970880664885044, + -0.036485448479652405, + 0.005097966641187668, + -0.03233710303902626, + -0.01720980368554592, + -0.007043024525046349, + -0.007192964665591717, + -0.008117595687508583, + -0.04481545835733414, + -0.011478755623102188, + -0.01592698134481907, + 0.03315344452857971, + 0.02778891660273075, + 0.025123313069343567, + 0.03465284779667854, + 0.029105057939887047, + -0.022057868540287018, + -0.027355756610631943, + 0.036252208054065704, + 0.0015306395944207907, + 0.0038338876329362392, + -0.016585052013397217, + 0.022807570174336433, + 0.0014733707066625357, + 0.03097098134458065, + -0.010620764456689358, + 0.014744119718670845, + 0.007197129540145397, + 0.01639346219599247, + -0.013361337594687939, + 0.014252648688852787, + -0.006318313535302877, + -0.055511195212602615, + -0.020891668274998665, + 0.016218531876802444, + 0.007051354274153709, + 0.017676282674074173, + 0.0013525855029001832, + 0.008396651595830917, + -0.05114626884460449, + 0.011487085372209549, + 0.0105957742780447, + 0.014169348403811455, + -0.031820643693208694, + 0.04508202150464058, + 0.04748106375336647, + -0.04178333654999733, + -0.02162470854818821, + 0.0029467414133250713, + 0.023973772302269936, + 0.0026406135875731707, + 0.026955915614962578, + -0.02104160748422146, + -0.011237184517085552, + -0.008221721276640892, + -0.031604062765836716, + 0.002053347649052739, + -0.03988409414887428, + -0.027022555470466614, + -0.00740121491253376, + 0.0041150255128741264, + 0.006888919044286013, + -0.022374410182237625, + -0.04938030615448952, + -0.0009553481359034777, + -0.013911118730902672, + -0.025206614285707474, + -0.017001552507281303, + 0.0012869867496192455, + 0.0003498604637570679, + 0.0070596844889223576, + 0.057310476899147034, + 0.000250030483584851, + 0.04914706572890282, + -0.02195790968835354, + 0.022457709535956383, + 0.01572706177830696, + 0.04521530121564865, + -0.0013744517927989364, + -0.06624025106430054, + 0.024606851860880852, + 0.026822635903954506, + -0.015860341489315033, + -0.0008626767667010427, + -0.028388677164912224, + -0.00864655151963234, + 0.02082502841949463, + 0.013244717381894588, + 0.017509683966636658, + -0.015160620212554932, + 0.04638150334358215, + -0.010928974486887455, + 0.02537321299314499, + -0.016210202127695084, + 0.006193363107740879, + -0.034986045211553574, + -0.029288319870829582, + 0.03451956436038017, + -0.021108247339725494, + 0.01663503237068653, + -0.03878453001379967, + -0.03708520904183388, + -0.012878197245299816, + 0.07103833556175232, + -0.003436129540205002, + -0.019542206078767776, + -0.003623554715886712, + 0.0005242700572125614, + 0.003594399895519018, + 0.014810759574174881, + 0.03373654559254646, + 0.02105826884508133, + -0.01865922473371029, + -0.03338668495416641, + 0.056410834193229675, + -0.0025135809555649757, + 0.031054280698299408, + -0.04394913837313652, + 0.03312012553215027, + 0.0033549119252711535, + -0.004631486255675554, + 0.002161637879908085, + -0.04558182135224342, + -0.004373255651444197, + -0.05714387446641922, + -0.022624310106039047, + -0.010087643750011921, + -0.0014910720055922866, + 0.008388320915400982, + -0.0077927252277731895, + 0.01286153681576252, + 0.05387851223349571, + 0.018959105014801025, + 0.009721122682094574, + 0.0035298422444611788, + -0.0004323796310927719, + 0.023507291451096535, + 0.02425699308514595, + 0.024090392515063286, + 0.04511534050107002, + 0.007463689893484116, + 0.028272056952118874, + 0.009304622188210487, + 0.033170104026794434, + -0.04118357598781586, + 0.0027655637823045254, + 0.014502549543976784, + 0.003623554715886712, + -0.0016909922705963254, + 0.011037264950573444, + 0.01087066438049078, + -0.022141169756650925, + -0.039550893008708954, + 0.008613231591880322, + -0.04544854164123535, + 0.02240772917866707, + -0.006368293426930904, + 0.027139175683259964, + -0.018959105014801025, + -0.059709519147872925, + -0.0028405338525772095, + -0.003271611873060465, + 0.008313351310789585, + -0.028605258092284203, + 0.005489477422088385, + -0.04484878107905388, + -0.04078373312950134, + 0.015393860638141632, + -0.006505738478153944, + 0.02164136804640293, + 0.020875006914138794, + 0.004943861626088619, + 0.037751611322164536, + 0.037851572036743164, + -0.02972147986292839, + -0.031587403267621994, + -0.022607650607824326, + 0.019558865576982498, + 0.04384917765855789, + 0.04318277910351753, + -0.03312012553215027, + 0.0023178255651146173, + 0.020625106990337372, + 0.0020221101585775614, + 0.010379194281995296, + 0.009079712443053722, + 0.04041721299290657, + -0.07696930319070816, + 0.034219685941934586, + -0.002940493868663907, + -0.022857550531625748, + -0.012061855755746365, + 0.03052115999162197, + 0.035252608358860016, + -0.002957153832539916, + 0.022957511246204376, + 0.024290312081575394, + -0.03658540919423103, + -0.010312553495168686, + -0.04011733457446098, + 0.01912570558488369, + -0.016768312081694603, + 0.003479862120002508, + 0.030454520136117935, + 0.015127300284802914, + -0.02948823943734169, + -0.040583815425634384, + -0.04838070273399353, + -0.05261234939098358, + -0.028738537803292274, + -0.01652674190700054, + -0.0012901105219498277, + 0.030321240425109863, + 0.014435908757150173, + -0.03768496960401535, + -0.016076920554041862, + 0.03371988609433174, + -0.017018212005496025, + 0.006734814029186964, + -0.00973778311163187, + -0.022707609459757805, + -0.007505340036004782, + 0.004710621200501919, + 0.006826444063335657, + -0.04494873806834221, + -0.011145554482936859, + 0.03605228662490845, + -0.006580708548426628, + -0.041283536702394485, + -0.04278293624520302, + -0.04614826291799545, + -0.028038816526532173, + -0.03518596664071083, + 0.058443356305360794, + 0.008163411170244217, + -0.0018201074562966824, + -0.024523552507162094, + -0.009329612366855145, + -0.016476761549711227, + 0.005285392049700022, + 0.02230777032673359, + -0.051046308130025864, + -0.030654441565275192, + 0.014019408263266087, + -0.007188799791038036, + -0.01218680664896965, + -0.04431565850973129, + 0.06090904027223587, + -0.0060059381648898125, + -0.03265364468097687, + -0.025523154065012932, + -0.012919846922159195, + 0.04234977811574936, + -0.06697329133749008, + -0.04814746230840683, + 0.03861793130636215, + -0.04528193920850754, + 0.003588152350857854, + 0.011970225721597672, + 0.020541807636618614, + 0.04611494019627571, + 0.028405338525772095, + 0.025306573137640953, + 0.026506096124649048, + 0.006126723252236843, + -0.003438211977481842, + -0.03725180774927139, + -0.03918437287211418, + -0.00962116289883852, + 0.02277425117790699, + -0.015593781135976315, + 0.05507803335785866, + 0.012828216888010502, + -0.026472775265574455, + -0.002850946271792054, + 0.017709603533148766, + -0.007267934735864401, + 0.02855527773499489, + -0.02608959563076496, + 0.030921000987291336, + -0.029438259080052376, + 0.04728114232420921, + 0.018992425873875618, + -0.012544997036457062, + -0.0016378883738070726, + -0.03175400197505951, + 0.011911915615200996, + -0.009013071656227112, + -0.017909523099660873, + -0.024390272796154022, + 0.013652888126671314, + -0.03585236892104149, + -0.016660021618008614, + -0.007251274771988392, + 0.04814746230840683, + 0.025906333699822426, + -0.00973778311163187, + -0.033769864588975906, + 0.0012599141336977482, + -0.006818113848567009, + 0.04481545835733414, + 0.03145412355661392, + -0.041050296276807785, + 0.011520405299961567, + -0.033686563372612, + -0.00333200441673398, + 0.023274051025509834, + -0.033536624163389206, + 0.01719314232468605, + -0.0030279590282589197, + 0.018042804673314095, + 0.007705260068178177, + -0.01902574487030506, + 0.010154283605515957, + -0.024390272796154022, + -0.023757191374897957, + 0.022174488753080368, + 0.010112633928656578, + 0.03905109316110611, + 0.011370465159416199, + -0.024190351366996765, + -0.014819089323282242, + 0.014885730110108852, + 0.03118756227195263, + 0.03778493031859398, + -0.0350860059261322, + -0.005385352298617363, + -0.037718288600444794, + 0.0005279144388623536, + -0.031704023480415344, + 0.0023386506363749504, + -0.007880190387368202, + -0.02254101075232029, + 0.012561656534671783, + -0.02937161922454834, + -0.03651876747608185, + 0.0029155039228498936, + 0.00045919185504317284, + -0.002313660690560937, + 0.008554921485483646, + 0.03961753100156784, + -0.054578233510255814, + 0.00042404962005093694, + 0.029654840007424355, + 0.03845133259892464, + -0.01992538571357727, + -0.012195136398077011, + -0.020175287500023842, + -0.017742924392223358, + 0.12041863799095154, + 0.03518596664071083, + 0.0008616355480626225, + 0.029971379786729813, + -0.016435112804174423, + -0.009079712443053722, + 0.005735212471336126, + 0.029538219794631004, + 0.02060844749212265, + -0.01195356622338295, + -0.031470783054828644, + -0.002457353286445141, + -0.04884718358516693, + 0.009954363107681274, + 0.00023545297153759748, + -0.021774649620056152, + -0.032370422035455704, + 0.006010103039443493, + -0.034886088222265244, + -0.013477957807481289, + -0.03611892834305763, + 0.029188359156250954, + -0.01343630813062191, + -0.008896451443433762, + -0.011053924448788166, + -0.0678396075963974, + 0.02708919532597065, + 0.026689356192946434, + -0.03495272621512413, + -0.022807570174336433, + -0.08389987051486969, + -0.01531889010220766, + -0.020008686929941177, + -0.024856753647327423, + 0.04648146033287048, + -0.016551731154322624, + -0.010695734061300755, + -0.03290354460477829, + 0.01705986261367798, + 0.027605656534433365, + 0.015877000987529755, + -0.00898808240890503, + 0.02892179787158966, + -0.01087066438049078, + 0.03908441215753555, + 0.05341203138232231, + -0.0021491427905857563, + 0.009946033358573914, + -0.04254969581961632, + -0.049213703721761703, + 0.0025135809555649757, + -0.014510879293084145, + 0.01685161329805851, + 0.001702446024864912, + 0.009687802754342556, + -0.018742524087429047, + 0.014885730110108852, + 0.039117731153964996, + -0.014777439646422863, + 0.055044714361429214, + -0.00580185279250145, + -0.01982542686164379, + 0.007992645725607872, + -0.013161417096853256, + -0.01675165258347988, + -0.03400310501456261, + 0.02060844749212265, + 0.05781027674674988, + -0.009471222758293152, + 0.02357393130660057, + 0.07596970349550247, + 0.033536624163389206, + -0.032053884118795395, + 0.020175287500023842, + -0.04561514034867287, + -0.020641768351197243, + -0.03901777043938637, + 0.07230449467897415, + 0.023090790957212448, + -0.07430370151996613, + -0.01553547102957964, + -0.03908441215753555, + 0.04588169977068901, + -0.002494838321581483, + 0.019742125645279884, + 0.05327875167131424, + -0.006080908235162497, + -0.012803226709365845, + 0.02310745045542717, + 0.004585671238601208, + 0.004273295868188143, + 0.029521558433771133, + 0.03358660638332367, + -0.025873014703392982, + -0.015302230603992939, + -0.022707609459757805, + 0.0068472689017653465, ], ) diff --git a/tests/snapshots/test_api_routes/test_advanced_chat_flow/advanced_chat_flow_response.json b/tests/snapshots/test_api_routes/test_advanced_chat_flow/advanced_chat_flow_response.json index 612be773..417e3cf7 100644 --- a/tests/snapshots/test_api_routes/test_advanced_chat_flow/advanced_chat_flow_response.json +++ b/tests/snapshots/test_api_routes/test_advanced_chat_flow/advanced_chat_flow_response.json @@ -5,13 +5,15 @@ }, "context": { "data_points": { - "1": { - "id": 1, - "type": "Footwear", - "brand": "Daybird", - "name": "Wanderer Black Hiking Boots", - "description": "Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long.", - "price": 109.99 + "XDqSIoVRrG4JoF79HTT1Zw": { + "id": "XDqSIoVRrG4JoF79HTT1Zw", + "name": "Balvanera", + "cuisine": "Argentine, Wine Bars, Steakhouses", + "rating": 4.5, + "price_level": 2, + "review_count": 132, + "description": "Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse.", + "menu_summary": "The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines." } }, "thoughts": [ @@ -19,40 +21,40 @@ "title": "Prompt to generate search arguments", "description": [ { - "content": "Your job is to find search results based off the user's question and past messages.\nYou have access to only these tools:\n1. **search_database**: This tool allows you to search a table for items based on a query.\n You can pass in a search query and optional filters.\nOnce you get the search results, you're done.\n" + "content": "Your job is to find search results based off the user's question and past messages.\nYou have access to only these tools:\n1. **search_database**: This tool allows you to search a table for restaurants based on a query.\n You can pass in a search query and optional filters.\nOnce you get the search results, you're done." }, { "role": "user", - "content": "good options for climbing gear that can be used outside?" + "content": "good options for ethiopian restaurants?" }, { "id": "madeup", "call_id": "call_abc123", "name": "search_database", - "arguments": "{\"search_query\":\"climbing gear outside\"}", + "arguments": "{\"search_query\":\"ethiopian\"}", "type": "function_call" }, { "id": "madeupoutput", "call_id": "call_abc123", - "output": "Search results for climbing gear that can be used outside: ...", + "output": "Search results for ethiopian: ...", "type": "function_call_output" }, { "role": "user", - "content": "are there any shoes less than $50?" + "content": "are there any inexpensive japanese restaurants?" }, { "id": "madeup", "call_id": "call_abc456", "name": "search_database", - "arguments": "{\"search_query\":\"shoes\",\"price_filter\":{\"comparison_operator\":\"<\",\"value\":50}}", + "arguments": "{\"search_query\":\"japanese\",\"price_level_filter\":{\"comparison_operator\":\"<\",\"value\":3}}", "type": "function_call" }, { "id": "madeupoutput", "call_id": "call_abc456", - "output": "Search results for shoes cheaper than 50: ...", + "output": "Search results for japanese: ...", "type": "function_call_output" }, { @@ -79,12 +81,14 @@ "title": "Search results", "description": [ { - "id": 1, - "type": "Footwear", - "brand": "Daybird", - "name": "Wanderer Black Hiking Boots", - "description": "Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long.", - "price": 109.99 + "id": "XDqSIoVRrG4JoF79HTT1Zw", + "name": "Balvanera", + "cuisine": "Argentine, Wine Bars, Steakhouses", + "rating": 4.5, + "price_level": 2, + "review_count": 132, + "description": "Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse.", + "menu_summary": "The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines." } ], "props": {} @@ -93,10 +97,10 @@ "title": "Prompt to generate answer", "description": [ { - "content": "Assistant helps customers with questions about products.\nRespond as if you are a salesperson helping a customer in a store. Do NOT respond with tables.\nAnswer ONLY with the product details listed in the products.\nIf there isn't enough information below, say you don't know.\nDo not generate answers that don't use the sources below.\nEach product has an ID in brackets followed by colon and the product details.\nAlways include the product ID for each product you use in the response.\nUse square brackets to reference the source, for example [52].\nDon't combine citations, list each product separately, for example [27][51]." + "content": "Assistant helps Pycon attendees with questions about restaurants.\nRespond as if you are a conference volunteer. Do NOT respond with tables.\nAnswer ONLY with the restaurant details listed in the sources.\nIf there isn't enough information below, say you don't know.\nDo not generate answers that don't use the sources below.\nEach restaurant has an ID in brackets followed by colon and the restaurant details.\nAlways include the restaurant ID for each restaurant you reference in the response.\nUse square brackets to reference the restaurant, for example [52].\nDon't combine references, cite each restaurant separately, for example [27][51].\n" }, { - "content": "What is the capital of France?Sources:\n[1]:Name:Wanderer Black Hiking Boots Description:Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long. Price:109.99 Brand:Daybird Type:Footwear", + "content": "What is the capital of France?Sources:\n[XDqSIoVRrG4JoF79HTT1Zw]:Name:Balvanera Description:Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse. Cuisine:Argentine, Wine Bars, Steakhouses Rating:4.5 Price Level:2 Review Count:132 Menu Summary:The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines.", "role": "user" } ], diff --git a/tests/snapshots/test_api_routes/test_advanced_chat_streaming_flow/advanced_chat_streaming_flow_response.jsonlines b/tests/snapshots/test_api_routes/test_advanced_chat_streaming_flow/advanced_chat_streaming_flow_response.jsonlines index d29b85c4..b493acbc 100644 --- a/tests/snapshots/test_api_routes/test_advanced_chat_streaming_flow/advanced_chat_streaming_flow_response.jsonlines +++ b/tests/snapshots/test_api_routes/test_advanced_chat_streaming_flow/advanced_chat_streaming_flow_response.jsonlines @@ -1,2 +1,2 @@ -{"delta":null,"context":{"data_points":{"1":{"id":1,"type":"Footwear","brand":"Daybird","name":"Wanderer Black Hiking Boots","description":"Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long.","price":109.99}},"thoughts":[{"title":"Prompt to generate search arguments","description":[{"content":"Your job is to find search results based off the user's question and past messages.\nYou have access to only these tools:\n1. **search_database**: This tool allows you to search a table for items based on a query.\n You can pass in a search query and optional filters.\nOnce you get the search results, you're done.\n"},{"role":"user","content":"good options for climbing gear that can be used outside?"},{"id":"madeup","call_id":"call_abc123","name":"search_database","arguments":"{\"search_query\":\"climbing gear outside\"}","type":"function_call"},{"id":"madeupoutput","call_id":"call_abc123","output":"Search results for climbing gear that can be used outside: ...","type":"function_call_output"},{"role":"user","content":"are there any shoes less than $50?"},{"id":"madeup","call_id":"call_abc456","name":"search_database","arguments":"{\"search_query\":\"shoes\",\"price_filter\":{\"comparison_operator\":\"<\",\"value\":50}}","type":"function_call"},{"id":"madeupoutput","call_id":"call_abc456","output":"Search results for shoes cheaper than 50: ...","type":"function_call_output"},{"role":"user","content":"Find search results for user query: What is the capital of France?"}],"props":{"model":"gpt-4o-mini","deployment":"gpt-4o-mini"}},{"title":"Search using generated search arguments","description":"climbing gear outside","props":{"top":1,"vector_search":true,"text_search":true,"filters":[]}},{"title":"Search results","description":[{"id":1,"type":"Footwear","brand":"Daybird","name":"Wanderer Black Hiking Boots","description":"Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long.","price":109.99}],"props":{}},{"title":"Prompt to generate answer","description":[{"content":"Assistant helps customers with questions about products.\nRespond as if you are a salesperson helping a customer in a store. Do NOT respond with tables.\nAnswer ONLY with the product details listed in the products.\nIf there isn't enough information below, say you don't know.\nDo not generate answers that don't use the sources below.\nEach product has an ID in brackets followed by colon and the product details.\nAlways include the product ID for each product you use in the response.\nUse square brackets to reference the source, for example [52].\nDon't combine citations, list each product separately, for example [27][51]."},{"content":"What is the capital of France?Sources:\n[1]:Name:Wanderer Black Hiking Boots Description:Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long. Price:109.99 Brand:Daybird Type:Footwear","role":"user"}],"props":{"model":"gpt-4o-mini","deployment":"gpt-4o-mini"}}],"followup_questions":null},"sessionState":null} +{"delta":null,"context":{"data_points":{"XDqSIoVRrG4JoF79HTT1Zw":{"id":"XDqSIoVRrG4JoF79HTT1Zw","name":"Balvanera","cuisine":"Argentine, Wine Bars, Steakhouses","rating":4.5,"price_level":2,"review_count":132,"description":"Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse.","menu_summary":"The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines."}},"thoughts":[{"title":"Prompt to generate search arguments","description":[{"content":"Your job is to find search results based off the user's question and past messages.\nYou have access to only these tools:\n1. **search_database**: This tool allows you to search a table for restaurants based on a query.\n You can pass in a search query and optional filters.\nOnce you get the search results, you're done."},{"role":"user","content":"good options for ethiopian restaurants?"},{"id":"madeup","call_id":"call_abc123","name":"search_database","arguments":"{\"search_query\":\"ethiopian\"}","type":"function_call"},{"id":"madeupoutput","call_id":"call_abc123","output":"Search results for ethiopian: ...","type":"function_call_output"},{"role":"user","content":"are there any inexpensive japanese restaurants?"},{"id":"madeup","call_id":"call_abc456","name":"search_database","arguments":"{\"search_query\":\"japanese\",\"price_level_filter\":{\"comparison_operator\":\"<\",\"value\":3}}","type":"function_call"},{"id":"madeupoutput","call_id":"call_abc456","output":"Search results for japanese: ...","type":"function_call_output"},{"role":"user","content":"Find search results for user query: What is the capital of France?"}],"props":{"model":"gpt-4o-mini","deployment":"gpt-4o-mini"}},{"title":"Search using generated search arguments","description":"climbing gear outside","props":{"top":1,"vector_search":true,"text_search":true,"filters":[]}},{"title":"Search results","description":[{"id":"XDqSIoVRrG4JoF79HTT1Zw","name":"Balvanera","cuisine":"Argentine, Wine Bars, Steakhouses","rating":4.5,"price_level":2,"review_count":132,"description":"Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse.","menu_summary":"The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines."}],"props":{}},{"title":"Prompt to generate answer","description":[{"content":"Assistant helps Pycon attendees with questions about restaurants.\nRespond as if you are a conference volunteer. Do NOT respond with tables.\nAnswer ONLY with the restaurant details listed in the sources.\nIf there isn't enough information below, say you don't know.\nDo not generate answers that don't use the sources below.\nEach restaurant has an ID in brackets followed by colon and the restaurant details.\nAlways include the restaurant ID for each restaurant you reference in the response.\nUse square brackets to reference the restaurant, for example [52].\nDon't combine references, cite each restaurant separately, for example [27][51].\n"},{"content":"What is the capital of France?Sources:\n[XDqSIoVRrG4JoF79HTT1Zw]:Name:Balvanera Description:Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse. Cuisine:Argentine, Wine Bars, Steakhouses Rating:4.5 Price Level:2 Review Count:132 Menu Summary:The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines.","role":"user"}],"props":{"model":"gpt-4o-mini","deployment":"gpt-4o-mini"}}],"followup_questions":null},"sessionState":null} {"delta":{"content":"The capital of France is Paris. [Benefit_Options-2.pdf].","role":"assistant"},"context":null,"sessionState":null} diff --git a/tests/snapshots/test_api_routes/test_simple_chat_flow/simple_chat_flow_response.json b/tests/snapshots/test_api_routes/test_simple_chat_flow/simple_chat_flow_response.json index e311917b..d4b70a0f 100644 --- a/tests/snapshots/test_api_routes/test_simple_chat_flow/simple_chat_flow_response.json +++ b/tests/snapshots/test_api_routes/test_simple_chat_flow/simple_chat_flow_response.json @@ -5,13 +5,15 @@ }, "context": { "data_points": { - "1": { - "id": 1, - "type": "Footwear", - "brand": "Daybird", - "name": "Wanderer Black Hiking Boots", - "description": "Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long.", - "price": 109.99 + "XDqSIoVRrG4JoF79HTT1Zw": { + "id": "XDqSIoVRrG4JoF79HTT1Zw", + "name": "Balvanera", + "cuisine": "Argentine, Wine Bars, Steakhouses", + "rating": 4.5, + "price_level": 2, + "review_count": 132, + "description": "Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse.", + "menu_summary": "The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines." } }, "thoughts": [ @@ -28,12 +30,14 @@ "title": "Search results", "description": [ { - "id": 1, - "type": "Footwear", - "brand": "Daybird", - "name": "Wanderer Black Hiking Boots", - "description": "Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long.", - "price": 109.99 + "id": "XDqSIoVRrG4JoF79HTT1Zw", + "name": "Balvanera", + "cuisine": "Argentine, Wine Bars, Steakhouses", + "rating": 4.5, + "price_level": 2, + "review_count": 132, + "description": "Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse.", + "menu_summary": "The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines." } ], "props": {} @@ -42,10 +46,10 @@ "title": "Prompt to generate answer", "description": [ { - "content": "Assistant helps customers with questions about products.\nRespond as if you are a salesperson helping a customer in a store. Do NOT respond with tables.\nAnswer ONLY with the product details listed in the products.\nIf there isn't enough information below, say you don't know.\nDo not generate answers that don't use the sources below.\nEach product has an ID in brackets followed by colon and the product details.\nAlways include the product ID for each product you use in the response.\nUse square brackets to reference the source, for example [52].\nDon't combine citations, list each product separately, for example [27][51]." + "content": "Assistant helps Pycon attendees with questions about restaurants.\nRespond as if you are a conference volunteer. Do NOT respond with tables.\nAnswer ONLY with the restaurant details listed in the sources.\nIf there isn't enough information below, say you don't know.\nDo not generate answers that don't use the sources below.\nEach restaurant has an ID in brackets followed by colon and the restaurant details.\nAlways include the restaurant ID for each restaurant you reference in the response.\nUse square brackets to reference the restaurant, for example [52].\nDon't combine references, cite each restaurant separately, for example [27][51].\n" }, { - "content": "What is the capital of France?Sources:\n[1]:Name:Wanderer Black Hiking Boots Description:Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long. Price:109.99 Brand:Daybird Type:Footwear", + "content": "What is the capital of France?Sources:\n[XDqSIoVRrG4JoF79HTT1Zw]:Name:Balvanera Description:Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse. Cuisine:Argentine, Wine Bars, Steakhouses Rating:4.5 Price Level:2 Review Count:132 Menu Summary:The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines.", "role": "user" } ], diff --git a/tests/snapshots/test_api_routes/test_simple_chat_flow_message_history/simple_chat_flow_message_history_response.json b/tests/snapshots/test_api_routes/test_simple_chat_flow_message_history/simple_chat_flow_message_history_response.json index d0456cd7..4271a35f 100644 --- a/tests/snapshots/test_api_routes/test_simple_chat_flow_message_history/simple_chat_flow_message_history_response.json +++ b/tests/snapshots/test_api_routes/test_simple_chat_flow_message_history/simple_chat_flow_message_history_response.json @@ -5,13 +5,15 @@ }, "context": { "data_points": { - "1": { - "id": 1, - "type": "Footwear", - "brand": "Daybird", - "name": "Wanderer Black Hiking Boots", - "description": "Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long.", - "price": 109.99 + "XDqSIoVRrG4JoF79HTT1Zw": { + "id": "XDqSIoVRrG4JoF79HTT1Zw", + "name": "Balvanera", + "cuisine": "Argentine, Wine Bars, Steakhouses", + "rating": 4.5, + "price_level": 2, + "review_count": 132, + "description": "Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse.", + "menu_summary": "The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines." } }, "thoughts": [ @@ -28,12 +30,14 @@ "title": "Search results", "description": [ { - "id": 1, - "type": "Footwear", - "brand": "Daybird", - "name": "Wanderer Black Hiking Boots", - "description": "Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long.", - "price": 109.99 + "id": "XDqSIoVRrG4JoF79HTT1Zw", + "name": "Balvanera", + "cuisine": "Argentine, Wine Bars, Steakhouses", + "rating": 4.5, + "price_level": 2, + "review_count": 132, + "description": "Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse.", + "menu_summary": "The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines." } ], "props": {} @@ -42,7 +46,7 @@ "title": "Prompt to generate answer", "description": [ { - "content": "Assistant helps customers with questions about products.\nRespond as if you are a salesperson helping a customer in a store. Do NOT respond with tables.\nAnswer ONLY with the product details listed in the products.\nIf there isn't enough information below, say you don't know.\nDo not generate answers that don't use the sources below.\nEach product has an ID in brackets followed by colon and the product details.\nAlways include the product ID for each product you use in the response.\nUse square brackets to reference the source, for example [52].\nDon't combine citations, list each product separately, for example [27][51]." + "content": "Assistant helps Pycon attendees with questions about restaurants.\nRespond as if you are a conference volunteer. Do NOT respond with tables.\nAnswer ONLY with the restaurant details listed in the sources.\nIf there isn't enough information below, say you don't know.\nDo not generate answers that don't use the sources below.\nEach restaurant has an ID in brackets followed by colon and the restaurant details.\nAlways include the restaurant ID for each restaurant you reference in the response.\nUse square brackets to reference the restaurant, for example [52].\nDon't combine references, cite each restaurant separately, for example [27][51].\n" }, { "content": "What is the capital of France?", @@ -53,7 +57,7 @@ "role": "assistant" }, { - "content": "What is the capital of France?Sources:\n[1]:Name:Wanderer Black Hiking Boots Description:Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long. Price:109.99 Brand:Daybird Type:Footwear", + "content": "What is the capital of France?Sources:\n[XDqSIoVRrG4JoF79HTT1Zw]:Name:Balvanera Description:Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse. Cuisine:Argentine, Wine Bars, Steakhouses Rating:4.5 Price Level:2 Review Count:132 Menu Summary:The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines.", "role": "user" } ], diff --git a/tests/snapshots/test_api_routes/test_simple_chat_streaming_flow/simple_chat_streaming_flow_response.jsonlines b/tests/snapshots/test_api_routes/test_simple_chat_streaming_flow/simple_chat_streaming_flow_response.jsonlines index 65d3ae5b..df1302e4 100644 --- a/tests/snapshots/test_api_routes/test_simple_chat_streaming_flow/simple_chat_streaming_flow_response.jsonlines +++ b/tests/snapshots/test_api_routes/test_simple_chat_streaming_flow/simple_chat_streaming_flow_response.jsonlines @@ -1,2 +1,2 @@ -{"delta":null,"context":{"data_points":{"1":{"id":1,"type":"Footwear","brand":"Daybird","name":"Wanderer Black Hiking Boots","description":"Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long.","price":109.99}},"thoughts":[{"title":"Search query for database","description":"What is the capital of France?","props":{"top":1,"vector_search":true,"text_search":true}},{"title":"Search results","description":[{"id":1,"type":"Footwear","brand":"Daybird","name":"Wanderer Black Hiking Boots","description":"Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long.","price":109.99}],"props":{}},{"title":"Prompt to generate answer","description":[{"content":"Assistant helps customers with questions about products.\nRespond as if you are a salesperson helping a customer in a store. Do NOT respond with tables.\nAnswer ONLY with the product details listed in the products.\nIf there isn't enough information below, say you don't know.\nDo not generate answers that don't use the sources below.\nEach product has an ID in brackets followed by colon and the product details.\nAlways include the product ID for each product you use in the response.\nUse square brackets to reference the source, for example [52].\nDon't combine citations, list each product separately, for example [27][51]."},{"content":"What is the capital of France?Sources:\n[1]:Name:Wanderer Black Hiking Boots Description:Daybird's Wanderer Hiking Boots in sleek black are perfect for all your outdoor adventures. These boots are made with a waterproof leather upper and a durable rubber sole for superior traction. With their cushioned insole and padded collar, these boots will keep you comfortable all day long. Price:109.99 Brand:Daybird Type:Footwear","role":"user"}],"props":{"model":"gpt-4o-mini","deployment":"gpt-4o-mini"}}],"followup_questions":null},"sessionState":null} +{"delta":null,"context":{"data_points":{"XDqSIoVRrG4JoF79HTT1Zw":{"id":"XDqSIoVRrG4JoF79HTT1Zw","name":"Balvanera","cuisine":"Argentine, Wine Bars, Steakhouses","rating":4.5,"price_level":2,"review_count":132,"description":"Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse.","menu_summary":"The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines."}},"thoughts":[{"title":"Search query for database","description":"What is the capital of France?","props":{"top":1,"vector_search":true,"text_search":true}},{"title":"Search results","description":[{"id":"XDqSIoVRrG4JoF79HTT1Zw","name":"Balvanera","cuisine":"Argentine, Wine Bars, Steakhouses","rating":4.5,"price_level":2,"review_count":132,"description":"Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse.","menu_summary":"The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines."}],"props":{}},{"title":"Prompt to generate answer","description":[{"content":"Assistant helps Pycon attendees with questions about restaurants.\nRespond as if you are a conference volunteer. Do NOT respond with tables.\nAnswer ONLY with the restaurant details listed in the sources.\nIf there isn't enough information below, say you don't know.\nDo not generate answers that don't use the sources below.\nEach restaurant has an ID in brackets followed by colon and the restaurant details.\nAlways include the restaurant ID for each restaurant you reference in the response.\nUse square brackets to reference the restaurant, for example [52].\nDon't combine references, cite each restaurant separately, for example [27][51].\n"},{"content":"What is the capital of France?Sources:\n[XDqSIoVRrG4JoF79HTT1Zw]:Name:Balvanera Description:Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse. Cuisine:Argentine, Wine Bars, Steakhouses Rating:4.5 Price Level:2 Review Count:132 Menu Summary:The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines.","role":"user"}],"props":{"model":"gpt-4o-mini","deployment":"gpt-4o-mini"}}],"followup_questions":null},"sessionState":null} {"delta":{"content":"The capital of France is Paris. [Benefit_Options-2.pdf].","role":"assistant"},"context":null,"sessionState":null} diff --git a/tests/test_api_routes.py b/tests/test_api_routes.py index 55da4d6f..e117909d 100644 --- a/tests/test_api_routes.py +++ b/tests/test_api_routes.py @@ -16,9 +16,10 @@ async def test_item_handler(test_client): assert response_data["id"] == test_data.id assert response_data["name"] == test_data.name assert response_data["description"] == test_data.description - assert response_data["price"] == test_data.price - assert response_data["type"] == test_data.type - assert response_data["brand"] == test_data.brand + assert response_data["price_level"] == test_data.price_level + assert response_data["rating"] == test_data.rating + assert response_data["description"] == test_data.description + assert response_data["menu_summary"] == test_data.menu_summary @pytest.mark.asyncio @@ -36,22 +37,21 @@ async def test_item_handler_404(test_client): @pytest.mark.asyncio async def test_similar_handler(test_client): """test the similar_handler route""" - response = test_client.get("/similar?id=1&n=1") + response = test_client.get("/similar?id=XDqSIoVRrG4JoF79HTT1Zw&n=1") assert response.status_code == 200 assert response.headers["Content-Type"] == "application/json" assert response.json() == [ { - "id": 71, - "name": "Explorer Frost Boots", - "price": 149.99, - "distance": 0.3, - "type": "Footwear", - "brand": "Daybird", - "description": "The Explorer Frost Boots by Daybird are the perfect companion for " - "cold-weather adventures. These premium boots are designed with a waterproof and insulated " - "shell, keeping your feet warm and protected in icy conditions. The sleek black design " - "with blue accents adds a touch of style to your outdoor gear.", + "id": "u4sTiCzVeIHZY8OlaL346Q", + "name": "Gaucho Parrilla Argentina", + "cuisine": "Argentine", + "rating": 4.5, + "price_level": 2, + "review_count": 2643, + "description": "", + "menu_summary": "", + "distance": 0.33, } ] @@ -90,9 +90,10 @@ async def test_search_handler(test_client): assert response_data["id"] == test_data.id assert response_data["name"] == test_data.name assert response_data["description"] == test_data.description - assert response_data["price"] == test_data.price - assert response_data["type"] == test_data.type - assert response_data["brand"] == test_data.brand + assert response_data["price_level"] == test_data.price_level + assert response_data["rating"] == test_data.rating + assert response_data["description"] == test_data.description + assert response_data["menu_summary"] == test_data.menu_summary @pytest.mark.asyncio