[{"data":1,"prerenderedAt":1591},["ShallowReactive",2],{"page-\u002Fguides\u002Fai-chat":3},{"id":4,"title":5,"body":6,"description":1583,"extension":1584,"meta":1585,"navigation":1586,"path":1587,"seo":1588,"stem":1589,"__hash__":1590},"content\u002F4.guides\u002F11.ai-chat.md","AI Chat",{"type":7,"value":8,"toc":1553},"minimark",[9,13,93,100,105,116,150,153,157,172,231,235,262,265,270,273,296,300,303,373,380,383,387,390,426,514,522,527,555,559,565,688,713,750,786,790,793,797,803,806,814,905,910,913,919,1005,1010,1013,1017,1022,1025,1031,1036,1039,1045,1050,1053,1059,1064,1067,1073,1078,1081,1087,1091,1094,1099,1102,1108,1113,1116,1122,1127,1130,1136,1141,1144,1150,1243,1248,1251,1255,1301,1305,1311,1316,1351,1355,1358,1369,1372,1376,1380,1383,1387,1390,1394,1405,1409,1417,1421,1435,1439,1446,1450,1453,1457,1499,1503,1515,1519,1549],[10,11,12],"p",{},"tileserver-rs includes an AI assistant that lets you interact with your maps using natural language. It can run on three backends:",[14,15,16,35],"table",{},[17,18,19],"thead",{},[20,21,22,26,29,32],"tr",{},[23,24,25],"th",{},"Provider",[23,27,28],{},"Where inference runs",[23,30,31],{},"Key",[23,33,34],{},"Prompts leave the device?",[36,37,38,57,73],"tbody",{},[20,39,40,48,51,54],{},[41,42,43,47],"td",{},[44,45,46],"strong",{},"Local (WebLLM)"," — default",[41,49,50],{},"Your browser, via WebGPU",[41,52,53],{},"None",[41,55,56],{},"No",[20,58,59,64,67,70],{},[41,60,61],{},[44,62,63],{},"OpenAI-compatible \u002F Anthropic",[41,65,66],{},"Your own provider (bring your own key)",[41,68,69],{},"Yours, in your browser",[41,71,72],{},"Yes, to your provider",[20,74,75,80,87,90],{},[41,76,77],{},[44,78,79],{},"Server provider",[41,81,82,83],{},"The provider configured in ",[84,85,86],"code",{},"[llm]",[41,88,89],{},"Held by the server",[41,91,92],{},"Yes, via this server",[10,94,95,96,99],{},"Pick the provider with the ",[44,97,98],{},"settings"," button (gear icon) in the chat palette header.",[101,102,104],"h2",{"id":103},"how-it-works","How It Works",[10,106,107,108,115],{},"The AI chat is powered by ",[109,110,114],"a",{"href":111,"rel":112},"https:\u002F\u002Fwebllm.mlc.ai\u002F",[113],"nofollow","WebLLM",", which runs open-source language models directly in your browser using WebGPU acceleration. The assistant can:",[117,118,119,126,132,138,144],"ul",{},[120,121,122,125],"li",{},[44,123,124],{},"Navigate the map"," — fly to cities, countries, or coordinates",[120,127,128,131],{},[44,129,130],{},"Query features"," — find what's visible in the viewport or search tile data",[120,133,134,137],{},[44,135,136],{},"Modify styles"," — change colors, opacity, visibility of map layers",[120,139,140,143],{},[44,141,142],{},"Highlight features"," — temporarily highlight features matching a filter",[120,145,146,149],{},[44,147,148],{},"Inspect data"," — get layer schemas, source statistics, and spatial queries",[10,151,152],{},"The entire conversation stays in your browser. Chat history is persisted to localStorage via TanStack DB and survives page refreshes.",[101,154,156],{"id":155},"requirements","Requirements",[158,159,161],"callout",{"type":160},"info",[10,162,163,164,167,168,171],{},"WebGPU is required. Use ",[44,165,166],{},"Chrome 113+",", ",[44,169,170],{},"Edge 113+",", or any Chromium-based browser with WebGPU support. Firefox and Safari do not fully support WebGPU yet.",[14,173,174,187],{},[17,175,176],{},[20,177,178,181,184],{},[23,179,180],{},"Requirement",[23,182,183],{},"Minimum",[23,185,186],{},"Recommended",[36,188,189,199,210,220],{},[20,190,191,194,196],{},[41,192,193],{},"Browser",[41,195,166],{},[41,197,198],{},"Chrome 120+",[20,200,201,204,207],{},[41,202,203],{},"GPU VRAM",[41,205,206],{},"2 GB",[41,208,209],{},"6 GB",[20,211,212,215,217],{},[41,213,214],{},"Free RAM",[41,216,206],{},[41,218,219],{},"8 GB",[20,221,222,225,228],{},[41,223,224],{},"Disk Space",[41,226,227],{},"1 GB",[41,229,230],{},"5 GB (for larger models)",[101,232,234],{"id":233},"getting-started","Getting Started",[236,237,238,245,256,259],"ol",{},[120,239,240,241,244],{},"Open any style in the map viewer (e.g., ",[84,242,243],{},"http:\u002F\u002Flocalhost:8080\u002Fstyles\u002Fprotomaps-light\u002F",")",[120,246,247,248,251,252,255],{},"Press ",[44,249,250],{},"⌘K"," (Mac) or ",[44,253,254],{},"Ctrl+K"," (Windows\u002FLinux) to open the chat palette",[120,257,258],{},"On first use, the model downloads and compiles for your GPU (~30 seconds)",[120,260,261],{},"Type a message or select a suggested prompt",[10,263,264],{},"Subsequent loads are fast (~2–5 seconds) because the compiled model is cached in IndexedDB.",[266,267,269],"h3",{"id":268},"suggested-prompts","Suggested Prompts",[10,271,272],{},"The chat palette shows suggested prompts when the conversation is empty:",[117,274,275,281,286,291],{},[120,276,277],{},[278,279,280],"em",{},"\"Fly to Paris, France and show me the Eiffel Tower area\"",[120,282,283],{},[278,284,285],{},"\"What layers are available on this map?\"",[120,287,288],{},[278,289,290],{},"\"Take me to Tokyo, Japan at a good zoom level\"",[120,292,293],{},[278,294,295],{},"\"Show me the entire Mediterranean Sea region\"",[101,297,299],{"id":298},"available-models","Available Models",[10,301,302],{},"The local provider ships with four Qwen3.5 models (WebLLM prebuilt builds). Choose based on your hardware and needs:",[14,304,305,318],{},[17,306,307],{},[20,308,309,312,315],{},[23,310,311],{},"Model",[23,313,314],{},"VRAM",[23,316,317],{},"Best For",[36,319,320,334,347,360],{},[20,321,322,328,331],{},[41,323,324,327],{},[44,325,326],{},"Qwen3.5 4B"," (default)",[41,329,330],{},"3.9 GB",[41,332,333],{},"Best balance of quality and speed",[20,335,336,341,344],{},[41,337,338],{},[44,339,340],{},"Qwen3.5 9B",[41,342,343],{},"6.4 GB",[41,345,346],{},"Best quality, needs more VRAM",[20,348,349,354,357],{},[41,350,351],{},[44,352,353],{},"Qwen3.5 2B",[41,355,356],{},"2.2 GB",[41,358,359],{},"Lightweight, lower VRAM systems",[20,361,362,367,370],{},[41,363,364],{},[44,365,366],{},"Qwen3.5 0.8B",[41,368,369],{},"1.6 GB",[41,371,372],{},"Minimal hardware, basic interactions",[10,374,375,376,379],{},"Local models use a text-based tool parser — the LLM emits structured ",[84,377,378],{},"[MAP_ACTION]"," blocks that are parsed and executed client-side. Remote providers use native tool calling and have the full tool set.",[10,381,382],{},"You can switch models at any time using the model selector dropdown in the chat palette.",[101,384,386],{"id":385},"remote-providers-bring-your-own-key","Remote Providers (Bring Your Own Key)",[10,388,389],{},"Use a provider you already pay for — Anthropic Claude, OpenAI, OpenRouter, Groq, or a self-hosted server (Ollama, LM Studio, vLLM). Remote mode needs no WebGPU and no model download.",[236,391,392,398,409],{},[120,393,394,395,397],{},"Open the chat palette and click the ",[44,396,98],{}," (gear) button.",[120,399,400,401,404,405,408],{},"Choose ",[44,402,403],{},"OpenAI-compatible"," or ",[44,406,407],{},"Anthropic (Claude)",".",[120,410,411,412,167,415,418,419,422,423,408],{},"Enter the ",[44,413,414],{},"base URL",[44,416,417],{},"model",", and ",[44,420,421],{},"API key",", then click ",[44,424,425],{},"Test connection",[14,427,428,440],{},[17,429,430],{},[20,431,432,434,437],{},[23,433,25],{},[23,435,436],{},"Base URL",[23,438,439],{},"Notes",[36,441,442,459,471,484,501],{},[20,443,444,447,452],{},[41,445,446],{},"Anthropic",[41,448,449],{},[84,450,451],{},"https:\u002F\u002Fapi.anthropic.com",[41,453,454,455,458],{},"Sent with ",[84,456,457],{},"anthropic-dangerous-direct-browser-access: true",", which Anthropic provides for bring-your-own-key apps",[20,460,461,464,469],{},[41,462,463],{},"OpenAI",[41,465,466],{},[84,467,468],{},"https:\u002F\u002Fapi.openai.com\u002Fv1",[41,470],{},[20,472,473,476,481],{},[41,474,475],{},"OpenRouter",[41,477,478],{},[84,479,480],{},"https:\u002F\u002Fopenrouter.ai\u002Fapi\u002Fv1",[41,482,483],{},"Many models behind one key",[20,485,486,489,494],{},[41,487,488],{},"Ollama",[41,490,491],{},[84,492,493],{},"http:\u002F\u002Flocalhost:11434\u002Fv1",[41,495,496,497,500],{},"No key. Start Ollama with ",[84,498,499],{},"OLLAMA_ORIGINS"," set to this site's origin",[20,502,503,506,511],{},[41,504,505],{},"LM Studio",[41,507,508],{},[84,509,510],{},"http:\u002F\u002Flocalhost:1234\u002Fv1",[41,512,513],{},"No key. Enable CORS in the server settings",[10,515,516,517,521],{},"The browser calls the provider directly, so the provider must allow browser (CORS) requests. If it does not, use the ",[109,518,520],{"href":519},"#server-proxy","server proxy"," instead.",[10,523,524],{},[44,525,526],{},"How the key is stored:",[117,528,529,536,546,552],{},[120,530,531,532,535],{},"By default the key is kept in ",[84,533,534],{},"sessionStorage"," and cleared when you close the tab.",[120,537,538,541,542,545],{},[44,539,540],{},"Remember key on this device"," saves it in ",[84,543,544],{},"localStorage"," instead. Any script running on the page can read it — only enable this on a trusted deployment.",[120,547,548,551],{},[44,549,550],{},"Forget key"," removes it from both.",[120,553,554],{},"The key is only sent in request headers to the provider you entered. It is never put in a URL, logged, or sent to tileserver-rs.",[101,556,558],{"id":557},"server-proxy","Server Proxy",[10,560,561,562,564],{},"Operators can configure one provider on the server. The chat palette then offers a ",[44,563,79],{}," option; users need no key, and there is no CORS limit.",[566,567,572],"pre",{"className":568,"code":569,"language":570,"meta":571,"style":571},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","[llm]\nenabled = true\nprovider = \"anthropic\"                  # or \"openai-compatible\"\nbase_url = \"https:\u002F\u002Fapi.anthropic.com\"\napi_key_env = \"TILESERVER_LLM_API_KEY\"  # the key itself stays in the environment\nmodel = \"claude-sonnet-4-5\"\nallow_user_keys = true                  # set false to offer only Local + Server provider\n","toml","",[84,573,574,590,604,626,641,659,674],{"__ignoreMap":571},[575,576,579,583,587],"span",{"class":577,"line":578},"line",1,[575,580,582],{"class":581},"sMK4o","[",[575,584,586],{"class":585},"sBMFI","llm",[575,588,589],{"class":581},"]\n",[575,591,593,597,600],{"class":577,"line":592},2,[575,594,596],{"class":595},"sTEyZ","enabled ",[575,598,599],{"class":581},"=",[575,601,603],{"class":602},"sfNiH"," true\n",[575,605,607,610,612,615,619,622],{"class":577,"line":606},3,[575,608,609],{"class":595},"provider ",[575,611,599],{"class":581},[575,613,614],{"class":581}," \"",[575,616,618],{"class":617},"sfazB","anthropic",[575,620,621],{"class":581},"\"",[575,623,625],{"class":624},"sHwdD","                  # or \"openai-compatible\"\n",[575,627,629,632,634,636,638],{"class":577,"line":628},4,[575,630,631],{"class":595},"base_url ",[575,633,599],{"class":581},[575,635,614],{"class":581},[575,637,451],{"class":617},[575,639,640],{"class":581},"\"\n",[575,642,644,647,649,651,654,656],{"class":577,"line":643},5,[575,645,646],{"class":595},"api_key_env ",[575,648,599],{"class":581},[575,650,614],{"class":581},[575,652,653],{"class":617},"TILESERVER_LLM_API_KEY",[575,655,621],{"class":581},[575,657,658],{"class":624},"  # the key itself stays in the environment\n",[575,660,662,665,667,669,672],{"class":577,"line":661},6,[575,663,664],{"class":595},"model ",[575,666,599],{"class":581},[575,668,614],{"class":581},[575,670,671],{"class":617},"claude-sonnet-4-5",[575,673,640],{"class":581},[575,675,677,680,682,685],{"class":577,"line":676},7,[575,678,679],{"class":595},"allow_user_keys ",[575,681,599],{"class":581},[575,683,684],{"class":602}," true",[575,686,687],{"class":624},"                  # set false to offer only Local + Server provider\n",[566,689,693],{"className":690,"code":691,"language":692,"meta":571,"style":571},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","TILESERVER_LLM_API_KEY=sk-ant-... tileserver-rs --config config.toml\n","bash",[84,694,695],{"__ignoreMap":571},[575,696,697,699,701,704,707,710],{"class":577,"line":578},[575,698,653],{"class":595},[575,700,599],{"class":581},[575,702,703],{"class":617},"sk-ant-...",[575,705,706],{"class":585}," tileserver-rs",[575,708,709],{"class":617}," --config",[575,711,712],{"class":617}," config.toml\n",[14,714,715,725],{},[17,716,717],{},[20,718,719,722],{},[23,720,721],{},"Endpoint",[23,723,724],{},"Description",[36,726,727,737],{},[20,728,729,734],{},[41,730,731],{},[84,732,733],{},"GET \u002Fapi\u002Fllm\u002Fconfig",[41,735,736],{},"Whether the proxy is enabled, its provider family, model, and upstream host. Never returns the key.",[20,738,739,744],{},[41,740,741],{},[84,742,743],{},"POST \u002Fapi\u002Fllm\u002Fchat",[41,745,746,747,749],{},"Forwards an OpenAI Chat Completions or Anthropic Messages body upstream and streams the response back. The server sets ",[84,748,417],{}," and the auth headers.",[10,751,752,753,756,757,760,761,167,764,767,768,771,772,418,775,778,779,781,782,408],{},"The proxy returns ",[84,754,755],{},"404"," when disabled, ",[84,758,759],{},"413"," for bodies over ",[84,762,763],{},"max_body_bytes",[84,765,766],{},"429"," (with ",[84,769,770],{},"Retry-After: 60",") over ",[84,773,774],{},"rate_limit_per_minute",[84,776,777],{},"502"," when the upstream cannot be reached. All ",[84,780,86],{}," keys are listed in the ",[109,783,785],{"href":784},"\u002Fgetting-started\u002Fconfig#llm","configuration reference",[101,787,789],{"id":788},"map-tools","Map Tools",[10,791,792],{},"The AI assistant has access to 13 tools organized into three categories: navigation, styling, and data queries.",[266,794,796],{"id":795},"navigation-tools","Navigation Tools",[798,799,801],"h4",{"id":800},"fly_to",[84,802,800],{},[10,804,805],{},"Animate the map camera to a specific location.",[566,807,812],{"className":808,"code":810,"language":811},[809],"language-text","\"Fly to the Colosseum in Rome\"\n\"Show me downtown Manhattan at zoom 15\"\n\"Go to coordinates 139.7, 35.7 with a 45° bearing\"\n","text",[84,813,810],{"__ignoreMap":571},[14,815,816,831],{},[17,817,818],{},[20,819,820,823,826,829],{},[23,821,822],{},"Parameter",[23,824,825],{},"Type",[23,827,828],{},"Required",[23,830,724],{},[36,832,833,849,863,877,891],{},[20,834,835,840,843,846],{},[41,836,837],{},[84,838,839],{},"lng",[41,841,842],{},"number",[41,844,845],{},"✅",[41,847,848],{},"Longitude (-180 to 180)",[20,850,851,856,858,860],{},[41,852,853],{},[84,854,855],{},"lat",[41,857,842],{},[41,859,845],{},[41,861,862],{},"Latitude (-90 to 90)",[20,864,865,870,872,874],{},[41,866,867],{},[84,868,869],{},"zoom",[41,871,842],{},[41,873],{},[41,875,876],{},"Zoom level 0–22 (default 12)",[20,878,879,884,886,888],{},[41,880,881],{},[84,882,883],{},"bearing",[41,885,842],{},[41,887],{},[41,889,890],{},"Bearing in degrees (default 0)",[20,892,893,898,900,902],{},[41,894,895],{},[84,896,897],{},"pitch",[41,899,842],{},[41,901],{},[41,903,904],{},"Pitch 0–85° (default 0)",[798,906,908],{"id":907},"fit_bounds",[84,909,907],{},[10,911,912],{},"Fit the map camera to a bounding box — useful for countries, regions, or areas.",[566,914,917],{"className":915,"code":916,"language":811},[809],"\"Show me all of Japan\"\n\"Zoom to the Mediterranean Sea\"\n\"Fit the map to the continental United States\"\n",[84,918,916],{"__ignoreMap":571},[14,920,921,933],{},[17,922,923],{},[20,924,925,927,929,931],{},[23,926,822],{},[23,928,825],{},[23,930,828],{},[23,932,724],{},[36,934,935,949,963,977,991],{},[20,936,937,942,944,946],{},[41,938,939],{},[84,940,941],{},"west",[41,943,842],{},[41,945,845],{},[41,947,948],{},"West longitude",[20,950,951,956,958,960],{},[41,952,953],{},[84,954,955],{},"south",[41,957,842],{},[41,959,845],{},[41,961,962],{},"South latitude",[20,964,965,970,972,974],{},[41,966,967],{},[84,968,969],{},"east",[41,971,842],{},[41,973,845],{},[41,975,976],{},"East longitude",[20,978,979,984,986,988],{},[41,980,981],{},[84,982,983],{},"north",[41,985,842],{},[41,987,845],{},[41,989,990],{},"North latitude",[20,992,993,998,1000,1002],{},[41,994,995],{},[84,996,997],{},"padding",[41,999,842],{},[41,1001],{},[41,1003,1004],{},"Padding in pixels (default 50)",[798,1006,1008],{"id":1007},"get_map_state",[84,1009,1007],{},[10,1011,1012],{},"Get the current map center, zoom, bearing, pitch, and visible layers. The assistant uses this to understand what you're looking at before making changes.",[266,1014,1016],{"id":1015},"styling-tools","Styling Tools",[798,1018,1020],{"id":1019},"set_layer_visibility",[84,1021,1019],{},[10,1023,1024],{},"Show or hide a map layer by its ID.",[566,1026,1029],{"className":1027,"code":1028,"language":811},[809],"\"Hide the water layer\"\n\"Show the buildings layer\"\n\"Turn off all label layers\"\n",[84,1030,1028],{"__ignoreMap":571},[798,1032,1034],{"id":1033},"set_layer_paint",[84,1035,1033],{},[10,1037,1038],{},"Change a paint property of a map layer — color, opacity, width, and more.",[566,1040,1043],{"className":1041,"code":1042,"language":811},[809],"\"Make the water dark blue\"\n\"Set the building fill opacity to 0.5\"\n\"Change road line width to 3\"\n",[84,1044,1042],{"__ignoreMap":571},[798,1046,1048],{"id":1047},"set_layer_filter",[84,1049,1047],{},[10,1051,1052],{},"Apply a MapLibre filter expression to a layer. Only features matching the filter are shown.",[566,1054,1057],{"className":1055,"code":1056,"language":811},[809],"\"Only show parks in the landuse layer\"\n\"Filter buildings taller than 50 meters\"\n",[84,1058,1056],{"__ignoreMap":571},[798,1060,1062],{"id":1061},"add_highlight",[84,1063,1061],{},[10,1065,1066],{},"Temporarily highlight features matching a filter with a colored circle. Highlights auto-remove after 8 seconds.",[566,1068,1071],{"className":1069,"code":1070,"language":811},[809],"\"Highlight all hospitals\"\n\"Show me where the schools are in red\"\n",[84,1072,1070],{"__ignoreMap":571},[798,1074,1076],{"id":1075},"generate_style",[84,1077,1075],{},[10,1079,1080],{},"Apply multiple style changes at once from a natural language description.",[566,1082,1085],{"className":1083,"code":1084,"language":811},[809],"\"Make this a dark mode map\"\n\"Give me a satellite-style color scheme\"\n\"Make all text labels larger\"\n",[84,1086,1084],{"__ignoreMap":571},[266,1088,1090],{"id":1089},"data-query-tools","Data Query Tools",[10,1092,1093],{},"These tools query the tile data served by tileserver-rs — either from the rendered viewport or directly from the vector tile sources.",[798,1095,1097],{"id":1096},"query_rendered_features",[84,1098,1096],{},[10,1100,1101],{},"Query features currently visible in the map viewport. Returns properties and geometry type.",[566,1103,1106],{"className":1104,"code":1105,"language":811},[809],"\"What features are visible right now?\"\n\"Show me the properties of buildings in view\"\n\"List all points of interest I can see\"\n",[84,1107,1105],{"__ignoreMap":571},[798,1109,1111],{"id":1110},"get_source_schema",[84,1112,1110],{},[10,1114,1115],{},"Get the schema of a tile source — available layers, field names and types, zoom range, and bounds.",[566,1117,1120],{"className":1118,"code":1119,"language":811},[809],"\"What layers are in the openmaptiles source?\"\n\"Show me the fields available in the buildings layer\"\n",[84,1121,1119],{"__ignoreMap":571},[798,1123,1125],{"id":1124},"get_source_stats",[84,1126,1124],{},[10,1128,1129],{},"Get statistics for a tile source — bounds, zoom range, layer count, attribution.",[566,1131,1134],{"className":1132,"code":1133,"language":811},[809],"\"What's the zoom range of this data source?\"\n\"Show me the attribution for the terrain data\"\n",[84,1135,1133],{"__ignoreMap":571},[798,1137,1139],{"id":1138},"spatial_query",[84,1140,1138],{},[10,1142,1143],{},"Query features from a tile source within a bounding box. This queries the actual vector tile data on the server, not just what's rendered in the viewport.",[566,1145,1148],{"className":1146,"code":1147,"language":811},[809],"\"Find all buildings within 1km of the Eiffel Tower\"\n\"What points of interest are in this area?\"\n",[84,1149,1147],{"__ignoreMap":571},[14,1151,1152,1164],{},[17,1153,1154],{},[20,1155,1156,1158,1160,1162],{},[23,1157,822],{},[23,1159,825],{},[23,1161,828],{},[23,1163,724],{},[36,1165,1166,1181,1200,1213,1229],{},[20,1167,1168,1173,1176,1178],{},[41,1169,1170],{},[84,1171,1172],{},"source",[41,1174,1175],{},"string",[41,1177,845],{},[41,1179,1180],{},"Source ID to query",[20,1182,1183,1188,1192,1194],{},[41,1184,1185],{},[84,1186,1187],{},"bbox",[41,1189,842,1190],{},[575,1191],{},[41,1193],{},[41,1195,1196,1197],{},"Bounding box ",[84,1198,1199],{},"[west, south, east, north]",[20,1201,1202,1206,1208,1210],{},[41,1203,1204],{},[84,1205,869],{},[41,1207,842],{},[41,1209],{},[41,1211,1212],{},"Tile resolution (default 14)",[20,1214,1215,1220,1224,1226],{},[41,1216,1217],{},[84,1218,1219],{},"layers",[41,1221,1175,1222],{},[575,1223],{},[41,1225],{},[41,1227,1228],{},"Layer IDs to query",[20,1230,1231,1236,1238,1240],{},[41,1232,1233],{},[84,1234,1235],{},"limit",[41,1237,842],{},[41,1239],{},[41,1241,1242],{},"Max features to return (default 100)",[798,1244,1246],{"id":1245},"get_overlays",[84,1247,1245],{},[10,1249,1250],{},"List all user-dropped file overlays on the map — file names, formats, feature counts, colors, and visibility. Works with files dragged onto the map viewer (GeoJSON, KML, GPX, CSV, Shapefiles, PMTiles).",[101,1252,1254],{"id":1253},"keyboard-shortcuts","Keyboard Shortcuts",[14,1256,1257,1267],{},[17,1258,1259],{},[20,1260,1261,1264],{},[23,1262,1263],{},"Shortcut",[23,1265,1266],{},"Action",[36,1268,1269,1281,1291],{},[20,1270,1271,1278],{},[41,1272,1273,1275,1276],{},[44,1274,250],{}," \u002F ",[44,1277,254],{},[41,1279,1280],{},"Toggle chat palette",[20,1282,1283,1288],{},[41,1284,1285],{},[44,1286,1287],{},"Esc",[41,1289,1290],{},"Close chat palette",[20,1292,1293,1298],{},[41,1294,1295],{},[44,1296,1297],{},"Enter",[41,1299,1300],{},"Send message",[101,1302,1304],{"id":1303},"architecture","Architecture",[566,1306,1309],{"className":1307,"code":1308,"language":811},[809],"User Input → Chat Palette (Vue)\n    ↓\nuseLlmPanel (composable) ← useLlmProvider (provider, settings, key)\n    ↓\nuseLlmChat → useChat({ connection: stream(adapter) })\n    ↓\nstream() adapter — converts provider output → AG-UI protocol events\n    ├── Local: WebLLM engine (browser, WebGPU)\n    ├── OpenAI-compatible: POST {base}\u002Fchat\u002Fcompletions (SSE)\n    ├── Anthropic: POST \u002Fv1\u002Fmessages (SSE)\n    └── Server provider: POST \u002Fapi\u002Fllm\u002Fchat → configured upstream\n    ↓\nAG-UI events stream back to TanStack AI Vue\n    ↓\nTool results auto-executed client-side\n    ↓\nChat Palette renders messages + tool results\n",[84,1310,1308],{"__ignoreMap":571},[10,1312,1313],{},[44,1314,1315],{},"Key packages:",[117,1317,1318,1327,1341],{},[120,1319,1320,1326],{},[109,1321,1323],{"href":111,"rel":1322},[113],[84,1324,1325],{},"@mlc-ai\u002Fweb-llm"," — Browser-local LLM inference via WebGPU",[120,1328,1329,1336,1337,1340],{},[109,1330,1333],{"href":1331,"rel":1332},"https:\u002F\u002Ftanstack.com\u002Fai\u002Flatest",[113],[84,1334,1335],{},"@tanstack\u002Fai-vue"," — Vue integration with ",[84,1338,1339],{},"useChat"," hook",[120,1342,1343,1350],{},[109,1344,1347],{"href":1345,"rel":1346},"https:\u002F\u002Fzod.dev\u002F",[113],[84,1348,1349],{},"zod"," — Tool input schema validation",[101,1352,1354],{"id":1353},"chat-persistence","Chat Persistence",[10,1356,1357],{},"Chat messages are automatically saved to your browser's localStorage via TanStack DB. This includes:",[117,1359,1360,1363,1366],{},[120,1361,1362],{},"All user and assistant messages",[120,1364,1365],{},"Tool call records (which tool was called, with what arguments)",[120,1367,1368],{},"Spatial query results",[10,1370,1371],{},"Messages persist across page refreshes and browser restarts. They are stored locally; only the active remote provider (if any) receives the conversation, as part of each request.",[101,1373,1375],{"id":1374},"troubleshooting","Troubleshooting",[266,1377,1379],{"id":1378},"webgpu-is-not-supported","\"WebGPU is not supported\"",[10,1381,1382],{},"Your browser doesn't support WebGPU. Use Chrome 113+ or Edge 113+. On macOS, Safari technology previews have partial WebGPU support but may not work reliably with WebLLM.",[266,1384,1386],{"id":1385},"model-download-is-slow","Model download is slow",[10,1388,1389],{},"The first download transfers 1.6–6.4 GB depending on the model. After the first download, the compiled model is cached in IndexedDB and loads in 2–5 seconds. Try a smaller model (Qwen3.5 0.8B at 1.6 GB) if bandwidth is limited, or use a remote provider.",[266,1391,1393],{"id":1392},"tool-calls-dont-execute","Tool calls don't execute",[10,1395,1396,1397,404,1399,1401,1402,1404],{},"If the assistant describes an action but doesn't execute it, try a larger model. ",[44,1398,326],{},[44,1400,340],{}," have the best instruction-following for tool execution. Smaller models (0.8B, 2B) may occasionally describe actions in prose instead of emitting the structured ",[84,1403,378],{}," blocks the parser expects.",[266,1406,1408],{"id":1407},"could-not-reach-with-a-remote-provider","\"Could not reach …\" with a remote provider",[10,1410,1411,1412,1414,1415,408],{},"The provider is unreachable or blocks browser requests (CORS). Check the base URL; for Ollama set ",[84,1413,499],{},"; otherwise ask the operator to enable the ",[109,1416,520],{"href":519},[266,1418,1420],{"id":1419},"the-api-key-was-rejected","\"The API key was rejected\"",[10,1422,1423,1424,1427,1428,1431,1432,1434],{},"The provider returned ",[84,1425,1426],{},"401","\u002F",[84,1429,1430],{},"403",". Re-enter the key, or click ",[44,1433,550],{}," and paste it again.",[266,1436,1438],{"id":1437},"chat-palette-wont-open","Chat palette won't open",[10,1440,1441,1442,1445],{},"Make sure you're on a style viewer page (",[84,1443,1444],{},"\u002Fstyles\u002F{style}\u002F","). The AI chat is only available in the map viewer, not on the home page or data inspector.",[266,1447,1449],{"id":1448},"gpu-out-of-memory","GPU out of memory",[10,1451,1452],{},"Try a smaller model. Qwen3.5 0.8B requires only ~1.6 GB of VRAM. Close other GPU-intensive tabs or applications. On systems with shared GPU memory (integrated graphics), ensure enough system RAM is available.",[101,1454,1456],{"id":1455},"privacy-security","Privacy & Security",[117,1458,1459,1465,1475,1481,1487,1493],{},[120,1460,1461,1464],{},[44,1462,1463],{},"Local (default): no data leaves your browser"," — the LLM runs entirely via WebGPU, with no keys and no token costs",[120,1466,1467,1470,1471,1474],{},[44,1468,1469],{},"Remote providers send prompts off the device"," — the palette shows ",[278,1472,1473],{},"\"Prompts are sent to \u003Chost>\""," whenever a remote provider is active, and calls are billed to the provider account in use",[120,1476,1477,1480],{},[44,1478,1479],{},"Your own key never reaches tileserver-rs"," — it goes from the browser straight to the provider, in request headers only",[120,1482,1483,1486],{},[44,1484,1485],{},"The server proxy key stays on the server"," — it is read from an environment variable and never returned by any endpoint",[120,1488,1489,1492],{},[44,1490,1491],{},"Chat history is local"," — stored in localStorage, never uploaded to tileserver-rs",[120,1494,1495,1498],{},[44,1496,1497],{},"Server-side tools query your own data"," — spatial queries go to your tileserver-rs instance, not any external service",[101,1500,1502],{"id":1501},"live-demo","Live Demo",[10,1504,1505,1506,1511,1512,1514],{},"Try the AI chat on the live demo at ",[109,1507,1510],{"href":1508,"rel":1509},"https:\u002F\u002Fdemo.tileserver.app",[113],"demo.tileserver.app",". Open any style, press ",[44,1513,250],{},", and start talking to the map.",[101,1516,1518],{"id":1517},"next-steps","Next Steps",[117,1520,1521,1528,1535,1542],{},[120,1522,1523,1527],{},[109,1524,1526],{"href":1525},"\u002Fgetting-started\u002Fquickstart","Quickstart"," — Set up tileserver-rs",[120,1529,1530,1534],{},[109,1531,1533],{"href":1532},"\u002Fgetting-started\u002Fconfig","Configuration"," — All configuration options",[120,1536,1537,1541],{},[109,1538,1540],{"href":1539},"\u002Fguides\u002Fvector-tiles","Vector Tiles"," — Serving vector tiles",[120,1543,1544,1548],{},[109,1545,1547],{"href":1546},"\u002Fguides\u002Ffile-drop","File Drop"," — Drag & drop files onto the map",[1550,1551,1552],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":571,"searchDepth":592,"depth":592,"links":1554},[1555,1556,1557,1560,1561,1562,1563,1568,1569,1570,1571,1580,1581,1582],{"id":103,"depth":592,"text":104},{"id":155,"depth":592,"text":156},{"id":233,"depth":592,"text":234,"children":1558},[1559],{"id":268,"depth":606,"text":269},{"id":298,"depth":592,"text":299},{"id":385,"depth":592,"text":386},{"id":557,"depth":592,"text":558},{"id":788,"depth":592,"text":789,"children":1564},[1565,1566,1567],{"id":795,"depth":606,"text":796},{"id":1015,"depth":606,"text":1016},{"id":1089,"depth":606,"text":1090},{"id":1253,"depth":592,"text":1254},{"id":1303,"depth":592,"text":1304},{"id":1353,"depth":592,"text":1354},{"id":1374,"depth":592,"text":1375,"children":1572},[1573,1574,1575,1576,1577,1578,1579],{"id":1378,"depth":606,"text":1379},{"id":1385,"depth":606,"text":1386},{"id":1392,"depth":606,"text":1393},{"id":1407,"depth":606,"text":1408},{"id":1419,"depth":606,"text":1420},{"id":1437,"depth":606,"text":1438},{"id":1448,"depth":606,"text":1449},{"id":1455,"depth":592,"text":1456},{"id":1501,"depth":592,"text":1502},{"id":1517,"depth":592,"text":1518},"Talk to your maps with a browser-local LLM, your own provider key, or a server-side proxy","md",{},true,"\u002Fguides\u002Fai-chat",{"title":5,"description":1583},"4.guides\u002F11.ai-chat","1OVKGLsgEe-yiJzVofjsSMLFWiHxV9m1sh5CPgfmpGI",1794150612969]