content
large_stringlengths
3
20.5k
url
large_stringlengths
54
193
branch
large_stringclasses
4 values
source
large_stringclasses
42 values
embeddings
listlengths
384
384
score
float64
-0.21
0.65
ssh -T gateway-host imsg "$@" ``` \*\*Remote attachments:\*\* When `cliPath` points to a remote host via SSH, attachment paths in the Messages database reference files on the remote machine. OpenClaw can automatically fetch these over SCP by setting `channels.imessage.remoteHost`: ```json5 { channels: { imessage: { cliPath: "~/imsg-ssh", // SSH wrapper to remote Mac remoteHost: "user@gateway-host", // for SCP file transfer includeAttachments: true, }, }, } ``` If `remoteHost` is not set, OpenClaw attempts to auto-detect it by parsing the SSH command in your wrapper script. Explicit configuration is recommended for reliability. #### Remote Mac via Tailscale (example) If the Gateway runs on a Linux host/VM but iMessage must run on a Mac, Tailscale is the simplest bridge: the Gateway talks to the Mac over the tailnet, runs `imsg` via SSH, and SCPs attachments back. Architecture: ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” SSH (imsg rpc) β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Gateway host (Linux/VM) │──────────────────────────────────▢│ Mac with Messages + imsg β”‚ β”‚ - openclaw gateway β”‚ SCP (attachments) β”‚ - Messages signed in β”‚ β”‚ - channels.imessage.cliPath │◀──────────────────────────────────│ - Remote Login enabled β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β–² β”‚ Tailscale tailnet (hostname or 100.x.y.z) β–Ό user@gateway-host ``` Concrete config example (Tailscale hostname): ```json5 { channels: { imessage: { enabled: true, cliPath: "~/.openclaw/scripts/imsg-ssh", remoteHost: "bot@mac-mini.tailnet-1234.ts.net", includeAttachments: true, dbPath: "/Users/bot/Library/Messages/chat.db", }, }, } ``` Example wrapper (`~/.openclaw/scripts/imsg-ssh`): ```bash #!/usr/bin/env bash exec ssh -T bot@mac-mini.tailnet-1234.ts.net imsg "$@" ``` Notes: - Ensure the Mac is signed in to Messages, and Remote Login is enabled. - Use SSH keys so `ssh bot@mac-mini.tailnet-1234.ts.net` works without prompts. - `remoteHost` should match the SSH target so SCP can fetch attachments. Multi-account support: use `channels.imessage.accounts` with per-account config and optional `name`. See [`gateway/configuration`](/gateway/configuration#telegramaccounts--discordaccounts--slackaccounts--signalaccounts--imessageaccounts) for the shared pattern. Don't commit `~/.openclaw/openclaw.json` (it often contains tokens). ## Access control (DMs + groups) DMs: - Default: `channels.imessage.dmPolicy = "pairing"`. - Unknown senders receive a pairing code; messages are ignored until approved (codes expire after 1 hour). - Approve via: - `openclaw pairing list imessage` - `openclaw pairing approve imessage ```` ` - Pairing is the default token exchange for iMessage DMs. Details: [Pairing](/start/pairing) Groups: - `channels.imessage.groupPolicy = open | allowlist | disabled`. - `channels.imessage.groupAllowFrom` controls who can trigger in groups when `allowlist` is set. - Mention gating uses `agents.list[].groupChat.mentionPatterns` (or `messages.groupChat.mentionPatterns`) because iMessage has no native mention metadata. - Multi-agent override: set per-agent patterns on `agents.list[].groupChat.mentionPatterns`. ## How it works (behavior) - `imsg` streams message events; the gateway normalizes them into the shared channel envelope. - Replies always route back to the same chat id or handle. ## Group-ish threads (`is_group=false`) Some iMessage threads can have multiple participants but still arrive with `is_group=false` depending on how Messages stores the chat identifier. If you explicitly configure a `chat_id` under `channels.imessage.groups`, OpenClaw treats that thread as a β€œgroup” for: - session isolation (separate `agent::imessage:group:` session key) - group allowlisting / mention gating behavior Example: ```json5 { channels: { imessage: { groupPolicy: "allowlist", groupAllowFrom: ["+15555550123"], groups: { "42": { requireMention: false }, }, }, }, } ``` This is useful when you want an isolated personality/model for a specific thread (see [Multi-agent routing](/concepts/multi-agent)). For filesystem isolation, see [Sandboxing](/gateway/sandboxing). ## Media + limits - Optional attachment ingestion via `channels.imessage.includeAttachments`. - Media cap via `channels.imessage.mediaMaxMb`. ## Limits - Outbound text is chunked to `channels.imessage.textChunkLimit` (default 4000). - Optional newline chunking: set `channels.imessage.chunkMode="newline"` to split on blank lines (paragraph boundaries) before length chunking. - Media uploads are capped by `channels.imessage.mediaMaxMb` (default 16). ## Addressing / delivery targets Prefer `chat_id` for stable routing: - `chat_id:123` (preferred) - `chat_guid:...` - `chat_identifier:...` - direct handles: `imessage:+1555` / `sms:+1555` / `user@example.com` List chats: ``` imsg chats --limit 20 ``` ## Configuration reference (iMessage)
https://github.com/openclaw/openclaw/blob/main//docs/channels/imessage.md
main
opebclaw
[ 0.011674740351736546, -0.0005820401129312813, 0.023794926702976227, 0.03443573787808418, 0.05692547559738159, -0.10063748061656952, -0.03464479744434357, -0.0022027650848031044, 0.03026917763054371, 0.004209119360893965, 0.04897010698914528, 0.004701102152466774, 0.00724699767306447, 0.06266672909259796, 0.03032902628183365, 0.041014596819877625, 0.03993263095617294, -0.06713312119245529, 0.0487690232694149, -0.019257813692092896, 0.0020833287853747606, 0.03496570140123367, 0.06367876380681992, -0.00902275275439024, -0.04155963659286499, -0.044548217207193375, 0.0006581238703802228, -0.023089386522769928, -0.083050936460495, 0.028050653636455536, 0.002752300351858139, -0.007310858927667141, -0.07993534952402115, 0.012111061252653599, 0.03489680215716362, 0.06645450741052628, 0.1202000230550766, 0.030157942324876785, -0.02720000594854355, -0.021551311016082764, 0.034904155880212784, -0.057384226471185684, 0.04345469921827316, -0.03437674418091774, -0.00692433025687933, -0.04560520872473717, -0.014515039511024952, -0.012669306248426437, -0.029247866943478584, -0.002638904843479395, -0.09620419144630432, -0.032389312982559204, 0.030570464208722115, 0.0916474238038063, 0.016520613804459572, 0.031173305585980415, -0.0502370186150074, -0.014050418511033058, 0.045047417283058167, -0.0057594324462115765, 0.007499586790800095, -0.034843560308218, -0.02728639729321003, -0.021346401423215866, -0.06852779537439346, -0.030674660578370094, 0.008582107722759247, 0.036146294325590134, -0.06428006291389465, 0.004501850809901953, 0.008599656634032726, -0.009285268373787403, -0.09362146258354187, 0.04921472445130348, -0.012320775538682938, -0.00784558430314064, 0.09700561314821243, -0.03351964056491852, -0.11004273593425751, 0.008078604936599731, -0.07786671817302704, -0.10677988082170486, -0.07245969027280807, 0.008209019899368286, -0.012589333578944206, 0.053341008722782135, -0.014834517613053322, 0.05620019510388374, 0.017442408949136734, 0.04336433485150337, -0.0037859107833355665, -0.08635029196739197, -0.09109911322593689, -0.017242329195141792, 0.018413135781884193, 0.013567098416388035, -0.0982532650232315, -0.007081812247633934, -0.008743391372263432, 0.04571634903550148, 0.018696459010243416, 0.000921588740311563, 0.08075250685214996, -0.04867679625749588, 0.011824717745184898, 0.07632333785295486, 0.040200117975473404, 0.0206160731613636, 0.04304905980825424, -0.014007022604346275, -0.023670535534620285, -0.0675819143652916, 0.09794636070728302, -0.008282861672341824, -0.0009698635549284518, 0.044063471257686615, -0.01990584097802639, 0.034896209836006165, 0.024814587086439133, 0.048539865761995316, 0.10408665984869003, 0.04709143191576004, 0.022488484159111977, 0.09761766344308853, 0.07572799175977707, 0.05725913494825363, 0.07041457295417786, 6.809295676899865e-33, 0.010985149070620537, 0.032627884298563004, -0.002056616358458996, 0.020616766065359116, 0.03419504687190056, -0.013939984142780304, 0.03998184949159622, 0.03438567370176315, -0.11941280215978622, 0.021570133045315742, -0.07168132066726685, 0.005776227917522192, 0.04293052479624748, -0.07057026028633118, -0.020260483026504517, 0.011478742584586143, -0.05810997262597084, 0.02926233783364296, 0.13099925220012665, 0.037522610276937485, -0.06827308237552643, -0.04476064816117287, 0.01842273399233818, 0.006823002826422453, 0.026238910853862762, -0.09516831487417221, -0.04431138560175896, -0.06634359061717987, 0.02315478026866913, 0.028577543795108795, 0.04387582838535309, 0.037822380661964417, -0.018193628638982773, -0.020627373829483986, -0.06386955082416534, -0.0009451995138078928, -0.07075051218271255, -0.07043687999248505, -0.04875948280096054, 0.01674824021756649, 0.06259908527135849, -0.02921435795724392, -0.04457719624042511, 0.0290884580463171, -0.09057091176509857, -0.06434910744428635, -0.09166715294122696, 0.034211669117212296, -0.004650999326258898, 0.029115689918398857, 0.008580750785768032, -0.004347383975982666, 0.05940491333603859, -0.05383162200450897, 0.03423027694225311, 0.021932760253548622, 0.02067364752292633, -0.0008397407946176827, 0.012719815596938133, 0.01491957250982523, -0.019803060218691826, -0.008766942657530308, -0.026297714561223984, -0.0599956177175045, 0.1115441769361496, -0.0237070694565773, 0.013849914073944092, 0.07717854529619217, -0.07591670006513596, -0.02145572192966938, -0.05623523145914078, 0.05282486602663994, -0.03784007579088211, 0.04356221854686737, 0.04140371456742287, -0.06624521315097809, -0.04007789120078087, 0.05791838467121124, 0.13011807203292847, 0.03211817517876625, -0.024240806698799133, 0.03271246328949928, -0.023817233741283417, -0.014264898374676704, -0.024613376706838608, 0.10719763487577438, 0.03519284352660179, -0.06573766469955444, -0.01791282556951046, 0.040186721831560135, -0.027553671970963478, -0.0064124842174351215, -0.04390624538064003, 0.039415568113327026, -0.026929253712296486, -6.813637659158215e-33, -0.013528640381991863, 0.0028582115191966295, -0.030132440850138664, 0.05319412425160408, 0.009050441905856133, 0.055116552859544754, 0.07202965021133423, -0.04649156704545021, -0.0982048436999321, -0.08525113761425018, -0.04786079004406929, 0.03819149732589722, -0.017386648803949356, -0.14860057830810547, 0.06432866305112839, -0.06412848830223083, 0.04491958022117615, -0.07611005008220673, -0.02496172860264778, -0.05845106765627861, -0.007701617665588856, 0.03895767033100128, 0.0639440268278122, 0.035991426557302475, 0.029287906363606453, 0.03565221652388573, 0.05546114966273308, 0.05257869511842728, -0.06407912820577621, -0.017446933314204216, -0.013317923061549664, 0.024011410772800446, -0.01918249949812889, -0.025964558124542236, 0.018198059871792793, 0.07722567766904831, -0.010256496258080006, 0.10024509578943253, 0.09946119785308838, 0.042958300560712814, 0.09245970845222473, 0.04523148760199547, -0.12635201215744019, 0.026948576793074608, -0.05627043545246124, 0.05404754355549812, -0.09515874087810516, 0.07957436144351959, -0.029873788356781006, -0.002706469502300024, -0.022178703919053078, 0.002976806368678808, -0.015864968299865723, 0.03204551339149475, 0.050219129770994186, 0.09894713759422302, -0.039925821125507355, -0.05658154562115669, -0.013490070588886738, -0.07810287177562714, -0.008344121277332306, -0.05574272572994232, -0.03193604573607445, -0.004663692321628332, -0.030265480279922485, -0.08351923525333405, -0.029424993321299553, -0.026001237332820892, -0.018246615305542946, -0.018205592408776283, -0.09539684653282166, -0.013375191017985344, 0.06640584021806717, -0.05789140984416008, 0.053532183170318604, 0.013470581732690334, 0.011837616562843323, -0.010608593933284283, -0.07552575320005417, 0.015558618120849133, 0.03485686331987381, 0.06492610275745392, 0.0011030328460037708, 0.0024589544627815485, 0.05836169794201851, -0.04167119786143303, -0.054818324744701385, 0.09191365540027618, 0.1042734831571579, -0.026985736563801765, -0.06404624134302139, 0.056067414581775665, 0.0018079744186252356, -0.0036675017327070236, 0.02147870697081089, -5.3617277728790214e-8, 0.003738095983862877, -0.08244748413562775, -0.03209301084280014, 0.04666052758693695, -0.06366047263145447, 0.08844815194606781, -0.023906279355287552, -0.057771798223257065, -0.011100300587713718, 0.027244096621870995, 0.026356421411037445, -0.0017480776878073812, 0.012270860373973846, 0.03000195324420929, -0.09281553328037262, 0.01215413212776184, 0.059043388813734055, -0.05955752357840538, 0.00032292879768647254, -0.04682417958974838, 0.014372095465660095, -0.048519354313611984, 0.0172486063092947, 0.09537863731384277, -0.05787685886025429, 0.012031051330268383, -0.06996095180511475, -0.021702688187360764, -0.06382611393928528, -0.05591829866170883, -0.01733807660639286, -0.07129482924938202, -0.01275362353771925, 0.04415091872215271, -0.017462143674492836, 0.05176425725221634, -0.0691097229719162, -0.045417338609695435, -0.028609858825802803, 0.055107541382312775, 0.0638909563422203, 0.002892519347369671, -0.06225141882896423, -0.049780189990997314, -0.021786313503980637, -0.00006705115811200812, -0.020172476768493652, 0.018646616488695145, -0.02636764757335186, 0.041516851633787155, 0.022542009130120277, -0.027545204386115074, 0.0006581612396985292, 0.13645745813846588, 0.07161662727594376, -0.04849066957831383, 0.11906235665082932, -0.13844174146652222, 0.019836099818348885, 0.029324958100914955, 0.026658140122890472, 0.04285137727856636, 0.023556165397167206, -0.0474158450961113 ]
0.05609
boundaries) before length chunking. - Media uploads are capped by `channels.imessage.mediaMaxMb` (default 16). ## Addressing / delivery targets Prefer `chat_id` for stable routing: - `chat_id:123` (preferred) - `chat_guid:...` - `chat_identifier:...` - direct handles: `imessage:+1555` / `sms:+1555` / `user@example.com` List chats: ``` imsg chats --limit 20 ``` ## Configuration reference (iMessage) Full configuration: [Configuration](/gateway/configuration) Provider options: - `channels.imessage.enabled`: enable/disable channel startup. - `channels.imessage.cliPath`: path to `imsg`. - `channels.imessage.dbPath`: Messages DB path. - `channels.imessage.remoteHost`: SSH host for SCP attachment transfer when `cliPath` points to a remote Mac (e.g., `user@gateway-host`). Auto-detected from SSH wrapper if not set. - `channels.imessage.service`: `imessage | sms | auto`. - `channels.imessage.region`: SMS region. - `channels.imessage.dmPolicy`: `pairing | allowlist | open | disabled` (default: pairing). - `channels.imessage.allowFrom`: DM allowlist (handles, emails, E.164 numbers, or `chat_id:*`). `open` requires `"*"`. iMessage has no usernames; use handles or chat targets. - `channels.imessage.groupPolicy`: `open | allowlist | disabled` (default: allowlist). - `channels.imessage.groupAllowFrom`: group sender allowlist. - `channels.imessage.historyLimit` / `channels.imessage.accounts.*.historyLimit`: max group messages to include as context (0 disables). - `channels.imessage.dmHistoryLimit`: DM history limit in user turns. Per-user overrides: `channels.imessage.dms[""].historyLimit`. - `channels.imessage.groups`: per-group defaults + allowlist (use `"*"` for global defaults). - `channels.imessage.includeAttachments`: ingest attachments into context. - `channels.imessage.mediaMaxMb`: inbound/outbound media cap (MB). - `channels.imessage.textChunkLimit`: outbound chunk size (chars). - `channels.imessage.chunkMode`: `length` (default) or `newline` to split on blank lines (paragraph boundaries) before length chunking. Related global options: - `agents.list[].groupChat.mentionPatterns` (or `messages.groupChat.mentionPatterns`). - `messages.responsePrefix`. ````
https://github.com/openclaw/openclaw/blob/main//docs/channels/imessage.md
main
opebclaw
[ 0.02283114194869995, -0.06655264645814896, 0.045934878289699554, -0.05053941160440445, 0.05783121660351753, -0.04605570062994957, 0.029530085623264313, 0.02630920149385929, 0.053292665630578995, 0.05774930119514465, 0.0814569890499115, 0.04825497791171074, -0.003960610367357731, 0.10443096607923508, 0.014335783198475838, -0.04153332859277725, -0.021943489089608192, -0.07916077226400375, -0.04339015111327171, -0.01508296001702547, 0.05495458096265793, 0.003084958763793111, 0.07115310430526733, 0.019311100244522095, 0.05345528945326805, -0.0585881769657135, -0.01637938991189003, -0.020933378487825394, -0.0016792507376521826, 0.005788575857877731, 0.04280773550271988, 0.0018100504530593753, 0.011221455410122871, 0.0005491133779287338, 0.034979794174432755, 0.082961805164814, 0.0615646168589592, -0.01054865587502718, -0.013087965548038483, -0.012874726206064224, 0.005210823845118284, -0.05860396847128868, 0.04044242948293686, 0.016207300126552582, -0.01163962297141552, -0.0013669861946254969, -0.03401704505085945, 0.040842365473508835, -0.013916402123868465, -0.015702031552791595, -0.07318072021007538, 0.03155988082289696, -0.023989660665392876, 0.18956811726093292, 0.016140369698405266, 0.034812506288290024, -0.10218176245689392, 0.07345381379127502, 0.08959124982357025, 0.058293405920267105, -0.07767806947231293, -0.019713085144758224, -0.017946312204003334, -0.031161408871412277, -0.020234091207385063, -0.018929913640022278, 0.018674999475479126, -0.01147931907325983, -0.037740666419267654, 0.059682413935661316, -0.000054538922995561734, 0.007631540764123201, -0.1235010027885437, 0.07269120961427689, 0.009177373722195625, -0.0010574838379397988, 0.08063444495201111, 0.005510636139661074, -0.12173081189393997, -0.018933895975351334, -0.031006721779704094, -0.08902607858181, 0.022989550605416298, -0.07319667190313339, -0.04777468368411064, -0.03396313264966011, -0.04998449981212616, 0.01998617686331272, -0.0285878237336874, 0.051673777401447296, -0.03645170480012894, -0.04366631805896759, -0.0605606734752655, 0.11696983873844147, 0.033945146948099136, 0.00613858038559556, -0.0555773600935936, 0.04295048490166664, 0.008419625461101532, -0.0006255963817238808, 0.040839020162820816, 0.004710945766419172, 0.027930084615945816, 0.006506664212793112, 0.022078389301896095, -0.06239539757370949, 0.019696440547704697, 0.012463415041565895, 0.03421056643128395, 0.007211655844002962, -0.04443809762597084, -0.04739208146929741, 0.04472067579627037, 0.05972406268119812, 0.06301848590373993, 0.08067024499177933, 0.018392566591501236, 0.04529532417654991, -0.047629211097955704, -0.004300284199416637, 0.08825298398733139, -0.04741084203124046, -0.05682845413684845, 0.04881853237748146, -0.026031799614429474, 0.09915188699960709, 0.05672013387084007, 3.496867206981864e-33, -0.02402585558593273, 0.033382613211870193, -0.018273821100592613, 0.0614127553999424, -0.043904587626457214, -0.011407318525016308, -0.025773968547582626, 0.04653102159500122, -0.09094545990228653, -0.03789383918046951, -0.05826553329825401, -0.06141626089811325, -0.03155551478266716, 0.007433251012116671, -0.0030857541132718325, -0.05786558613181114, -0.031134866178035736, 0.05824178457260132, 0.08622263371944427, 0.06194385886192322, -0.06262005865573883, -0.04741276428103447, -0.03652804344892502, 0.026453373953700066, 0.058633968234062195, -0.02465944178402424, -0.006526796147227287, -0.06319671124219894, 0.005463303066790104, 0.009751498699188232, -0.02416159398853779, 0.018393509089946747, -0.03225259482860565, 0.030602755025029182, -0.026131100952625275, -0.01833055540919304, -0.07727260142564774, -0.0011072460329160094, -0.08174194395542145, 0.004323894158005714, 0.05113577842712402, -0.008307449519634247, -0.09152724593877792, 0.00410832604393363, -0.05907294526696205, -0.080326147377491, -0.07531457394361496, -0.014606362208724022, -0.013617118820548058, 0.054471325129270554, 0.005224030464887619, 0.008693086914718151, 0.057394396513700485, -0.03117767535150051, 0.016726965084671974, -0.06989311426877975, 0.020598439499735832, -0.028884952887892723, -0.0057940008118748665, -0.015476232394576073, 0.002484045922756195, -0.049402933567762375, 0.00006083230618969537, -0.0017059053061529994, 0.12207666784524918, 0.020280251279473305, -0.05199942737817764, 0.02624034695327282, 0.0028244485147297382, -0.028877606615424156, -0.08007707446813583, 0.042461130768060684, 0.010373957455158234, 0.02254227176308632, -0.019188139587640762, -0.08290014415979385, -0.039757270365953445, 0.03160085529088974, 0.00024422549176961184, 0.0886286199092865, -0.08770190179347992, 0.09233976900577545, -0.03442767634987831, -0.07879744470119476, -0.045648254454135895, 0.044424913823604584, 0.03481591120362282, -0.04275786504149437, -0.003027616534382105, 0.011230369098484516, -0.05244983360171318, 0.0238653551787138, 0.041710443794727325, 0.0391044020652771, -0.059282515197992325, -3.435187181684296e-33, 0.01650168187916279, 0.014704198576509953, -0.07636009156703949, 0.04270211234688759, 0.017851801589131355, 0.022379959002137184, 0.11214620620012283, 0.07773877680301666, -0.034560441970825195, -0.11124517768621445, -0.029763098806142807, -0.015139961615204811, 0.009273652918636799, -0.13432520627975464, -0.0629454106092453, -0.045531608164310455, 0.03515024483203888, -0.07455071806907654, -0.01531071774661541, -0.039909590035676956, -0.028211722150444984, 0.014828923158347607, 0.0430152453482151, 0.08771394193172455, 0.025954337790608406, 0.03572222217917442, 0.011983788572251797, 0.05110747739672661, -0.06131548061966896, -0.01581512950360775, 0.026898285374045372, -0.012978914193809032, -0.09522219002246857, -0.057813189923763275, 0.04059576615691185, -0.021801311522722244, 0.007158215623348951, 0.15958495438098907, 0.08551684767007828, 0.04327977076172829, 0.16702286899089813, 0.06260263919830322, -0.09078255295753479, 0.0699908509850502, -0.025480477139353752, 0.029398147016763687, 0.0018484356114640832, 0.03488319739699364, -0.07256149500608444, 0.02257392555475235, 0.022402800619602203, -0.05096004530787468, 0.03126326948404312, 0.06169874966144562, 0.09627943485975266, 0.04556632041931152, -0.006498826202005148, -0.014985157176852226, 0.011388220824301243, -0.07153996080160141, 0.0348929688334465, 0.025052079930901527, -0.046878524124622345, -0.05412625893950462, 0.05008689686655998, -0.05294618010520935, -0.014498522505164146, 0.04630265757441521, 0.002215649001300335, 0.025342654436826706, -0.06473017483949661, -0.0036721699871122837, 0.08171296864748001, 0.04959792643785477, 0.07074906677007675, 0.004122007638216019, -0.06088653579354286, -0.02026786468923092, -0.0651233121752739, 0.021662043407559395, -0.009459835477173328, 0.07958436012268066, -0.025191491469740868, 0.02071194350719452, 0.01697702147066593, 0.018706150352954865, -0.011786462739109993, 0.09570945799350739, 0.005326956044882536, -0.05338104069232941, -0.028442129492759705, -0.009609188884496689, 0.017881562933325768, 0.0077734715305268764, -0.005081252660602331, -4.720915924849578e-8, -0.01874510571360588, -0.10715343058109283, -0.014756277203559875, 0.010248593986034393, 0.008811692707240582, 0.03398570790886879, -0.024746371433138847, 0.013713791035115719, 0.10396184027194977, -0.012194047681987286, 0.008783918805420399, -0.019174795597791672, 0.008519047871232033, 0.005541848950088024, -0.07387333363294601, -0.08434337377548218, -0.011203516274690628, 0.014301657676696777, -0.028892556205391884, -0.05339081957936287, 0.01204609964042902, -0.07159183919429779, -0.028751760721206665, 0.03247738629579544, -0.0008357916376553476, -0.009086973965168, 0.02286447398364544, 0.057681530714035034, -0.03120981529355049, -0.13150693476200104, -0.06301061064004898, -0.025686627253890038, -0.03493752330541611, 0.01039357390254736, -0.05758820101618767, 0.06579618901014328, -0.06302099674940109, -0.038099512457847595, -0.022217832505702972, 0.06523820012807846, 0.07040587067604065, -0.07599025964736938, 0.03376253694295883, -0.0707727000117302, 0.03038426674902439, -0.014730522409081459, -0.018014229834079742, 0.06993447989225388, -0.02561214379966259, 0.06731349229812622, -0.036600176244974136, 0.009051409550011158, 0.01833350397646427, 0.07798992097377777, 0.10840000212192535, -0.08701776713132858, 0.08536486327648163, -0.047700945287942886, 0.044851817190647125, -0.002877880586311221, 0.02002086490392685, 0.05981242656707764, -0.03238431736826897, -0.010742888785898685 ]
0.083421
# Zalo Personal (unofficial) Status: experimental. This integration automates a \*\*personal Zalo account\*\* via `zca-cli`. > \*\*Warning:\*\* This is an unofficial integration and may result in account suspension/ban. Use at your own risk. ## Plugin required Zalo Personal ships as a plugin and is not bundled with the core install. - Install via CLI: `openclaw plugins install @openclaw/zalouser` - Or from a source checkout: `openclaw plugins install ./extensions/zalouser` - Details: [Plugins](/plugin) ## Prerequisite: zca-cli The Gateway machine must have the `zca` binary available in `PATH`. - Verify: `zca --version` - If missing, install zca-cli (see `extensions/zalouser/README.md` or the upstream zca-cli docs). ## Quick setup (beginner) 1. Install the plugin (see above). 2. Login (QR, on the Gateway machine): - `openclaw channels login --channel zalouser` - Scan the QR code in the terminal with the Zalo mobile app. 3. Enable the channel: ```json5 { channels: { zalouser: { enabled: true, dmPolicy: "pairing", }, }, } ``` 4. Restart the Gateway (or finish onboarding). 5. DM access defaults to pairing; approve the pairing code on first contact. ## What it is - Uses `zca listen` to receive inbound messages. - Uses `zca msg ...` to send replies (text/media/link). - Designed for β€œpersonal account” use cases where Zalo Bot API is not available. ## Naming Channel id is `zalouser` to make it explicit this automates a \*\*personal Zalo user account\*\* (unofficial). We keep `zalo` reserved for a potential future official Zalo API integration. ## Finding IDs (directory) Use the directory CLI to discover peers/groups and their IDs: ```bash openclaw directory self --channel zalouser openclaw directory peers list --channel zalouser --query "name" openclaw directory groups list --channel zalouser --query "work" ``` ## Limits - Outbound text is chunked to ~2000 characters (Zalo client limits). - Streaming is blocked by default. ## Access control (DMs) `channels.zalouser.dmPolicy` supports: `pairing | allowlist | open | disabled` (default: `pairing`). `channels.zalouser.allowFrom` accepts user IDs or names. The wizard resolves names to IDs via `zca friend find` when available. Approve via: - `openclaw pairing list zalouser` - `openclaw pairing approve zalouser ```` ` ## Group access (optional) - Default: `channels.zalouser.groupPolicy = "open"` (groups allowed). Use `channels.defaults.groupPolicy` to override the default when unset. - Restrict to an allowlist with: - `channels.zalouser.groupPolicy = "allowlist"` - `channels.zalouser.groups` (keys are group IDs or names) - Block all groups: `channels.zalouser.groupPolicy = "disabled"`. - The configure wizard can prompt for group allowlists. - On startup, OpenClaw resolves group/user names in allowlists to IDs and logs the mapping; unresolved entries are kept as typed. Example: ```json5 { channels: { zalouser: { groupPolicy: "allowlist", groups: { "123456789": { allow: true }, "Work Chat": { allow: true }, }, }, }, } ``` ## Multi-account Accounts map to zca profiles. Example: ```json5 { channels: { zalouser: { enabled: true, defaultAccount: "default", accounts: { work: { enabled: true, profile: "work" }, }, }, }, } ``` ## Troubleshooting **`zca` not found:** - Install zca-cli and ensure it’s on `PATH` for the Gateway process. **Login doesn’t stick:** - `openclaw channels status --probe` - Re-login: `openclaw channels logout --channel zalouser && openclaw channels login --channel zalouser` ````
https://github.com/openclaw/openclaw/blob/main//docs/channels/zalouser.md
main
opebclaw
[ -0.08897373825311661, 0.02329140156507492, -0.1003023311495781, 0.03889769688248634, -0.042190227657556534, -0.10765101760625839, 0.06930484622716904, 0.009903405793011189, -0.038946446031332016, 0.0025957413017749786, 0.0595516562461853, -0.01691700518131256, 0.09901870787143707, 0.0526825375854969, 0.037596508860588074, 0.021003473550081253, 0.07368901371955872, -0.08060736209154129, 0.025213181972503662, 0.01898110844194889, -0.012340464629232883, -0.010134875774383545, -0.008099924772977829, -0.0327129028737545, -0.08617489784955978, -0.06672981381416321, 0.016388198360800743, 0.10239031910896301, -0.02660602703690529, -0.0078726252540946, 0.035067200660705566, 0.05449066683650017, -0.048454418778419495, -0.04471899941563606, 0.05388979986310005, -0.0520421601831913, 0.07023138552904129, 0.0529123991727829, -0.04230089858174324, -0.08781760185956955, 0.10260502249002457, -0.0029845850076526403, -0.009617437608540058, 0.0038073405157774687, -0.020679926499724388, -0.01666194386780262, 0.03324839845299721, -0.07738705724477768, -0.04229167103767395, -0.03148652985692024, -0.043271299451589584, -0.0859564021229744, 0.01962137036025524, 0.055387672036886215, 0.030089618638157845, 0.0328635647892952, -0.009956132620573044, -0.042811423540115356, 0.01741367019712925, -0.03922519460320473, -0.007725213188678026, -0.026956524699926376, -0.06573191285133362, 0.04354763403534889, -0.07550205290317535, 0.026655513793230057, -0.012776372022926807, -0.02914980798959732, -0.05719431862235069, 0.011398821137845516, -0.03491834178566933, -0.05080142989754677, -0.05453339219093323, -0.0000030648002393718343, 0.014397497288882732, -0.008732532151043415, 0.08677076548337936, -0.04356977343559265, -0.06995926052331924, -0.041450757533311844, -0.0005414961487986147, -0.01785188540816307, 0.038016606122255325, 0.013137881644070148, 0.04548802971839905, 0.0903603807091713, 0.017825014889240265, -0.010720709338784218, -0.005399385932832956, -0.003920272924005985, 0.07533469796180725, -0.013491978868842125, 0.05655645206570625, -0.032619211822748184, -0.03274344280362129, -0.03245334327220917, 0.013303844258189201, -0.052114445716142654, -0.04947863519191742, 0.08121196925640106, 0.023501381278038025, -0.043066080659627914, 0.1070220023393631, -0.008832582272589207, -0.03372202813625336, 0.1001511812210083, 0.0814313143491745, 0.0753108337521553, -0.03236749395728111, 0.0825834721326828, -0.06664378196001053, -0.029423987492918968, 0.03111198917031288, -0.07148469239473343, -0.04284302517771721, 0.0893464982509613, -0.019398298114538193, 0.03099020943045616, -0.027223840355873108, 0.030599428340792656, 0.0032194601371884346, 0.01237975899130106, -0.015977153554558754, 0.001370173180475831, 0.06790633499622345, 0.09963005781173706, -0.017155373468995094, 4.215837755511177e-33, -0.0026100603863596916, 0.06813910603523254, -0.1250903159379959, -0.00930565595626831, 0.07183106243610382, 0.026851221919059753, 0.05415086820721626, 0.03751528263092041, -0.10561440140008926, 0.052935823798179626, 0.011883804574608803, -0.028967278078198433, 0.02885398268699646, 0.017744144424796104, -0.026958143338561058, 0.035902656614780426, -0.021105652675032616, 0.0031848112121224403, 0.05924750119447708, 0.029563521966338158, 0.08581413328647614, -0.0760430321097374, -0.023292718455195427, -0.05917844921350479, 0.04113594442605972, 0.11976014822721481, -0.01285599172115326, -0.053796812891960144, 0.014242955483496189, 0.0026766990777105093, 0.08524002879858017, 0.019300300627946854, -0.033195801079273224, 0.02793153189122677, -0.03562084212899208, -0.003160535590723157, -0.09692464768886566, -0.06112057715654373, -0.03294944763183594, -0.07844243943691254, -0.04651582986116409, 0.007392949424684048, -0.0872688740491867, -0.003763239597901702, -0.02815845236182213, -0.04961301386356354, 0.01427107397466898, 0.04457135871052742, 0.11187022924423218, -0.03425094485282898, -0.06287020444869995, -0.023182732984423637, -0.09769728034734726, 0.07601463794708252, -0.08596576750278473, 0.03215106204152107, -0.06367295980453491, 0.009426852688193321, 0.09093333035707474, -0.06707414239645004, 0.06488997489213943, 0.03453580662608147, -0.025684677064418793, 0.05403672158718109, 0.054623834788799286, -0.029917018488049507, -0.008670521900057793, -0.0060446541756391525, -0.052128247916698456, 0.055701591074466705, -0.05634919926524162, -0.03260336071252823, 0.002812364138662815, 0.05393243208527565, -0.0006779070827178657, -0.0713435485959053, -0.00028029619716107845, 0.01412433572113514, 0.03547195717692375, 0.013787775300443172, -0.017551932483911514, -0.025624632835388184, 0.019274981692433357, 0.03841926157474518, 0.0066668190993368626, 0.04193524271249771, 0.05132634565234184, 0.0452190563082695, -0.011719128116965294, 0.0131450230255723, 0.033077970147132874, -0.031834181398153305, 0.02743353508412838, 0.01286092959344387, -0.10177163034677505, -4.2981109724672136e-33, -0.03200991079211235, 0.006888887379318476, -0.017049282789230347, -0.00963657908141613, 0.04805523529648781, -0.03332946449518204, -0.002605170477181673, -0.0579913891851902, -0.051392506808042526, -0.044508468359708786, 0.020347576588392258, 0.12433779984712601, 0.0942092314362526, -0.08763774484395981, 0.08842039108276367, -0.0546998493373394, -0.04210994392633438, -0.04073512926697731, 0.008920648135244846, -0.005446377210319042, -0.022108301520347595, 0.02175111137330532, -0.04144533351063728, -0.07577499002218246, -0.01974070630967617, -0.027315979823470116, 0.08190067857503891, 0.04628540575504303, 0.05482494831085205, 0.051447875797748566, -0.06889818608760834, 0.028051335364580154, -0.093206487596035, -0.08007825911045074, -0.0023956606164574623, -0.0007099966169334948, -0.07137712836265564, 0.07188954204320908, -0.02431078627705574, -0.0028810256626456976, 0.03500930219888687, 0.041944365948438644, -0.06831840425729752, 0.016826985403895378, 0.026574328541755676, 0.03258168324828148, -0.03287966921925545, -0.08859634399414062, -0.015263274312019348, 0.0013569883303716779, 0.00016287900507450104, 0.03828053921461105, 0.007393311243504286, 0.10016955435276031, 0.06455386430025101, 0.07903116196393967, 0.13976739346981049, -0.04370073974132538, -0.0126406354829669, -0.11836718767881393, -0.04031069949269295, -0.044895295053720474, 0.012667369097471237, 0.02020256407558918, 0.0489739328622818, 0.006450726184993982, 0.024226928129792213, 0.011508687399327755, -0.04692212864756584, 0.012012799270451069, -0.02438993565738201, -0.00377979245968163, 0.01134268008172512, -0.04633009061217308, -0.007058573886752129, -0.016252344474196434, -0.028732607141137123, 0.008876691572368145, -0.015636811032891273, -0.01597275584936142, 0.03184550255537033, -0.03562849760055542, 0.0529746450483799, -0.02457534335553646, -0.009704392403364182, -0.10045110434293747, -0.02392185479402542, 0.08508144319057465, 0.08110354095697403, -0.018979428336024284, -0.034692324697971344, -0.04797068238258362, -0.0021963180042803288, -0.0008923643035814166, -0.06373275071382523, -4.918699048062081e-8, -0.06013379991054535, -0.06400944292545319, -0.0648079663515091, 0.07317798584699631, 0.009546210058033466, 0.002472660504281521, 0.01736980862915516, -0.05189155787229538, -0.09141005575656891, 0.049618687480688095, 0.08330895751714706, 0.020531605929136276, 0.003644450567662716, 0.06674455106258392, -0.030605681240558624, 0.09496573358774185, 0.027810074388980865, 0.033534761518239975, 0.0003254972107242793, -0.01420481689274311, -0.07948264479637146, -0.014544923789799213, 0.009599943645298481, 0.021089287474751472, -0.0024338571820408106, 0.04956787824630737, -0.019813628867268562, -0.011326516978442669, -0.0032419816125184298, -0.07572215795516968, -0.09060292690992355, 0.02805129624903202, 0.10755990445613861, -0.021071547642350197, -0.0608811229467392, 0.05795848369598389, -0.050115540623664856, 0.02231702022254467, -0.00740695558488369, -0.015811501070857048, 0.06706294417381287, 0.014723804779350758, 0.030625859275460243, -0.016162626445293427, -0.037887006998062134, -0.01191854290664196, -0.050474293529987335, -0.08800029009580612, 0.05990155413746834, 0.07163599878549576, 0.03850292041897774, -0.01899496652185917, 0.0847008228302002, 0.09854090213775635, 0.0662015974521637, 0.050347719341516495, -0.0062290970236063, -0.07780448347330093, 0.011195280589163303, 0.05744399130344391, 0.04903636872768402, 0.020017379894852638, 0.02394997701048851, -0.09010619670152664 ]
0.120837
# Telegram (Bot API) Status: production-ready for bot DMs + groups via grammY. Long-polling by default; webhook optional. ## Quick setup (beginner) 1. Create a bot with \*\*@BotFather\*\* ([direct link](https://t.me/BotFather)). Confirm the handle is exactly `@BotFather`, then copy the token. 2. Set the token: - Env: `TELEGRAM\_BOT\_TOKEN=...` - Or config: `channels.telegram.botToken: "..."`. - If both are set, config takes precedence (env fallback is default-account only). 3. Start the gateway. 4. DM access is pairing by default; approve the pairing code on first contact. Minimal config: ```json5 { channels: { telegram: { enabled: true, botToken: "123:abc", dmPolicy: "pairing", }, }, } ``` ## What it is - A Telegram Bot API channel owned by the Gateway. - Deterministic routing: replies go back to Telegram; the model never chooses channels. - DMs share the agent's main session; groups stay isolated (`agent::telegram:group:`). ## Setup (fast path) ### 1) Create a bot token (BotFather) 1. Open Telegram and chat with \*\*@BotFather\*\* ([direct link](https://t.me/BotFather)). Confirm the handle is exactly `@BotFather`. 2. Run `/newbot`, then follow the prompts (name + username ending in `bot`). 3. Copy the token and store it safely. Optional BotFather settings: - `/setjoingroups` β€” allow/deny adding the bot to groups. - `/setprivacy` β€” control whether the bot sees all group messages. ### 2) Configure the token (env or config) Example: ```json5 { channels: { telegram: { enabled: true, botToken: "123:abc", dmPolicy: "pairing", groups: { "\*": { requireMention: true } }, }, }, } ``` Env option: `TELEGRAM\_BOT\_TOKEN=...` (works for the default account). If both env and config are set, config takes precedence. Multi-account support: use `channels.telegram.accounts` with per-account tokens and optional `name`. See [`gateway/configuration`](/gateway/configuration#telegramaccounts--discordaccounts--slackaccounts--signalaccounts--imessageaccounts) for the shared pattern. 3. Start the gateway. Telegram starts when a token is resolved (config first, env fallback). 4. DM access defaults to pairing. Approve the code when the bot is first contacted. 5. For groups: add the bot, decide privacy/admin behavior (below), then set `channels.telegram.groups` to control mention gating + allowlists. ## Token + privacy + permissions (Telegram side) ### Token creation (BotFather) - `/newbot` creates the bot and returns the token (keep it secret). - If a token leaks, revoke/regenerate it via @BotFather and update your config. ### Group message visibility (Privacy Mode) Telegram bots default to \*\*Privacy Mode\*\*, which limits which group messages they receive. If your bot must see \_all\_ group messages, you have two options: - Disable privacy mode with `/setprivacy` \*\*or\*\* - Add the bot as a group \*\*admin\*\* (admin bots receive all messages). \*\*Note:\*\* When you toggle privacy mode, Telegram requires removing + re‑adding the bot to each group for the change to take effect. ### Group permissions (admin rights) Admin status is set inside the group (Telegram UI). Admin bots always receive all group messages, so use admin if you need full visibility. ## How it works (behavior) - Inbound messages are normalized into the shared channel envelope with reply context and media placeholders. - Group replies require a mention by default (native @mention or `agents.list[].groupChat.mentionPatterns` / `messages.groupChat.mentionPatterns`). - Multi-agent override: set per-agent patterns on `agents.list[].groupChat.mentionPatterns`. - Replies always route back to the same Telegram chat. - Long-polling uses grammY runner with per-chat sequencing; overall concurrency is capped by `agents.defaults.maxConcurrent`. - Telegram Bot API does not support read receipts; there is no `sendReadReceipts` option. ## Draft streaming OpenClaw can stream partial replies in Telegram DMs using `sendMessageDraft`. Requirements: - Threaded Mode enabled for the bot in @BotFather (forum topic mode). - Private chat threads only (Telegram includes `message\_thread\_id` on inbound messages). - `channels.telegram.streamMode` not set to `"off"` (default: `"partial"`, `"block"` enables chunked draft updates). Draft streaming is DM-only; Telegram
https://github.com/openclaw/openclaw/blob/main//docs/channels/telegram.md
main
opebclaw
[ -0.07689407467842102, -0.010172652080655098, 0.052017126232385635, -0.003951832186430693, -0.037139955908060074, -0.06360377371311188, -0.019753742963075638, -0.021740863099694252, 0.008262617513537407, 0.08065922558307648, 0.0034167326521128416, -0.0522182360291481, -0.03638661652803421, 0.03196142241358757, 0.13526570796966553, 0.05365125462412834, -0.011935960501432419, -0.07260888814926147, -0.04342963919043541, -0.05881078541278839, 0.029187891632318497, -0.03936227783560753, -0.021951869130134583, -0.007367030717432499, 0.00981688592582941, -0.08774692565202713, -0.048757344484329224, 0.06637594848871231, -0.01719624549150467, -0.012795396149158478, 0.042752705514431, -0.005964691285043955, -0.06401035189628601, -0.0219923984259367, -0.04568297043442726, 0.1003914326429367, 0.029209069907665253, -0.004273256752640009, 0.08962643146514893, 0.04538356885313988, 0.04579908773303032, -0.03735573962330818, -0.05104505270719528, -0.02848368138074875, 0.02152414806187153, 0.0174820926040411, -0.037142496556043625, 0.0688629299402237, -0.034262120723724365, 0.033765602856874466, 0.015556682832539082, -0.04516978561878204, 0.03707887977361679, 0.02445097826421261, -0.039250701665878296, 0.03429504856467247, -0.01659461297094822, 0.11063636094331741, 0.06044146046042442, -0.030201584100723267, 0.013960035517811775, -0.05459414795041084, 0.022781357169151306, -0.046030666679143906, -0.07329659163951874, -0.028645377606153488, -0.0038500146474689245, 0.062077682465314865, 0.038372885435819626, 0.025419076904654503, 0.07116646319627762, -0.005642291158437729, -0.04103661701083183, -0.031493235379457474, -0.020308496430516243, -0.0029889075085520744, 0.05060199275612831, 0.032331015914678574, -0.057663388550281525, -0.0729399248957634, -0.0010975042823702097, 0.06741499900817871, 0.0422508530318737, 0.007401241920888424, -0.0315457321703434, 0.04535645991563797, -0.024009613320231438, -0.035448674112558365, -0.05860798805952072, 0.015039646998047829, 0.04256711155176163, -0.02759777009487152, -0.036720141768455505, -0.007757204119116068, 0.04258471354842186, 0.06369223445653915, -0.029287189245224, -0.011825394816696644, -0.05253422632813454, 0.0888821929693222, -0.01567348651587963, -0.025968192145228386, -0.05374786630272865, 0.008953959681093693, 0.09279999136924744, -0.03647380694746971, 0.010188882239162922, 0.015336340293288231, 0.1348417103290558, 0.01846754178404808, -0.016931308433413506, -0.004253731574863195, 0.036487262696027756, 0.07854356616735458, -0.05644065514206886, 0.0684058666229248, 0.03763621300458908, 0.047739509493112564, 0.07790472358465195, -0.0013856359291821718, 0.06080988422036171, -0.07607705891132355, 0.04748334735631943, -0.03271495923399925, -0.025699302554130554, 0.07313017547130585, 0.08723954111337662, 4.09731853758952e-33, 0.05302020162343979, 0.05058145895600319, -0.06984006613492966, 0.03182591497898102, -0.027309421449899673, -0.01887425221502781, -0.02815607190132141, -0.010667210444808006, -0.08731497079133987, -0.06239110231399536, -0.06880105286836624, -0.0015387068269774318, 0.024941371753811836, -0.020886866375803947, -0.10900859534740448, -0.06279872357845306, 0.011929466389119625, -0.04241151735186577, 0.0480189211666584, 0.001893157372251153, 0.013341209851205349, 0.001981826964765787, -0.01465022936463356, 0.03736719489097595, 0.008515791967511177, 0.083589106798172, 0.0061904052272439, -0.012740520760416985, 0.058089729398489, 0.033287353813648224, -0.060868844389915466, -0.02022319845855236, 0.011951413936913013, 0.036633022129535675, 0.018547741696238518, -0.02488800510764122, -0.06063307449221611, -0.004452682565897703, -0.05634213611483574, -0.09020645916461945, -0.01862402819097042, -0.037377044558525085, -0.094719298183918, -0.08807161450386047, -0.049592792987823486, 0.005362885072827339, -0.036873456090688705, -0.039354849606752396, 0.04842475429177284, -0.0066979932598769665, -0.06140972301363945, 0.007333853282034397, 0.005449505057185888, -0.017631541937589645, 0.06328421086072922, -0.11067758500576019, -0.039948780089616776, -0.07729832828044891, -0.04322731867432594, -0.06442626565694809, 0.05438007786870003, 0.018526170402765274, 0.006998026743531227, 0.013571495190262794, 0.051831554621458054, 0.029620708897709846, -0.03430316224694252, 0.029838193207979202, 0.03444897383451462, -0.05886205658316612, -0.021567327901721, 0.06990744173526764, -0.03751220181584358, 0.06682193279266357, -0.11279815435409546, -0.04558311775326729, 0.07244451344013214, 0.05920914560556412, 0.013921343721449375, 0.028406377881765366, 0.001137812389060855, -0.003297470510005951, 0.018683651462197304, -0.006483542267233133, 0.04364440217614174, 0.04463883861899376, 0.06495831906795502, -0.09306453913450241, 0.003002003999426961, 0.10024317353963852, -0.0748901292681694, 0.12167441099882126, -0.007178618106991053, 0.058582741767168045, -0.06672394275665283, -4.2307562481910504e-33, -0.02638780139386654, 0.026781413704156876, 0.04240620136260986, 0.007879835553467274, 0.005156007595360279, -0.011169563047587872, 0.055526863783597946, 0.007008234038949013, 0.03725495934486389, 0.09472426772117615, 0.010570069774985313, -0.06413473188877106, 0.010173250921070576, -0.06708499044179916, 0.05820861831307411, -0.011421742849051952, -0.08048880100250244, -0.010168470442295074, 0.07262002676725388, 0.02318449504673481, 0.03836474567651749, 0.022152801975607872, -0.07859063148498535, 0.07380747050046921, 0.024928128346800804, -0.019136743620038033, 0.031118135899305344, 0.01920623891055584, 0.003924739547073841, -0.0808674693107605, 0.07738451659679413, -0.034786343574523926, -0.04492880776524544, -0.008924740366637707, 0.03807855397462845, -0.004893315955996513, -0.01661502756178379, 0.17194043099880219, -0.00914609432220459, -0.017170533537864685, 0.10658156871795654, -0.01304993499070406, -0.09412366896867752, 0.03834967315196991, -0.0002609214570838958, 0.013696055859327316, -0.0030832081101834774, 0.023946404457092285, -0.15879397094249725, 0.04074617475271225, 0.07499033212661743, -0.005878275725990534, 0.04421139881014824, 0.0372173897922039, -0.07441933453083038, -0.02031511254608631, 0.11383991688489914, 0.02166273444890976, -0.03137650340795517, 0.03322039917111397, -0.008327933959662914, -0.1723889410495758, 0.044862423092126846, 0.0677073672413826, 0.047547582536935806, -0.02706097438931465, 0.02844086103141308, 0.08429976552724838, 0.011254468932747841, 0.0336875356733799, 0.0364510603249073, -0.06065087765455246, 0.007595933508127928, -0.04454673454165459, 0.07990186661481857, -0.030011480674147606, -0.12142115831375122, -0.059892214834690094, 0.0030208397656679153, 0.006959107238799334, -0.08605562895536423, 0.09193410724401474, 0.026835188269615173, 0.025622358545660973, 0.0013650651089847088, 0.014165796339511871, 0.09004539251327515, 0.10562857240438461, -0.02026650682091713, 0.026618488132953644, 0.02813274785876274, -0.03555695340037346, 0.03506069630384445, 0.03578057885169983, 0.013987354934215546, -5.644415423944338e-8, 0.02275637350976467, -0.028673509135842323, -0.052572447806596756, 0.009051676839590073, -0.05532357841730118, 0.040238454937934875, -0.004559734836220741, -0.08235423266887665, 0.017392108216881752, -0.0027768209110945463, -0.018391963094472885, 0.06756868213415146, -0.06447581201791763, -0.02553987130522728, -0.033896759152412415, -0.014474660158157349, -0.13547688722610474, -0.03901044651865959, -0.01080077514052391, -0.005647809244692326, 0.011558683589100838, -0.02349763549864292, -0.026543812826275826, -0.021330654621124268, 0.0019105782266706228, -0.036581892520189285, 0.06527061760425568, 0.06137312203645706, -0.08149095624685287, -0.0659017562866211, -0.09763898700475693, -0.014340556226670742, -0.047786321491003036, -0.035081904381513596, -0.08655573427677155, 0.025373827666044235, -0.10262241214513779, -0.007861328311264515, 0.010614754632115364, 0.017985904589295387, 0.045110926032066345, 0.003886778373271227, -0.04899434372782707, 0.005070850718766451, -0.007039164192974567, -0.00401008315384388, 0.02303379774093628, -0.03511480242013931, 0.051673464477062225, 0.021978534758090973, -0.04487793892621994, -0.0014304171781986952, 0.09232722967863083, 0.0028562783263623714, -0.013993113301694393, 0.009776545688509941, 0.0006645607645623386, 0.007891449145972729, -0.0002047316520474851, -0.043430693447589874, 0.07155176997184753, 0.0029176995158195496, -0.03294433280825615, -0.06255053728818893 ]
0.065534
stream partial replies in Telegram DMs using `sendMessageDraft`. Requirements: - Threaded Mode enabled for the bot in @BotFather (forum topic mode). - Private chat threads only (Telegram includes `message\_thread\_id` on inbound messages). - `channels.telegram.streamMode` not set to `"off"` (default: `"partial"`, `"block"` enables chunked draft updates). Draft streaming is DM-only; Telegram does not support it in groups or channels. ## Formatting (Telegram HTML) - Outbound Telegram text uses `parse\_mode: "HTML"` (Telegram’s supported tag subset). - Markdown-ish input is rendered into \*\*Telegram-safe HTML\*\* (bold/italic/strike/code/links); block elements are flattened to text with newlines/bullets. - Raw HTML from models is escaped to avoid Telegram parse errors. - If Telegram rejects the HTML payload, OpenClaw retries the same message as plain text. ## Commands (native + custom) OpenClaw registers native commands (like `/status`, `/reset`, `/model`) with Telegram’s bot menu on startup. You can add custom commands to the menu via config: ```json5 { channels: { telegram: { customCommands: [ { command: "backup", description: "Git backup" }, { command: "generate", description: "Create an image" }, ], }, }, } ``` ## Troubleshooting - `setMyCommands failed` in logs usually means outbound HTTPS/DNS is blocked to `api.telegram.org`. - If you see `sendMessage` or `sendChatAction` failures, check IPv6 routing and DNS. More help: [Channel troubleshooting](/channels/troubleshooting). Notes: - Custom commands are \*\*menu entries only\*\*; OpenClaw does not implement them unless you handle them elsewhere. - Command names are normalized (leading `/` stripped, lowercased) and must match `a-z`, `0-9`, `\_` (1–32 chars). - Custom commands \*\*cannot override native commands\*\*. Conflicts are ignored and logged. - If `commands.native` is disabled, only custom commands are registered (or cleared if none). ## Limits - Outbound text is chunked to `channels.telegram.textChunkLimit` (default 4000). - Optional newline chunking: set `channels.telegram.chunkMode="newline"` to split on blank lines (paragraph boundaries) before length chunking. - Media downloads/uploads are capped by `channels.telegram.mediaMaxMb` (default 5). - Telegram Bot API requests time out after `channels.telegram.timeoutSeconds` (default 500 via grammY). Set lower to avoid long hangs. - Group history context uses `channels.telegram.historyLimit` (or `channels.telegram.accounts.\*.historyLimit`), falling back to `messages.groupChat.historyLimit`. Set `0` to disable (default 50). - DM history can be limited with `channels.telegram.dmHistoryLimit` (user turns). Per-user overrides: `channels.telegram.dms[""].historyLimit`. ## Group activation modes By default, the bot only responds to mentions in groups (`@botname` or patterns in `agents.list[].groupChat.mentionPatterns`). To change this behavior: ### Via config (recommended) ```json5 { channels: { telegram: { groups: { "-1001234567890": { requireMention: false }, // always respond in this group }, }, }, } ``` \*\*Important:\*\* Setting `channels.telegram.groups` creates an \*\*allowlist\*\* - only listed groups (or `"\*"`) will be accepted. Forum topics inherit their parent group config (allowFrom, requireMention, skills, prompts) unless you add per-topic overrides under `channels.telegram.groups..topics.`. To allow all groups with always-respond: ```json5 { channels: { telegram: { groups: { "\*": { requireMention: false }, // all groups, always respond }, }, }, } ``` To keep mention-only for all groups (default behavior): ```json5 { channels: { telegram: { groups: { "\*": { requireMention: true }, // or omit groups entirely }, }, }, } ``` ### Via command (session-level) Send in the group: - `/activation always` - respond to all messages - `/activation mention` - require mentions (default) \*\*Note:\*\* Commands update session state only. For persistent behavior across restarts, use config. ### Getting the group chat ID Forward any message from the group to `@userinfobot` or `@getidsbot` on Telegram to see the chat ID (negative number like `-1001234567890`). \*\*Tip:\*\* For your own user ID, DM the bot and it will reply with your user ID (pairing message), or use `/whoami` once commands are enabled. \*\*Privacy note:\*\* `@userinfobot` is a third-party bot. If you prefer, add the bot to
https://github.com/openclaw/openclaw/blob/main//docs/channels/telegram.md
main
opebclaw
[ -0.02649189531803131, -0.0055556767620146275, 0.04433392733335495, 0.041401173919439316, 0.05237976834177971, -0.08030609041452408, -0.02248426154255867, -0.030665472149848938, 0.04025998339056969, 0.04545031115412712, -0.03419726341962814, -0.021584035828709602, -0.0018745115958154202, 0.023051412776112556, 0.08397648483514786, 0.05148140713572502, 0.07950401306152344, -0.10324260592460632, -0.03825589269399643, 0.004041906446218491, 0.01882815547287464, 0.055344607681035995, 0.009779510088264942, 0.06456219404935837, 0.037917304784059525, -0.0007677004905417562, -0.049957871437072754, 0.03540834039449692, -0.01818288303911686, -0.005736286751925945, 0.044908005744218826, -0.04665444418787956, -0.03784003481268883, 0.007285516243427992, -0.012679075822234154, 0.10665979236364365, 0.009851871989667416, -0.008704321458935738, 0.014182819053530693, 0.0018854094669222832, -0.017273295670747757, -0.019719241186976433, -0.07184528559446335, 0.029146768152713776, -0.019981974735856056, -0.010807248763740063, -0.035124704241752625, 0.0179633516818285, -0.07617371529340744, 0.02718663401901722, -0.06948941200971603, -0.03396637365221977, 0.005794250871986151, 0.08299984037876129, 0.013527820818126202, 0.024304848164319992, -0.018390486016869545, 0.04731195792555809, 0.027983950451016426, -0.07275205105543137, -0.02131492644548416, -0.062495939433574677, -0.03522578254342079, -0.02802414633333683, -0.03687630966305733, -0.01880934275686741, -0.010362477041780949, 0.07374241203069687, -0.04230539873242378, -0.009426970966160297, 0.014301090501248837, 0.002492033177986741, -0.041385769844055176, 0.015018363483250141, 0.007040208671241999, -0.012511798180639744, 0.07892627269029617, 0.05232248455286026, -0.12076791375875473, -0.05837893858551979, -0.017527226358652115, -0.008927954360842705, 0.010457411408424377, -0.016597930341959, 0.0027638236060738564, 0.0823315903544426, 0.022628342732787132, 0.0021076907869428396, -0.025767866522073746, 0.05671093612909317, -0.011148393154144287, -0.022461578249931335, 0.03783399239182472, 0.04494287073612213, 0.016024088487029076, 0.0024768789298832417, 0.011582738719880581, 0.038920991122722626, -0.03073352761566639, 0.07201782613992691, 0.09186796098947525, -0.038168951869010925, -0.032404035329818726, -0.07263047993183136, 0.031791429966688156, -0.01916682906448841, 0.03590366616845131, 0.07967891544103622, 0.017015907913446426, -0.05822083353996277, 0.012780880555510521, 0.019292209297418594, 0.06918266415596008, -0.009160061366856098, 0.025840679183602333, -0.0467817485332489, 0.07394144684076309, -0.039004433900117874, 0.07259569317102432, 0.06617636233568192, 0.06456533074378967, -0.08403459191322327, -0.053903255611658096, 0.030014866963028908, 0.06416430324316025, 0.06477219611406326, 0.12444530427455902, 4.3060051517169545e-33, 0.08994854986667633, -0.00765750277787447, -0.10306330770254135, 0.07274451851844788, 0.004895003978163004, 0.08503420650959015, -0.03247890621423721, -0.036154214292764664, -0.05814826861023903, -0.0669129490852356, -0.058443620800971985, -0.0926051139831543, 0.011251159012317657, 0.03836800158023834, -0.03484926372766495, -0.07495326548814774, -0.027917882427573204, 0.01017223484814167, -0.007479474879801273, 0.002219921676442027, -0.04000779613852501, -0.006326776929199696, -0.06210288032889366, 0.0017470032908022404, -0.01070663332939148, 0.07872340083122253, 0.025092096999287605, -0.07907163351774216, -0.04797503352165222, 0.024329813197255135, -0.04876795411109924, 0.025635547935962677, 0.016519324854016304, 0.043306320905685425, 0.043961696326732635, -0.01391624752432108, -0.07314909249544144, -0.014487060718238354, -0.07000023871660233, -0.028947511687874794, -0.01527084968984127, 0.001282426412217319, -0.044359855353832245, -0.06897682696580887, -0.03713765740394592, -0.05857846513390541, -0.0572618693113327, 0.005464107263833284, -0.05599042773246765, -0.07755368947982788, 0.056368499994277954, 0.05397994816303253, 0.05015760660171509, -0.05965093523263931, 0.02082202397286892, -0.05729398876428604, -0.03761919587850571, -0.06371507048606873, 0.02364126592874527, 0.056319043040275574, -0.00374315632507205, 0.019066087901592255, 0.026901738718152046, -0.05475195497274399, 0.024053284898400307, 0.02596030756831169, 0.0314033143222332, 0.06497177481651306, 0.020969685167074203, -0.06981678307056427, -0.07164119184017181, 0.010799952782690525, -0.012715031392872334, 0.12575170397758484, -0.08469991385936737, -0.043003879487514496, -0.01419135183095932, -0.008781060576438904, 0.07443839311599731, -0.006370949558913708, -0.011183615773916245, -0.03877658024430275, 0.018892526626586914, -0.0421048104763031, 0.049082253128290176, 0.006166514009237289, 0.016931623220443726, -0.12061458826065063, 0.0021086158230900764, 0.09227707982063293, -0.09636490792036057, 0.035628899931907654, -0.01689032092690468, -0.04775094613432884, 0.006434899289160967, -3.904203550190634e-33, -0.01309901848435402, 0.049727171659469604, -0.12428697943687439, 0.03811557590961456, -0.017028355970978737, 0.002269317163154483, 0.05203558877110481, 0.09892203658819199, 0.03607875481247902, -0.018857639282941818, -0.01589938811957836, -0.027626056224107742, -0.10579986125230789, -0.008862742222845554, -0.0034679481759667397, -0.045665230602025986, -0.01780560426414013, -0.04995091259479523, 0.022518077865242958, -0.03271893411874771, -0.021951481699943542, -0.07837913185358047, -0.07003182172775269, 0.10591929405927658, 0.04241675138473511, 0.004851802717894316, -0.027887234464287758, 0.06635642051696777, 0.10548524558544159, -0.07361744344234467, 0.09201249480247498, 0.04302859306335449, -0.036806292831897736, -0.021851077675819397, 0.005775765981525183, 0.01607421785593033, 0.023407964035868645, 0.07679549604654312, 0.03795665130019188, 0.07504468411207199, 0.1259024441242218, 0.012353869155049324, -0.03944811597466469, 0.07308539003133774, -0.00524886604398489, 0.008326905779540539, -0.08402760326862335, -0.02731890231370926, -0.12192614376544952, 0.05883165821433067, 0.06963285803794861, -0.07478828728199005, 0.09094052016735077, 0.04645586758852005, -0.010525553487241268, -0.09229397773742676, 0.03908872604370117, -0.019913969561457634, -0.033147841691970825, -0.04714630916714668, -0.010966762900352478, -0.06430284678936005, 0.048245593905448914, -0.050774700939655304, 0.1111333817243576, -0.015744062140583992, 0.0625118613243103, 0.03310365602374077, -0.038533806800842285, -0.016834277659654617, 0.07858416438102722, -0.0904916450381279, -0.013235054910182953, -0.07279806584119797, 0.12430118769407272, -0.018120042979717255, -0.046977199614048004, -0.038524989038705826, -0.014192969538271427, 0.0556916743516922, -0.02798260562121868, 0.03184591978788376, -0.0023536738008260727, 0.07933598756790161, 0.03886474296450615, 0.008796474896371365, 0.01860126107931137, 0.10257046669721603, -0.08501727133989334, -0.03178504854440689, 0.01194885652512312, -0.01291543897241354, 0.0365297794342041, 0.0739682987332344, 0.04309431463479996, -5.154355875447436e-8, -0.05106055364012718, -0.07338972389698029, -0.1150013729929924, 0.012357886880636215, -0.0562439039349556, 0.07241488248109818, -0.00403955951333046, -0.07180861383676529, 0.02401795983314514, -0.03256303444504738, 0.0047301119193434715, 0.0016076675383374095, -0.043151237070560455, -0.07418174296617508, -0.05408763512969017, -0.0066944295540452, -0.10993216186761856, -0.044451285153627396, -0.00599841820076108, -0.03010588139295578, 0.06307825446128845, 0.028608165681362152, -0.09791307151317596, 0.04521871358156204, 0.026536883786320686, -0.018358133733272552, 0.018962180241942406, 0.06634559482336044, -0.05095289647579193, -0.04254846274852753, -0.015562298707664013, -0.027214551344513893, 0.03962542489171028, -0.030284414067864418, -0.023344237357378006, 0.08386723697185516, 0.034561771899461746, -0.013999659568071365, 0.04651845991611481, 0.03136554732918739, 0.055072151124477386, -0.022223930805921555, -0.015286202542483807, -0.04271963611245155, -0.025806477293372154, -0.02177109755575657, -0.026240330189466476, -0.05481322109699249, -0.04394104704260826, -0.013535955920815468, 0.023006504401564598, 0.018259821459650993, 0.06212171912193298, 0.05599616840481758, 0.014375921338796616, 0.010462616570293903, 0.09953929483890533, -0.06586692482233047, 0.02083965204656124, 0.012568104080855846, 0.10795092582702637, 0.06553235650062561, 0.016356296837329865, 0.005043141543865204 ]
0.084793
Telegram to see the chat ID (negative number like `-1001234567890`). \*\*Tip:\*\* For your own user ID, DM the bot and it will reply with your user ID (pairing message), or use `/whoami` once commands are enabled. \*\*Privacy note:\*\* `@userinfobot` is a third-party bot. If you prefer, add the bot to the group, send a message, and use `openclaw logs --follow` to read `chat.id`, or use the Bot API `getUpdates`. ## Config writes By default, Telegram is allowed to write config updates triggered by channel events or `/config set|unset`. This happens when: - A group is upgraded to a supergroup and Telegram emits `migrate\_to\_chat\_id` (chat ID changes). OpenClaw can migrate `channels.telegram.groups` automatically. - You run `/config set` or `/config unset` in a Telegram chat (requires `commands.config: true`). Disable with: ```json5 { channels: { telegram: { configWrites: false } }, } ``` ## Topics (forum supergroups) Telegram forum topics include a `message\_thread\_id` per message. OpenClaw: - Appends `:topic:` to the Telegram group session key so each topic is isolated. - Sends typing indicators and replies with `message\_thread\_id` so responses stay in the topic. - General topic (thread id `1`) is special: message sends omit `message\_thread\_id` (Telegram rejects it), but typing indicators still include it. - Exposes `MessageThreadId` + `IsForum` in template context for routing/templating. - Topic-specific configuration is available under `channels.telegram.groups..topics.` (skills, allowlists, auto-reply, system prompts, disable). - Topic configs inherit group settings (requireMention, allowlists, skills, prompts, enabled) unless overridden per topic. Private chats can include `message\_thread\_id` in some edge cases. OpenClaw keeps the DM session key unchanged, but still uses the thread id for replies/draft streaming when it is present. ## Inline Buttons Telegram supports inline keyboards with callback buttons. ```json5 { channels: { telegram: { capabilities: { inlineButtons: "allowlist", }, }, }, } ``` For per-account configuration: ```json5 { channels: { telegram: { accounts: { main: { capabilities: { inlineButtons: "allowlist", }, }, }, }, }, } ``` Scopes: - `off` β€” inline buttons disabled - `dm` β€” only DMs (group targets blocked) - `group` β€” only groups (DM targets blocked) - `all` β€” DMs + groups - `allowlist` β€” DMs + groups, but only senders allowed by `allowFrom`/`groupAllowFrom` (same rules as control commands) Default: `allowlist`. Legacy: `capabilities: ["inlineButtons"]` = `inlineButtons: "all"`. ### Sending buttons Use the message tool with the `buttons` parameter: ```json5 { action: "send", channel: "telegram", to: "123456789", message: "Choose an option:", buttons: [ [ { text: "Yes", callback\_data: "yes" }, { text: "No", callback\_data: "no" }, ], [{ text: "Cancel", callback\_data: "cancel" }], ], } ``` When a user clicks a button, the callback data is sent back to the agent as a message with the format: `callback\_data: value` ### Configuration options Telegram capabilities can be configured at two levels (object form shown above; legacy string arrays still supported): - `channels.telegram.capabilities`: Global default capability config applied to all Telegram accounts unless overridden. - `channels.telegram.accounts..capabilities`: Per-account capabilities that override the global defaults for that specific account. Use the global setting when all Telegram bots/accounts should behave the same. Use per-account configuration when different bots need different behaviors (for example, one account only handles DMs while another is allowed in groups). ## Access control (DMs + groups) ### DM access - Default: `channels.telegram.dmPolicy = "pairing"`. Unknown senders receive a pairing code; messages are ignored until approved (codes expire after 1 hour). - Approve via: - `openclaw pairing list telegram` - `openclaw pairing approve telegram ```` ` - Pairing is the default token exchange used for Telegram DMs. Details: [Pairing](/start/pairing) - `channels.telegram.allowFrom` accepts numeric user IDs (recommended) or `@username` entries. It is **not** the bot username; use the human
https://github.com/openclaw/openclaw/blob/main//docs/channels/telegram.md
main
opebclaw
[ -0.042123451828956604, -0.03164307028055191, 0.015635617077350616, 0.024139583110809326, -0.006767492275685072, -0.08701332658529282, 0.031046345829963684, -0.009219049476087093, 0.009537074714899063, 0.029371419921517372, 0.0032467094715684652, -0.043243736028671265, 0.0017309060785919428, 0.020202450454235077, 0.04831106215715408, 0.00977823045104742, 0.02749011106789112, -0.0978226289153099, -0.05260298028588295, -0.009439193643629551, 0.0013315287651494145, 0.05701876059174538, 0.012852320447564125, 0.004071394447237253, 0.03213571012020111, -0.09019780158996582, -0.023348089307546616, 0.017050229012966156, -0.03592371940612793, 0.02700093761086464, 0.0726386085152626, 0.06220284476876259, 0.0007283771992661059, -0.013088119216263294, 0.010702945291996002, 0.06356082111597061, 0.0495133139193058, -0.00310531840659678, 0.05640024319291115, 0.0345444530248642, -0.02864750288426876, -0.046737316995859146, -0.07190877944231033, 0.01429017260670662, 0.024532899260520935, 0.02221030741930008, -0.01923498697578907, 0.017733735963702202, -0.045691438019275665, 0.0534999705851078, -0.033207498490810394, 0.009293831884860992, 0.02563074417412281, 0.06990078091621399, 0.032102372497320175, 0.04839107021689415, -0.003881946438923478, 0.08392524719238281, 0.05374433472752571, -0.052134789526462555, 0.013906478881835938, -0.04111252352595329, 0.047795455902814865, -0.06439246982336044, -0.11399461328983307, -0.005613815970718861, 0.022717108950018883, -0.0011760301422327757, 0.02241404354572296, -0.03111203946173191, 0.09749557077884674, 0.030803991481661797, -0.003850433975458145, -0.04743702709674835, -0.009130755439400673, -0.015787998214364052, 0.0713297426700592, 0.06511060893535614, -0.12743228673934937, -0.07792329043149948, -0.028209684416651726, 0.025329474359750748, 0.020921073853969574, -0.015723027288913727, -0.01146763376891613, 0.02789607271552086, 0.037884026765823364, 0.041723355650901794, -0.0327734500169754, 0.10154109448194504, 0.013281779363751411, -0.02276693843305111, 0.012000835500657558, -0.02063610404729843, 0.06474963575601578, 0.03584758937358856, -0.02471891976892948, 0.08065049350261688, -0.019487442448735237, 0.0364510603249073, 0.005342037882655859, -0.01841656304895878, -0.07724852859973907, -0.03808349743485451, 0.05912841483950615, 0.032102588564157486, 0.0004752134846057743, 0.025226987898349762, 0.07087598741054535, -0.016163568943738937, -0.0261851754039526, -0.01210559532046318, 0.08044809848070145, 0.03663906827569008, 0.038201674818992615, -0.032927192747592926, 0.07249210774898529, 0.0747443288564682, 0.023615654557943344, 0.00034695130307227373, 0.13438108563423157, -0.07314468920230865, 0.02605627104640007, 0.04931825399398804, -0.02701077237725258, 0.19497206807136536, 0.07008926570415497, 3.507757060116279e-33, 0.07484105974435806, 0.039169833064079285, -0.06784823536872864, 0.05906232073903084, -0.011289192363619804, 0.04236511513590813, -0.07448028028011322, -0.024953441694378853, -0.040394239127635956, -0.020474718883633614, -0.10049686580896378, 0.005955253262072802, -0.0017899585654959083, 0.03140074387192726, -0.04013071581721306, -0.005887587089091539, 0.0035690763033926487, -0.03850173205137253, 0.039571985602378845, -0.039430517703294754, -0.02450348064303398, -0.0022623403929173946, -0.042135823518037796, 0.03396090492606163, 0.027086962014436722, 0.14600126445293427, 0.011823872104287148, -0.0723571926355362, -0.023833608254790306, 0.000030361241442733444, 0.0014860352966934443, 0.009814456105232239, 0.008644450455904007, 0.019915210083127022, 0.001941948663443327, -0.02623850107192993, -0.08089958131313324, 0.020135750994086266, -0.10327869653701782, -0.035784777253866196, 0.002506108721718192, 0.01892596296966076, -0.08996309340000153, -0.07485412061214447, -0.011370335705578327, -0.08272998034954071, -0.025635218247771263, -0.011389444582164288, 0.04143976792693138, -0.07359705865383148, -0.0011774998856708407, 0.01905795931816101, -0.001191556453704834, -0.04237794876098633, 0.03151725232601166, -0.13030771911144257, -0.006111164577305317, -0.08844044804573059, -0.016260847449302673, -0.04984968155622482, 0.011665181256830692, -0.03862106800079346, -0.0023266745265573263, 0.028649231418967247, 0.006426807958632708, -0.01844417303800583, 0.011223708279430866, 0.047451458871364594, 0.001656325301155448, 0.007293141912668943, -0.04785662516951561, 0.03331081196665764, -0.06710585206747055, 0.06120843440294266, -0.12556390464305878, -0.051234424114227295, -0.0030389742460101843, 0.018744418397545815, 0.03300835192203522, 0.0594027154147625, 0.02510727010667324, 0.01953480765223503, -0.013838140293955803, -0.06812062114477158, 0.030088094994425774, 0.02530139498412609, 0.0024410744663327932, -0.05138418450951576, -0.011213279329240322, 0.08300556987524033, -0.05578114092350006, 0.058728381991386414, -0.04654080048203468, 0.05666336789727211, -0.04110288992524147, -5.103884799307044e-33, -0.036485884338617325, 0.04733670502901077, -0.03358175605535507, -0.042753398418426514, -0.018125563859939575, -0.061526987701654434, 0.033317867666482925, 0.02570154517889023, -0.002400047145783901, -0.05810021236538887, -0.025551384314894676, -0.04975232854485512, -0.010501452721655369, -0.0070310612209141254, 0.08398512750864029, -0.0012054883409291506, -0.05486004427075386, -0.03931732475757599, -0.014050657860934734, -0.03306132182478905, -0.05774825066328049, -0.03818652778863907, -0.06628677994012833, 0.07692205160856247, 0.034086018800735474, -0.04429351165890694, 0.01759728044271469, -0.012084807269275188, 0.056776370853185654, -0.1181689202785492, 0.08557688444852829, 0.021305091679096222, -0.10189644992351532, -0.002093361457809806, 0.03167717158794403, 0.028301283717155457, 0.005665061995387077, 0.07479696720838547, -0.029597733169794083, 0.04044536128640175, 0.09084569662809372, 0.06465307623147964, -0.0774465799331665, 0.021290866658091545, -0.07105923444032669, 0.09019824117422104, -0.029231784865260124, -0.028332935646176338, -0.16277217864990234, 0.06354576349258423, 0.10127316415309906, -0.04279147461056709, 0.13486362993717194, -0.008888705633580685, 0.038157492876052856, -0.07015610486268997, 0.05756061524152756, -0.0039910911582410336, -0.00995930191129446, -0.04449576511979103, 0.03278598189353943, -0.06653127074241638, 0.005960740149021149, 0.08990341424942017, -0.04528325796127319, 0.013613644987344742, -0.018914928659796715, 0.04595235735177994, -0.03144117444753647, -0.040776535868644714, 0.1102033481001854, -0.1513168066740036, -0.08650408685207367, -0.02799692191183567, 0.05800363048911095, -0.0399119108915329, -0.11812050640583038, -0.034885164350271225, -0.011487379670143127, 0.032709911465644836, 0.015506274998188019, 0.04927984997630119, 0.05356880649924278, 0.04121055826544762, -0.049474846571683884, 0.011363043449819088, 0.05944716930389404, 0.1462697982788086, -0.023881617933511734, 0.020409131422638893, -0.03192085772752762, -0.043705347925424576, -0.05086033046245575, -0.00889371708035469, 0.013180197216570377, -5.171578720819525e-8, -0.054436665028333664, -0.030514344573020935, -0.039451826363801956, -0.0062159085646271706, 0.005464752670377493, 0.02712193876504898, -0.01744319498538971, -0.004200977273285389, 0.01645808480679989, -0.025728924199938774, -0.03869529813528061, -0.0035020385403186083, -0.025395670905709267, -0.07109592109918594, 0.027145134285092354, -0.002556040184572339, -0.10226636379957199, -0.0488460436463356, 0.04308250546455383, -0.02493353560566902, 0.01419146079570055, 0.002948794746771455, -0.06769774109125137, 0.042722299695014954, -0.059803351759910583, -0.07598742842674255, 0.028041716665029526, 0.07378239184617996, -0.07718825340270996, -0.047951728105545044, -0.030806535854935646, -0.03913121670484543, 0.035859812051057816, -0.024040503427386284, -0.0029776357114315033, 0.06647229194641113, -0.035538919270038605, -0.021489610895514488, 0.050333984196186066, 0.022074898704886436, 0.055522751063108444, -0.013519104570150375, 0.010239600203931332, -0.043701235204935074, -0.07345541566610336, -0.05176961049437523, 0.02658221311867237, -0.10310764610767365, -0.014079437591135502, 0.011000603437423706, 0.033294178545475006, -0.008621975779533386, 0.0737634003162384, 0.08569969236850739, -0.010606341063976288, 0.022748464718461037, 0.027224477380514145, -0.010042699985206127, 0.06160268932580948, -0.0222194604575634, 0.02434464544057846, 0.05494197458028793, -0.02326328493654728, -0.06942862272262573 ]
0.110749
after 1 hour). - Approve via: - `openclaw pairing list telegram` - `openclaw pairing approve telegram ```` ` - Pairing is the default token exchange used for Telegram DMs. Details: [Pairing](/start/pairing) - `channels.telegram.allowFrom` accepts numeric user IDs (recommended) or `@username` entries. It is **not** the bot username; use the human sender’s ID. The wizard accepts `@username` and resolves it to the numeric ID when possible. #### Finding your Telegram user ID Safer (no third-party bot): 1. Start the gateway and DM your bot. 2. Run `openclaw logs --follow` and look for `from.id`. Alternate (official Bot API): 1. DM your bot. 2. Fetch updates with your bot token and read `message.from.id`: ```bash curl "https://api.telegram.org/bot/getUpdates" ``` Third-party (less private): - DM `@userinfobot` or `@getidsbot` and use the returned user id. ### Group access Two independent controls: **1. Which groups are allowed** (group allowlist via `channels.telegram.groups`): - No `groups` config = all groups allowed - With `groups` config = only listed groups or `"*"` are allowed - Example: `"groups": { "-1001234567890": {}, "*": {} }` allows all groups **2. Which senders are allowed** (sender filtering via `channels.telegram.groupPolicy`): - `"open"` = all senders in allowed groups can message - `"allowlist"` = only senders in `channels.telegram.groupAllowFrom` can message - `"disabled"` = no group messages accepted at all Default is `groupPolicy: "allowlist"` (blocked unless you add `groupAllowFrom`). Most users want: `groupPolicy: "allowlist"` + `groupAllowFrom` + specific groups listed in `channels.telegram.groups` ## Long-polling vs webhook - Default: long-polling (no public URL required). - Webhook mode: set `channels.telegram.webhookUrl` and `channels.telegram.webhookSecret` (optionally `channels.telegram.webhookPath`). - The local listener binds to `0.0.0.0:8787` and serves `POST /telegram-webhook` by default. - If your public URL is different, use a reverse proxy and point `channels.telegram.webhookUrl` at the public endpoint. ## Reply threading Telegram supports optional threaded replies via tags: - `[[reply_to_current]]` -- reply to the triggering message. - `[[reply_to:]]` -- reply to a specific message id. Controlled by `channels.telegram.replyToMode`: - `first` (default), `all`, `off`. ## Audio messages (voice vs file) Telegram distinguishes **voice notes** (round bubble) from **audio files** (metadata card). OpenClaw defaults to audio files for backward compatibility. To force a voice note bubble in agent replies, include this tag anywhere in the reply: - `[[audio_as_voice]]` β€” send audio as a voice note instead of a file. The tag is stripped from the delivered text. Other channels ignore this tag. For message tool sends, set `asVoice: true` with a voice-compatible audio `media` URL (`message` is optional when media is present): ```json5 { action: "send", channel: "telegram", to: "123456789", media: "https://example.com/voice.ogg", asVoice: true, } ``` ## Stickers OpenClaw supports receiving and sending Telegram stickers with intelligent caching. ### Receiving stickers When a user sends a sticker, OpenClaw handles it based on the sticker type: - **Static stickers (WEBP):** Downloaded and processed through vision. The sticker appears as a `` placeholder in the message content. - **Animated stickers (TGS):** Skipped (Lottie format not supported for processing). - **Video stickers (WEBM):** Skipped (video format not supported for processing). Template context field available when receiving stickers: - `Sticker` β€” object with: - `emoji` β€” emoji associated with the sticker - `setName` β€” name of the sticker set - `fileId` β€” Telegram file ID (send the same sticker back) - `fileUniqueId` β€” stable ID for cache lookup - `cachedDescription` β€” cached vision description when available ### Sticker cache Stickers are processed through the AI's vision capabilities to generate descriptions. Since the same stickers are often sent repeatedly, OpenClaw caches these descriptions to avoid redundant API calls. **How it works:** 1. **First encounter:** The sticker image is sent to the AI for vision analysis. The AI generates a description
https://github.com/openclaw/openclaw/blob/main//docs/channels/telegram.md
main
opebclaw
[ -0.050702761858701706, -0.021808858960866928, -0.017610011622309685, 0.007801905274391174, -0.03904104605317116, -0.08703373372554779, -0.007961519062519073, 0.02241910994052887, -0.0013015343574807048, 0.062193214893341064, 0.006531771272420883, -0.050438910722732544, 0.01062302477657795, 0.01705675572156906, 0.11238642036914825, 0.07485714554786682, 0.048630740493535995, -0.09121304750442505, 0.012006879784166813, -0.035009387880563736, -0.018435101956129074, 0.03833147883415222, 0.044126324355602264, -0.022019028663635254, 0.03631206601858139, -0.08673930913209915, -0.010460421442985535, 0.017172548919916153, -0.04711264371871948, -0.004480408038944006, 0.11247819662094116, -0.003352473257109523, -0.029373595491051674, -0.004061991814523935, 0.03583007678389549, 0.028824439272284508, 0.01191065926104784, -0.0026746371295303106, 0.10422687977552414, -0.0008596781408414245, 0.01527279894798994, -0.07864056527614594, -0.07799892127513885, -0.007291048765182495, 0.016722384840250015, 0.01598464511334896, -0.04107489064335823, 0.03910950571298599, -0.010016771964728832, 0.04405597224831581, -0.018106935545802116, -0.020289044827222824, 0.021321119740605354, 0.005962295923382044, -0.02813117206096649, 0.05494274944067001, 0.005169036332517862, 0.07782599329948425, 0.07297784835100174, -0.05541034787893295, 0.01382287498563528, -0.05291112884879112, 0.011451559141278267, -0.032143786549568176, -0.09122954308986664, -0.030154598876833916, -0.007196331862360239, -0.00857710000127554, 0.04853148013353348, -0.03993090242147446, 0.10286425054073334, 0.018562572076916695, -0.04549078270792961, -0.05485866591334343, -0.04285067319869995, -0.038558442145586014, 0.06401615589857101, 0.04945879429578781, -0.11051889508962631, -0.05791855603456497, -0.09231782704591751, 0.03428780660033226, -0.004971622955054045, 0.01578424870967865, -0.007597935851663351, 0.0770287737250328, 0.028172561898827553, 0.06697455793619156, -0.02352301776409149, 0.061922501772642136, 0.011511300690472126, -0.002105436287820339, 0.00459238700568676, -0.037433575838804245, 0.08814890682697296, 0.053692612797021866, -0.044143591076135635, 0.05533559247851372, -0.06335041671991348, 0.08015955984592438, 0.0042530857026577, -0.022585097700357437, -0.09583690017461777, -0.03394900634884834, 0.07881847023963928, 0.06035887077450752, 0.011216290295124054, 0.016005076467990875, 0.12066737562417984, -0.024555843323469162, -0.01662287302315235, -0.057255715131759644, 0.07505310326814651, 0.04979151487350464, 0.0010881468188017607, 0.018350766971707344, 0.05401633307337761, 0.058394238352775574, 0.059764403849840164, -0.025452330708503723, 0.10871698707342148, -0.0827130526304245, 0.03313364088535309, -0.03888311609625816, -0.016780056059360504, 0.1380242109298706, 0.1192513033747673, 1.5169941023418821e-33, 0.0322650671005249, 0.08290974050760269, -0.07552000880241394, 0.03955550491809845, -0.020585624501109123, 0.0749550312757492, -0.05526372790336609, -0.02275463193655014, -0.07306617498397827, -0.039755381643772125, -0.1467287689447403, 0.02839868888258934, 0.023296277970075607, 0.0050745634362101555, -0.10113082081079483, -0.07536176592111588, 0.03892749175429344, -0.0050895060412585735, 0.013259334489703178, -0.0009240945801138878, 0.06679084897041321, -0.05646874010562897, -0.02361968345940113, 0.06020338833332062, 0.019372576847672462, 0.07050583511590958, 0.010845708660781384, -0.034750811755657196, 0.0376792848110199, 0.008561952039599419, -0.01232209987938404, 0.024392081424593925, -0.03518219664692879, 0.022134102880954742, 0.014734814874827862, -0.01749001443386078, -0.07584654539823532, 0.009695359505712986, -0.08954854309558868, -0.0677713006734848, 0.00765624362975359, 0.025100214406847954, -0.05694190412759781, -0.05893484130501747, -0.03957385569810867, -0.0479695089161396, -0.032839883118867874, 0.00897500105202198, 0.0605735220015049, -0.029557330533862114, -0.006019982509315014, -0.016404548659920692, -0.005879485514014959, -0.04162551835179329, 0.018064813688397408, -0.11945385485887527, -0.013121338561177254, -0.06912166625261307, -0.009010665118694305, -0.08433353900909424, 0.03905022516846657, -0.01968849077820778, -0.016750095412135124, 0.013638045638799667, 0.014374720863997936, -0.02972559444606304, 0.023196158930659294, 0.04977831989526749, 0.025530453771352768, -0.00005240475729806349, -0.011842861771583557, 0.06914214044809341, -0.025116898119449615, 0.0448780432343483, -0.0810500979423523, -0.08941176533699036, 0.032245080918073654, 0.005402440205216408, 0.02626146376132965, 0.05804133415222168, 0.004611401818692684, -0.024470575153827667, -0.02023455686867237, -0.061826251447200775, 0.050377827137708664, 0.06897372752428055, 0.002990899607539177, -0.05384298041462898, -0.0011467625154182315, 0.1051253080368042, -0.09158298373222351, 0.09828558564186096, -0.04512765258550644, 0.0535602942109108, 0.0004899483174085617, -2.6132049407855565e-33, -0.054404567927122116, 0.024526197463274002, 0.03613642603158951, -0.024754874408245087, 0.04609851539134979, -0.038567353039979935, 0.005641413386911154, 0.009051650762557983, 0.014201446436345577, 0.0034511492121964693, -0.039073146879673004, -0.012307018041610718, 0.01647680625319481, -0.033058393746614456, 0.09179739654064178, -0.03176172450184822, -0.07069926708936691, 0.00019228318706154823, 0.022452181205153465, -0.009592756628990173, -0.06557396054267883, 0.027044449001550674, -0.08571208268404007, 0.055814679712057114, 0.04885641485452652, 0.00605828408151865, 0.0221120472997427, -0.005406300537288189, 0.03350851312279701, -0.08870921283960342, 0.05483127012848854, 0.01988239586353302, -0.0927780270576477, 0.02814842015504837, 0.04919566214084625, 0.03920178860425949, 0.0182659812271595, 0.095357246696949, -0.014025663956999779, 0.014498923905193806, 0.09365548193454742, 0.013519844971597195, -0.08726076781749725, -0.00039860978722572327, -0.024856705218553543, 0.03487095609307289, -0.019827036187052727, 0.006033218465745449, -0.20526361465454102, 0.07180851697921753, 0.07764657586812973, 0.014732519164681435, 0.06251619756221771, -0.0015938525320962071, 0.017832066863775253, -0.054360419511795044, 0.10263405740261078, -0.018202153965830803, 0.008375564590096474, -0.053773943334817886, -0.0028795297257602215, -0.0666271522641182, 0.06679027527570724, 0.1251988410949707, -0.005507930647581816, -0.019564125686883926, 0.027581138536334038, 0.08199816197156906, -0.04370466247200966, -0.03756158798933029, 0.09158752858638763, -0.09714250266551971, -0.05520559474825859, -0.023121340200304985, 0.07839474081993103, -0.04921679571270943, -0.1356130838394165, -0.032459039241075516, 0.011658310890197754, 0.016226010397076607, -0.0022304693702608347, 0.08032801747322083, 0.06479084491729736, -0.0009102027397602797, -0.05563673377037048, -0.016168955713510513, 0.07324306666851044, 0.08594394475221634, -0.026096154004335403, 0.029431670904159546, -0.025118308141827583, -0.05825325474143028, 0.022381160408258438, -0.00968592707067728, 0.019335582852363586, -4.7884327614156064e-8, -0.02596138045191765, -0.03068816289305687, -0.04395193234086037, 0.013821903616189957, -0.02389666810631752, 0.031766291707754135, -0.0494808591902256, -0.04635745659470558, 0.004445882048457861, -0.040329333394765854, -0.006775315385311842, -0.015003256499767303, -0.03005361557006836, -0.04020161181688309, 0.02388790249824524, -0.008087133057415485, -0.07621940970420837, -0.038843221962451935, 0.005284504033625126, -0.005848684813827276, 0.03135506436228752, 0.022271709516644478, -0.013625580817461014, -0.015188934281468391, -0.07318232953548431, -0.0590786412358284, 0.0420028381049633, 0.07266971468925476, -0.0890800729393959, -0.047151364386081696, -0.05346883088350296, -0.04014255106449127, 0.005481158848851919, -0.024391010403633118, -0.03361821547150612, 0.030152447521686554, -0.03766665980219841, -0.012230781838297844, 0.03202211111783981, 0.004845431074500084, 0.03882246091961861, -0.01519540324807167, -0.00986683089286089, -0.040454789996147156, -0.060922011733055115, -0.0038755694404244423, -0.005694628693163395, -0.09204699844121933, -0.01207200437784195, 0.005150567274540663, -0.005275885108858347, -0.019984351471066475, 0.0987318605184555, 0.059677448123693466, -0.018759433180093765, 0.028373243287205696, 0.014888701029121876, -0.057054780423641205, 0.024842707440257072, -0.05785827711224556, 0.052439481019973755, 0.049564179033041, -0.0011074913199990988, -0.05856173112988472 ]
0.069781
Stickers are processed through the AI's vision capabilities to generate descriptions. Since the same stickers are often sent repeatedly, OpenClaw caches these descriptions to avoid redundant API calls. **How it works:** 1. **First encounter:** The sticker image is sent to the AI for vision analysis. The AI generates a description (e.g., "A cartoon cat waving enthusiastically"). 2. **Cache storage:** The description is saved along with the sticker's file ID, emoji, and set name. 3. **Subsequent encounters:** When the same sticker is seen again, the cached description is used directly. The image is not sent to the AI. **Cache location:** `~/.openclaw/telegram/sticker-cache.json` **Cache entry format:** ```json { "fileId": "CAACAgIAAxkBAAI...", "fileUniqueId": "AgADBAADb6cxG2Y", "emoji": "πŸ‘‹", "setName": "CoolCats", "description": "A cartoon cat waving enthusiastically", "cachedAt": "2026-01-15T10:30:00.000Z" } ``` **Benefits:** - Reduces API costs by avoiding repeated vision calls for the same sticker - Faster response times for cached stickers (no vision processing delay) - Enables sticker search functionality based on cached descriptions The cache is populated automatically as stickers are received. There is no manual cache management required. ### Sending stickers The agent can send and search stickers using the `sticker` and `sticker-search` actions. These are disabled by default and must be enabled in config: ```json5 { channels: { telegram: { actions: { sticker: true, }, }, }, } ``` **Send a sticker:** ```json5 { action: "sticker", channel: "telegram", to: "123456789", fileId: "CAACAgIAAxkBAAI...", } ``` Parameters: - `fileId` (required) β€” the Telegram file ID of the sticker. Obtain this from `Sticker.fileId` when receiving a sticker, or from a `sticker-search` result. - `replyTo` (optional) β€” message ID to reply to. - `threadId` (optional) β€” message thread ID for forum topics. **Search for stickers:** The agent can search cached stickers by description, emoji, or set name: ```json5 { action: "sticker-search", channel: "telegram", query: "cat waving", limit: 5, } ``` Returns matching stickers from the cache: ```json5 { ok: true, count: 2, stickers: [ { fileId: "CAACAgIAAxkBAAI...", emoji: "πŸ‘‹", description: "A cartoon cat waving enthusiastically", setName: "CoolCats", }, ], } ``` The search uses fuzzy matching across description text, emoji characters, and set names. **Example with threading:** ```json5 { action: "sticker", channel: "telegram", to: "-1001234567890", fileId: "CAACAgIAAxkBAAI...", replyTo: 42, threadId: 123, } ``` ## Streaming (drafts) Telegram can stream **draft bubbles** while the agent is generating a response. OpenClaw uses Bot API `sendMessageDraft` (not real messages) and then sends the final reply as a normal message. Requirements (Telegram Bot API 9.3+): - **Private chats with topics enabled** (forum topic mode for the bot). - Incoming messages must include `message_thread_id` (private topic thread). - Streaming is ignored for groups/supergroups/channels. Config: - `channels.telegram.streamMode: "off" | "partial" | "block"` (default: `partial`) - `partial`: update the draft bubble with the latest streaming text. - `block`: update the draft bubble in larger blocks (chunked). - `off`: disable draft streaming. - Optional (only for `streamMode: "block"`): - `channels.telegram.draftChunk: { minChars?, maxChars?, breakPreference? }` - defaults: `minChars: 200`, `maxChars: 800`, `breakPreference: "paragraph"` (clamped to `channels.telegram.textChunkLimit`). Note: draft streaming is separate from **block streaming** (channel messages). Block streaming is off by default and requires `channels.telegram.blockStreaming: true` if you want early Telegram messages instead of draft updates. Reasoning stream (Telegram only): - `/reasoning stream` streams reasoning into the draft bubble while the reply is generating, then sends the final answer without reasoning. - If `channels.telegram.streamMode` is `off`, reasoning stream is disabled. More context: [Streaming + chunking](/concepts/streaming). ## Retry policy Outbound Telegram API calls retry on transient network/429 errors with exponential backoff and jitter. Configure via `channels.telegram.retry`. See [Retry policy](/concepts/retry). ## Agent tool (messages + reactions) - Tool: `telegram` with `sendMessage` action (`to`, `content`, optional `mediaUrl`, `replyToMessageId`, `messageThreadId`).
https://github.com/openclaw/openclaw/blob/main//docs/channels/telegram.md
main
opebclaw
[ -0.08073192089796066, 0.03888380900025368, 0.0064080082811415195, 0.0733967125415802, 0.08295129984617233, -0.10628343373537064, 0.017930641770362854, -0.021735522896051407, 0.139789417386055, -0.05249946564435959, 0.015753192827105522, 0.0019663411658257246, 0.017777765169739723, -0.01843396946787834, 0.09477077424526215, 0.05612239986658096, 0.04732848331332207, -0.08570029586553574, -0.049363020807504654, -0.052080217748880386, 0.06455342471599579, 0.026265235617756844, 0.07713674008846283, -0.043208226561546326, -0.03543365001678467, 0.014765185303986073, -0.07465297728776932, -0.03259827196598053, 0.034604597836732864, -0.00014649190416093916, 0.10107342153787613, -0.020514067262411118, -0.02688126638531685, 0.053430650383234024, 0.020801275968551636, 0.09007333219051361, -0.09850538522005081, -0.02429996244609356, 0.01778528280556202, 0.01589226722717285, 0.030215198174118996, -0.022851912304759026, -0.08132003992795944, -0.02763037383556366, 0.06874176859855652, 0.038802776485681534, 0.02374255284667015, -0.0056602186523377895, -0.03567511960864067, 0.008869010023772717, -0.08132197707891464, -0.056222978979349136, -0.07335295528173447, -0.07751750946044922, -0.0060422285459935665, 0.03489372506737709, -0.02678481861948967, 0.012398583814501762, 0.012167630717158318, 0.0514458492398262, 0.06417462974786758, -0.021491369232535362, 0.058361101895570755, 0.029875271022319794, -0.009213210083544254, -0.02517646737396717, -0.015594756230711937, -0.058278169482946396, 0.014019316993653774, -0.06835254281759262, 0.06741149723529816, 0.061520788818597794, 0.01814085803925991, -0.013268622569739819, -0.003653791733086109, 0.03507478907704353, 0.054520219564437866, 0.02857048436999321, -0.040447741746902466, -0.1945488601922989, -0.04279608279466629, -0.07103093713521957, 0.014869102276861668, 0.03740832209587097, 0.01575773023068905, 0.11286401003599167, 0.04728097468614578, -0.024892525747418404, 0.005611489526927471, 0.061851248145103455, 0.008575903251767159, -0.1067056804895401, 0.007148374803364277, -0.03579867631196976, -0.056724369525909424, -0.0241840947419405, 0.018207933753728867, 0.08650004118680954, -0.07485280185937881, 0.06220836192369461, 0.01702071726322174, 0.002821154659613967, 0.01770128682255745, 0.01943548396229744, -0.007952127605676651, -0.010063150897622108, -0.003190193325281143, 0.038048792630434036, -0.03441070765256882, 0.06069929152727127, 0.011182472109794617, 0.030625561252236366, 0.02133438177406788, -0.02682158723473549, -0.05770314484834671, -0.032016973942518234, -0.055765461176633835, -0.017125170677900314, 0.11618418246507645, 0.01618986576795578, 0.11993429809808731, -0.05689461901783943, 0.016015280038118362, -0.02635827846825123, 0.016435014083981514, -0.01212435495108366, 0.06752519309520721, 3.812357033773104e-33, -0.006563895847648382, 0.011830871924757957, -0.021656686440110207, -0.01752830669283867, 0.018038541078567505, -0.06175551563501358, 0.007204749621450901, 0.010781519114971161, -0.06008157879114151, 0.050278257578611374, 0.017280081287026405, 0.03341836854815483, -0.03520061448216438, 0.1545804738998413, 0.022032609209418297, 0.012546933256089687, -0.0842842236161232, 0.021765731275081635, 0.03911658376455307, -0.039093706756830215, 0.00402847770601511, -0.011288001202046871, -0.0426994152367115, 0.02192019484937191, -0.10357467085123062, 0.08909284323453903, 0.03599528968334198, -0.0672428235411644, -0.08551535755395889, -0.001082313829101622, 0.009368672035634518, 0.028969453647732735, 0.01917504332959652, -0.011587843298912048, 0.036039452999830246, 0.0036122712772339582, 0.0032062793616205454, -0.03197947517037392, -0.09447616338729858, -0.02452588453888893, 0.10065373033285141, -0.0023273592814803123, -0.04981992393732071, -0.008946983143687248, -0.05602467805147171, -0.025294259190559387, -0.019135188311338425, 0.08505825698375702, 0.04093649983406067, -0.016755489632487297, 0.061801727861166, -0.003508870955556631, 0.03486446291208267, -0.01303096767514944, 0.015756068751215935, -0.044466517865657806, 0.013908698223531246, -0.12035079300403595, -0.018015610054135323, -0.04564004763960838, 0.03224864974617958, 0.01391556952148676, 0.04706406593322754, 0.021027524024248123, -0.043464116752147675, 0.07085616886615753, 0.07722567021846771, 0.03346401825547218, 0.012221275828778744, -0.000728887040168047, 0.04897357150912285, 0.054647814482450485, -0.017726439982652664, -0.03797741234302521, -0.04371217265725136, -0.04844730347394943, -0.0477687232196331, 0.004680584650486708, -0.015282773412764072, 0.010748442262411118, 0.00188443623483181, -0.03731651231646538, -0.02783266268670559, 0.025245925411581993, -0.07056567072868347, 0.023386843502521515, 0.06311964988708496, -0.10000166296958923, 0.005641700234264135, 0.07759232819080353, 0.006811846978962421, 0.006687513552606106, -0.06098463758826256, 0.012359164655208588, -0.11346317082643509, -3.449980778089394e-33, -0.043968766927719116, -0.05421222373843193, 0.016282660886645317, 0.04148262366652489, -0.03669987991452217, -0.013177728280425072, 0.02273719757795334, 0.07489242404699326, 0.021960344165563583, -0.044043395668268204, -0.08337798714637756, 0.012336049228906631, -0.033603549003601074, -0.015933556482195854, 0.022488338872790337, 0.010034977458417416, -0.010988833382725716, 0.00014920803369022906, -0.00967434048652649, -0.016712423413991928, -0.010413884185254574, 0.021359672769904137, -0.009135706350207329, 0.049372151494026184, 0.047186385840177536, 0.05321526527404785, 0.010798013769090176, 0.004953193012624979, -0.0016213770722970366, -0.10084111988544464, 0.07959339022636414, -0.03313536196947098, -0.04298418015241623, -0.005481979344040155, 0.029378190636634827, -0.0399777926504612, 0.019795121625065804, -0.009620027616620064, -0.020458154380321503, 0.03377372771501541, 0.024249767884612083, -0.029383348301053047, -0.09293060749769211, 0.06109199672937393, -0.016140224412083626, -0.03941972553730011, -0.08734544366598129, 0.012354835867881775, -0.055050063878297806, 0.05535917729139328, 0.09048581123352051, -0.05961688607931137, -0.02117753028869629, -0.01833253540098667, -0.035266462713479996, 0.07434672862291336, -0.02150108478963375, -0.032069675624370575, 0.043856583535671234, -0.03699305281043053, 0.06835997104644775, -0.09383680671453476, -0.06965204328298569, 0.042375482618808746, 0.01839686930179596, -0.03058580309152603, 0.03876330330967903, -0.04969295859336853, -0.09298381209373474, -0.03557808697223663, 0.04428679496049881, -0.07094929367303848, -0.05367318540811539, -0.04864257946610451, 0.07254066318273544, -0.012336554005742073, 0.025037657469511032, -0.02410253696143627, -0.0409163162112236, -0.004082906525582075, -0.12606176733970642, -0.009076686576008797, 0.025180833414196968, 0.0420694462954998, -0.0008386651752516627, 0.01988966390490532, -0.06405268609523773, 0.02891785278916359, 0.02413303405046463, 0.0694059506058693, -0.021835865452885628, 0.04737469181418419, 0.030873656272888184, 0.06874401122331619, -0.03647985681891441, -5.238762312842482e-8, -0.08651861548423767, 0.01329299621284008, -0.031104788184165955, 0.03163113072514534, -0.04633926600217819, 0.01093347743153572, 0.006452645640820265, 0.009226235561072826, -0.04597175866365433, -0.07356808334589005, 0.12215720117092133, -0.006912735756486654, -0.1011035367846489, 0.004287473391741514, -0.009912639856338501, 0.03687611594796181, 0.017679838463664055, -0.0038031849544495344, -0.007087745703756809, -0.04589635878801346, 0.006585951894521713, 0.012691671960055828, 0.05962570384144783, -0.07849159091711044, -0.047680094838142395, -0.01625843718647957, -0.0011827285634353757, 0.08634067326784134, -0.036274343729019165, 0.00017538333486299962, -0.027040718123316765, 0.022843187674880028, 0.16215018928050995, -0.023520929738879204, 0.05345511436462402, 0.027306709438562393, -0.03565698489546776, -0.041820745915174484, 0.04589914157986641, 0.07805084437131882, 0.056299250572919846, -0.02213433012366295, -0.05295146629214287, 0.005358333699405193, 0.03635011613368988, 0.020818008109927177, -0.025508441030979156, -0.06743400543928146, -0.012919498607516289, -0.015998363494873047, -0.020087923854589462, -0.062148697674274445, -0.06569766253232956, 0.12610337138175964, -0.034563906490802765, -0.09826972335577011, 0.10987499356269836, -0.0012976279249414802, 0.09944935142993927, 0.08242524415254593, 0.07720616459846497, 0.04285607486963272, 0.005880880635231733, -0.01274013053625822 ]
0.132519
reasoning stream is disabled. More context: [Streaming + chunking](/concepts/streaming). ## Retry policy Outbound Telegram API calls retry on transient network/429 errors with exponential backoff and jitter. Configure via `channels.telegram.retry`. See [Retry policy](/concepts/retry). ## Agent tool (messages + reactions) - Tool: `telegram` with `sendMessage` action (`to`, `content`, optional `mediaUrl`, `replyToMessageId`, `messageThreadId`). - Tool: `telegram` with `react` action (`chatId`, `messageId`, `emoji`). - Tool: `telegram` with `deleteMessage` action (`chatId`, `messageId`). - Reaction removal semantics: see [/tools/reactions](/tools/reactions). - Tool gating: `channels.telegram.actions.reactions`, `channels.telegram.actions.sendMessage`, `channels.telegram.actions.deleteMessage` (default: enabled), and `channels.telegram.actions.sticker` (default: disabled). ## Reaction notifications **How reactions work:** Telegram reactions arrive as **separate `message_reaction` events**, not as properties in message payloads. When a user adds a reaction, OpenClaw: 1. Receives the `message_reaction` update from Telegram API 2. Converts it to a **system event** with format: `"Telegram reaction added: {emoji} by {user} on msg {id}"` 3. Enqueues the system event using the **same session key** as regular messages 4. When the next message arrives in that conversation, system events are drained and prepended to the agent's context The agent sees reactions as **system notifications** in the conversation history, not as message metadata. **Configuration:** - `channels.telegram.reactionNotifications`: Controls which reactions trigger notifications - `"off"` β€” ignore all reactions - `"own"` β€” notify when users react to bot messages (best-effort; in-memory) (default) - `"all"` β€” notify for all reactions - `channels.telegram.reactionLevel`: Controls agent's reaction capability - `"off"` β€” agent cannot react to messages - `"ack"` β€” bot sends acknowledgment reactions (πŸ‘€ while processing) (default) - `"minimal"` β€” agent can react sparingly (guideline: 1 per 5-10 exchanges) - `"extensive"` β€” agent can react liberally when appropriate **Forum groups:** Reactions in forum groups include `message_thread_id` and use session keys like `agent:main:telegram:group:{chatId}:topic:{threadId}`. This ensures reactions and messages in the same topic stay together. **Example config:** ```json5 { channels: { telegram: { reactionNotifications: "all", // See all reactions reactionLevel: "minimal", // Agent can react sparingly }, }, } ``` **Requirements:** - Telegram bots must explicitly request `message_reaction` in `allowed_updates` (configured automatically by OpenClaw) - For webhook mode, reactions are included in the webhook `allowed_updates` - For polling mode, reactions are included in the `getUpdates` `allowed_updates` ## Delivery targets (CLI/cron) - Use a chat id (`123456789`) or a username (`@name`) as the target. - Example: `openclaw message send --channel telegram --target 123456789 --message "hi"`. ## Troubleshooting **Bot doesn’t respond to non-mention messages in a group:** - If you set `channels.telegram.groups.*.requireMention=false`, Telegram’s Bot API **privacy mode** must be disabled. - BotFather: `/setprivacy` β†’ **Disable** (then remove + re-add the bot to the group) - `openclaw channels status` shows a warning when config expects unmentioned group messages. - `openclaw channels status --probe` can additionally check membership for explicit numeric group IDs (it can’t audit wildcard `"*"` rules). - Quick test: `/activation always` (session-only; use config for persistence) **Bot not seeing group messages at all:** - If `channels.telegram.groups` is set, the group must be listed or use `"*"` - Check Privacy Settings in @BotFather β†’ "Group Privacy" should be **OFF** - Verify bot is actually a member (not just an admin with no read access) - Check gateway logs: `openclaw logs --follow` (look for "skipping group message") **Bot responds to mentions but not `/activation always`:** - The `/activation` command updates session state but doesn't persist to config - For persistent behavior, add group to `channels.telegram.groups` with `requireMention: false` **Commands like `/status` don't work:** - Make sure your Telegram user ID is authorized (via pairing or `channels.telegram.allowFrom`) - Commands require authorization even in groups with `groupPolicy: "open"` **Long-polling aborts immediately on Node 22+ (often with proxies/custom fetch):** - Node 22+ is stricter about `AbortSignal` instances; foreign signals can abort `fetch`
https://github.com/openclaw/openclaw/blob/main//docs/channels/telegram.md
main
opebclaw
[ -0.036626268178224564, -0.054412223398685455, 0.030122920870780945, 0.010646292939782143, 0.06457263976335526, -0.052133090794086456, 0.024426838383078575, 0.01771705597639084, 0.05178266018629074, 0.038292910903692245, -0.014879759401082993, -0.006691597402095795, -0.02600618079304695, 0.09106551110744476, 0.04943769797682762, -0.013341435231268406, 0.06258416175842285, -0.10786688327789307, -0.06752599030733109, -0.07486607879400253, 0.017843151465058327, -0.01030883938074112, 0.050900090485811234, 0.021425297483801842, 0.06619332730770111, -0.010031517595052719, -0.05606494098901749, -0.009894912131130695, -0.008961845189332962, -0.0027760271914303303, 0.04477805644273758, 0.009063463658094406, -0.10806752741336823, -0.04497785493731499, -0.006297308485955, 0.11033758521080017, -0.04819793254137039, -0.029881443828344345, -0.020071279257535934, 0.016113491728901863, -0.030683113262057304, -0.02151912823319435, -0.09108433127403259, -0.044111218303442, 0.061420947313308716, -0.012034527026116848, 0.015692051500082016, -0.008114718832075596, -0.04635563865303993, 0.041941724717617035, -0.07215018570423126, 0.007571537978947163, -0.020203109830617905, 0.07095917314291, 0.0606432780623436, 0.04695640131831169, -0.03394608572125435, 0.10305427759885788, 0.022590015083551407, -0.02109454944729805, -0.0011328469263389707, -0.07786825299263, 0.00843410100787878, -0.031117688864469528, -0.0720360204577446, 0.04841495677828789, -0.00698520103469491, 0.026495635509490967, 0.05243120715022087, 0.001367843709886074, 0.026891233399510384, 0.03993066027760506, -0.05198397487401962, -0.0177941732108593, -0.01771310344338417, -0.054681722074747086, 0.08096040785312653, 0.009939980693161488, -0.06865788996219635, -0.037087008357048035, -0.024660585448145866, -0.08296878635883331, 0.028092030435800552, -0.0014114942168816924, 0.002581884851679206, 0.042528193444013596, 0.006206795107573271, -0.00044940190855413675, 0.06166627258062363, 0.05397806689143181, -0.011446828953921795, -0.017054466530680656, 0.06417930871248245, 0.05497041717171669, 0.06575179100036621, 0.041646089404821396, -0.05310412868857384, 0.03139223903417587, -0.06153891608119011, 0.04185345768928528, 0.032622575759887695, 0.018230227753520012, -0.005319396965205669, 0.0030031476635485888, 0.06256364285945892, -0.024437274783849716, 0.024835078045725822, 0.055032987147569656, 0.015989096835255623, -0.023860646411776543, -0.062258023768663406, 0.030876915901899338, 0.10046891123056412, 0.032506946474313736, 0.016708979383111, 0.041132666170597076, -0.017121583223342896, -0.008636710233986378, 0.011691072955727577, -0.0026215349789708853, 0.11167650669813156, -0.04801291227340698, -0.030645204707980156, -0.023873530328273773, 0.09242284297943115, 0.09111960977315903, 0.05750437080860138, 3.345376107203611e-33, 0.07671995460987091, 0.001963752554729581, -0.058437611907720566, 0.05235419422388077, 0.03757723420858383, 0.0175947155803442, -0.023623937740921974, -0.03539024293422699, -0.05693184956908226, -0.05540936440229416, -0.021891318261623383, -0.03533313423395157, -0.02568233199417591, 0.021324684843420982, -0.03177212178707123, -0.07155078649520874, -0.007684126030653715, 0.027485881000757217, 0.03126657009124756, 0.0067124804481863976, -0.003957086708396673, -0.05541772395372391, -0.047601327300071716, 0.036713648587465286, -0.03352242335677147, 0.10114207863807678, 0.06230952963232994, -0.0029178967233747244, -0.015853872522711754, -0.010692482814192772, -0.04970107600092888, 0.024000564590096474, 0.005479843821376562, 0.019891023635864258, 0.05373533442616463, -0.0691804587841034, -0.058525245636701584, -0.01052566897124052, -0.05240337550640106, -0.02381819300353527, -0.008829367347061634, 0.047653570771217346, -0.09305327385663986, -0.06655429303646088, -0.022100325673818588, -0.11547055840492249, -0.04007197171449661, -0.008144253864884377, 0.031050467863678932, -0.021530259400606155, 0.06135430559515953, 0.05309317633509636, 0.09672639518976212, -0.01833920367062092, 0.019675927236676216, -0.04448925703763962, -0.03965707868337631, -0.011578777804970741, 0.0009267694549635053, 0.023021521046757698, 0.03962461277842522, -0.01394031010568142, 0.011981027200818062, -0.01649155467748642, 0.07344341278076172, 0.08609970659017563, -0.06995874643325806, 0.03952447697520256, 0.03333583474159241, -0.0403241403400898, -0.07566308230161667, 0.017696060240268707, 0.04865258187055588, 0.044438436627388, -0.033531222492456436, -0.06407591700553894, -0.025071315467357635, -0.015230126678943634, 0.013407221995294094, -0.01213173195719719, -0.011330898851156235, -0.04726424440741539, 0.0019793089013546705, 0.027480395510792732, 0.0621824786067009, -0.030520742759108543, -0.013212103396654129, -0.11680055409669876, 0.004152702633291483, 0.053733207285404205, -0.07666151225566864, 0.04839904606342316, 0.01623978465795517, -0.005184819921851158, -0.03932295739650726, -3.486145596476411e-33, -0.04293602705001831, -0.024056730791926384, -0.09107725322246552, 0.011885466054081917, -0.04726690798997879, 0.0069047813303768635, 0.05986960604786873, 0.07544685900211334, 0.08006742596626282, -0.06561312824487686, -0.02305576018989086, -0.05634348839521408, -0.04078178480267525, -0.02140706218779087, -0.03421664237976074, -0.04879515618085861, -0.050095945596694946, -0.07103605568408966, 0.006930920761078596, 0.011201330460608006, -0.03209047392010689, -0.03363814577460289, -0.07438459247350693, 0.054038502275943756, 0.027999049052596092, 0.055748410522937775, 0.023538073524832726, -0.013363918289542198, 0.07438136637210846, -0.13796290755271912, 0.05653723329305649, -0.03842597454786301, -0.07864629477262497, -0.03854629024863243, 0.08190930634737015, 0.018875310197472572, 0.06009519845247269, 0.0833461657166481, -0.07492073625326157, -0.00003743301203940064, 0.11812003701925278, -0.021358581259846687, -0.08910416066646576, 0.03028208389878273, 0.03095908649265766, 0.0848628357052803, -0.04118458554148674, -0.018665075302124023, -0.10883776843547821, 0.026466945186257362, 0.10487032681703568, -0.09547059237957001, 0.0806778222322464, -0.005166970193386078, 0.010866946540772915, -0.03193406015634537, 0.09810618311166763, -0.03433776646852493, -0.048487819731235504, -0.0352582223713398, 0.03797024115920067, -0.07762576639652252, 0.00046297520748339593, -0.024979162961244583, 0.07708846777677536, 0.06441008299589157, -0.01026073656976223, 0.09801860898733139, 0.039531297981739044, -0.018431998789310455, 0.08946850895881653, -0.0274137444794178, -0.004510445520281792, -0.06261108070611954, 0.18523499369621277, 0.024554839357733727, -0.13893350958824158, -0.049414705485105515, -0.04659045860171318, 0.012989090755581856, -0.03164612874388695, 0.07923513650894165, 0.006158603820949793, 0.01397221814841032, 0.019372299313545227, 0.0041664717718958855, -0.004382713232189417, 0.08122682571411133, -0.014259694144129753, -0.02198116108775139, -0.03464455530047417, -0.05721913278102875, -0.015922024846076965, 0.12238239496946335, -0.010042624548077583, -4.633823280641991e-8, -0.05444015935063362, -0.03544328361749649, -0.056617408990859985, -0.016137059777975082, 0.035746123641729355, 0.041088420897722244, 0.0046149143017828465, -0.01710130088031292, -0.029247645288705826, -0.05686865374445915, -0.03739486262202263, -0.018395187333226204, -0.0378694161772728, -0.028602050617337227, 0.022955982014536858, -0.07835428416728973, -0.06914082914590836, 0.004558437038213015, -0.028620172291994095, -0.08868744969367981, 0.05416261404752731, 0.0005470195319503546, -0.0916282907128334, 0.06165184825658798, -0.0018574842251837254, -0.028597593307495117, 0.07304924726486206, 0.06564096361398697, -0.027699287980794907, -0.1115751713514328, -0.06203446537256241, -0.04158195108175278, 0.10832465440034866, -0.06060535088181496, 0.0013789483346045017, 0.0329231433570385, 0.01749890111386776, -0.009799333289265633, 0.03701625019311905, -0.006829414051026106, 0.026251869276165962, 0.03764060512185097, 0.014234676025807858, -0.014807278290390968, -0.010129367932677269, 0.0016285046003758907, -0.055875856429338455, -0.019273368641734123, 0.03201514482498169, 0.019096044823527336, -0.03596305847167969, 0.043944742530584335, -0.026735490188002586, 0.06508251279592514, 0.009267371147871017, 0.0022899340838193893, 0.07271818071603775, -0.11325562745332718, -0.011608744040131569, -0.02299276553094387, 0.12816007435321808, 0.04886021837592125, -0.0038548740558326244, -0.026330644264817238 ]
0.118858
like `/status` don't work:** - Make sure your Telegram user ID is authorized (via pairing or `channels.telegram.allowFrom`) - Commands require authorization even in groups with `groupPolicy: "open"` **Long-polling aborts immediately on Node 22+ (often with proxies/custom fetch):** - Node 22+ is stricter about `AbortSignal` instances; foreign signals can abort `fetch` calls right away. - Upgrade to a OpenClaw build that normalizes abort signals, or run the gateway on Node 20 until you can upgrade. **Bot starts, then silently stops responding (or logs `HttpError: Network request ... failed`):** - Some hosts resolve `api.telegram.org` to IPv6 first. If your server does not have working IPv6 egress, grammY can get stuck on IPv6-only requests. - Fix by enabling IPv6 egress **or** forcing IPv4 resolution for `api.telegram.org` (for example, add an `/etc/hosts` entry using the IPv4 A record, or prefer IPv4 in your OS DNS stack), then restart the gateway. - Quick check: `dig +short api.telegram.org A` and `dig +short api.telegram.org AAAA` to confirm what DNS returns. ## Configuration reference (Telegram) Full configuration: [Configuration](/gateway/configuration) Provider options: - `channels.telegram.enabled`: enable/disable channel startup. - `channels.telegram.botToken`: bot token (BotFather). - `channels.telegram.tokenFile`: read token from file path. - `channels.telegram.dmPolicy`: `pairing | allowlist | open | disabled` (default: pairing). - `channels.telegram.allowFrom`: DM allowlist (ids/usernames). `open` requires `"*"`. - `channels.telegram.groupPolicy`: `open | allowlist | disabled` (default: allowlist). - `channels.telegram.groupAllowFrom`: group sender allowlist (ids/usernames). - `channels.telegram.groups`: per-group defaults + allowlist (use `"*"` for global defaults). - `channels.telegram.groups..requireMention`: mention gating default. - `channels.telegram.groups..skills`: skill filter (omit = all skills, empty = none). - `channels.telegram.groups..allowFrom`: per-group sender allowlist override. - `channels.telegram.groups..systemPrompt`: extra system prompt for the group. - `channels.telegram.groups..enabled`: disable the group when `false`. - `channels.telegram.groups..topics..*`: per-topic overrides (same fields as group). - `channels.telegram.groups..topics..requireMention`: per-topic mention gating override. - `channels.telegram.capabilities.inlineButtons`: `off | dm | group | all | allowlist` (default: allowlist). - `channels.telegram.accounts..capabilities.inlineButtons`: per-account override. - `channels.telegram.replyToMode`: `off | first | all` (default: `first`). - `channels.telegram.textChunkLimit`: outbound chunk size (chars). - `channels.telegram.chunkMode`: `length` (default) or `newline` to split on blank lines (paragraph boundaries) before length chunking. - `channels.telegram.linkPreview`: toggle link previews for outbound messages (default: true). - `channels.telegram.streamMode`: `off | partial | block` (draft streaming). - `channels.telegram.mediaMaxMb`: inbound/outbound media cap (MB). - `channels.telegram.retry`: retry policy for outbound Telegram API calls (attempts, minDelayMs, maxDelayMs, jitter). - `channels.telegram.network.autoSelectFamily`: override Node autoSelectFamily (true=enable, false=disable). Defaults to disabled on Node 22 to avoid Happy Eyeballs timeouts. - `channels.telegram.proxy`: proxy URL for Bot API calls (SOCKS/HTTP). - `channels.telegram.webhookUrl`: enable webhook mode (requires `channels.telegram.webhookSecret`). - `channels.telegram.webhookSecret`: webhook secret (required when webhookUrl is set). - `channels.telegram.webhookPath`: local webhook path (default `/telegram-webhook`). - `channels.telegram.actions.reactions`: gate Telegram tool reactions. - `channels.telegram.actions.sendMessage`: gate Telegram tool message sends. - `channels.telegram.actions.deleteMessage`: gate Telegram tool message deletes. - `channels.telegram.actions.sticker`: gate Telegram sticker actions β€” send and search (default: false). - `channels.telegram.reactionNotifications`: `off | own | all` β€” control which reactions trigger system events (default: `own` when not set). - `channels.telegram.reactionLevel`: `off | ack | minimal | extensive` β€” control agent's reaction capability (default: `minimal` when not set). Related global options: - `agents.list[].groupChat.mentionPatterns` (mention gating patterns). - `messages.groupChat.mentionPatterns` (global fallback). - `commands.native` (defaults to `"auto"` β†’ on for Telegram/Discord, off for Slack), `commands.text`, `commands.useAccessGroups` (command behavior). Override with `channels.telegram.commands.native`. - `messages.responsePrefix`, `messages.ackReaction`, `messages.ackReactionScope`, `messages.removeAckAfterReply`. ````
https://github.com/openclaw/openclaw/blob/main//docs/channels/telegram.md
main
opebclaw
[ 0.0238551814109087, -0.016554757952690125, 0.05071394145488739, -0.017386360093951225, -0.015363574028015137, -0.06925986707210541, -0.07544811815023422, -0.06294284760951996, -0.030674617737531662, 0.07734562456607819, -0.0105286268517375, -0.0236319899559021, -0.004250751342624426, 0.01785922423005104, 0.09271050989627838, 0.031193753704428673, 0.015090047381818295, -0.09715539962053299, -0.010710066184401512, -0.00408145971596241, -0.03136656805872917, 0.030971361324191093, 0.021158376708626747, 0.041019607335329056, -0.037046294659376144, -0.007473086006939411, -0.146796315908432, -0.048858385533094406, -0.015112626366317272, -0.0043148319236934185, 0.04017052426934242, -0.02257631905376911, -0.04176606982946396, -0.024792851880192757, 0.016894178465008736, 0.10253601521253586, -0.008997084572911263, 0.045303910970687866, -0.004394692834466696, 0.04717690125107765, 0.04453837499022484, -0.040032126009464264, -0.046975888311862946, 0.00469314306974411, 0.060909271240234375, -0.03473230451345444, 0.007803958375006914, 0.01141499262303114, 0.03790128231048584, 0.007619671989232302, -0.003596754278987646, -0.005191612057387829, 0.04619240388274193, 0.02906227298080921, 0.04070251062512398, 0.040073491632938385, 0.02786654233932495, 0.10228756815195084, 0.09593939781188965, -0.05910560116171837, -0.03759464994072914, -0.04990082606673241, 0.037853747606277466, -0.05100717395544052, -0.07920411229133606, 0.0025842550676316023, 0.013658552430570126, 0.05796853080391884, 0.02770281210541725, 0.01058126986026764, 0.12095031887292862, 0.049136918038129807, -0.06453153491020203, 0.006080574821680784, -0.06491981446743011, 0.06890082359313965, 0.08293507993221283, -0.016275478526949883, -0.034255243837833405, -0.04023018851876259, -0.022599991410970688, -0.01722988300025463, -0.0008695042342878878, -0.03303348645567894, -0.013233979232609272, 0.04124348983168602, 0.04888002201914787, -0.03232162445783615, -0.027510112151503563, 0.04111655429005623, 0.05415477603673935, 0.01741970144212246, 0.03399864211678505, -0.0060451277531683445, 0.06902892142534256, 0.01738240383565426, 0.016043972223997116, -0.06760429590940475, -0.06134061515331268, 0.04930594563484192, 0.07597469538450241, -0.016283443197607994, -0.07256218045949936, -0.05858026444911957, 0.04677669703960419, 0.01858588494360447, -0.023803245276212692, 0.07516414672136307, 0.0664977952837944, -0.004036713857203722, -0.013293774798512459, 0.0024119382724165916, 0.028093906119465828, 0.0024184747599065304, -0.004792141728103161, 0.013701261952519417, -0.0013409737730398774, 0.000696202798280865, -0.0027840700931847095, -0.004547378979623318, 0.13648341596126556, -0.03363202512264252, 0.0019843883346766233, -0.011424346826970577, -0.029330173507332802, 0.13906002044677734, 0.125192329287529, 6.054568794270446e-33, -0.001926189404912293, -0.016994565725326538, -0.10867883265018463, 0.06963720917701721, -0.002053386764600873, 0.02521476522088051, -0.031697940081357956, 0.045860353857278824, -0.09155169874429703, -0.03998623415827751, -0.07043538242578506, -0.05523011460900307, 0.002082608174532652, -0.023866865783929825, 0.050132375210523605, -0.059945326298475266, 0.07042668014764786, -0.04754769429564476, 0.055487461388111115, -0.021678494289517403, 0.04624960571527481, -0.07873362302780151, -0.01509761717170477, 0.07321637868881226, -0.007298220880329609, 0.08886272460222244, -0.008252792991697788, -0.014798535034060478, 0.06888845562934875, -0.007191816810518503, -0.028379328548908234, -0.002363409148529172, -0.008913587778806686, 0.015185133554041386, -0.016190988942980766, -0.06368475407361984, -0.011167272925376892, 0.02060709334909916, -0.04828584939241409, -0.10417528450489044, -0.046687524765729904, 0.010919999331235886, -0.09081775695085526, -0.019155491143465042, 0.08458860218524933, -0.007670472376048565, -0.018891606479883194, -0.013227613642811775, 0.019998745992779732, 0.0469043105840683, -0.010858448222279549, 0.0152843426913023, -0.011506238952279091, -0.035376597195863724, 0.028672702610492706, -0.03891424462199211, 0.004128830973058939, -0.11097806692123413, -0.030019449070096016, -0.05331017076969147, 0.08609022200107574, -0.05954272672533989, 0.004200621508061886, -0.06165299937129021, 0.012240261770784855, 0.04235479235649109, -0.007521013729274273, 0.05685117095708847, 0.01743151620030403, 0.04931708425283432, -0.05660391226410866, 0.03576109558343887, -0.0008299515466205776, 0.06926872581243515, -0.03802463412284851, -0.025638887658715248, -0.045473866164684296, -0.03509096801280975, 0.00041102993418462574, 0.003770895767956972, 0.023950643837451935, -0.025637779384851456, 0.03739790990948677, -0.037149351090192795, 0.07333202660083771, 0.049749549478292465, 0.018670717254281044, -0.022145578637719154, 0.027048170566558838, 0.11424684524536133, -0.07039550691843033, 0.10075336694717407, -0.0375046581029892, 0.044244084507226944, -0.09928897768259048, -6.03033561088626e-33, -0.015411715023219585, -0.011996566317975521, 0.0060378555208444595, -0.020106017589569092, 0.01511802151799202, -0.05904372036457062, -0.04301904886960983, 0.041833892464637756, -0.01837947405874729, 0.014562101103365421, -0.010058864019811153, -0.03656162694096565, 0.05311422795057297, -0.057924624532461166, -0.020589152351021767, -0.032810863107442856, -0.061238475143909454, 0.04009313881397247, 0.0005330286803655326, 0.048801492899656296, -0.08058087527751923, -0.012117074802517891, -0.09566650539636612, 0.05233460292220116, -0.025655992329120636, 0.03471534326672554, -0.05051439255475998, 0.021217217668890953, 0.03058900311589241, -0.0737275779247284, 0.10458308458328247, -0.02331044338643551, -0.09118466824293137, 0.0025999760255217552, 0.07362644374370575, 0.08189517259597778, 0.07036108523607254, 0.06063317507505417, -0.031728167086839676, 0.008151041343808174, 0.08916404843330383, 0.00554158678278327, -0.06357315927743912, 0.023570731282234192, -0.024080829694867134, -0.0065581765957176685, -0.028795937076210976, 0.04690318554639816, -0.19145455956459045, 0.04278527572751045, 0.06751080602407455, -0.04593617841601372, 0.1468573957681656, 0.059584036469459534, -0.03496021032333374, -0.0528564378619194, 0.0331152006983757, -0.0074122133664786816, -0.04750781133770943, 0.013675270602107048, 0.041176483035087585, -0.12297442555427551, -0.03527770936489105, 0.07353541254997253, -0.012131479568779469, -0.029454590752720833, 0.03119431808590889, 0.08447034657001495, -0.0003234385512769222, 0.0701003298163414, 0.07243654876947403, -0.011736275628209114, -0.020248260349035263, -0.03556647524237633, 0.05540923774242401, 0.024149958044290543, -0.09198689460754395, -0.03204145282506943, 0.012626439332962036, -0.01683073677122593, -0.012837815098464489, 0.11911316961050034, 0.046605274081230164, -0.026229219511151314, -0.040244683623313904, 0.030975263565778732, 0.08754655718803406, 0.01671699248254299, -0.027534913271665573, 0.0018523336621001363, -0.051560766994953156, -0.09108084440231323, -0.006738131400197744, 0.05823362246155739, 0.09030857682228088, -5.558072402322978e-8, 0.021017346531152725, 0.006857772823423147, -0.0486479215323925, 0.010169732384383678, 0.02082918956875801, 0.06972973048686981, -0.006744164973497391, -0.0785113051533699, -0.008553668856620789, 0.02868383750319481, -0.027455810457468033, 0.01539185456931591, -0.056763920933008194, -0.03676754981279373, -0.03732667118310928, -0.01805485039949417, -0.12727396190166473, 0.005713919177651405, 0.02149346098303795, -0.02104325033724308, 0.025909923017024994, -0.023244544863700867, -0.0556044764816761, 0.00007516714686062187, -0.03807428479194641, -0.14710000157356262, 0.08216417580842972, 0.030695024877786636, -0.052116479724645615, -0.07060563564300537, -0.08272482454776764, -0.07424326241016388, -0.027234500274062157, -0.055405858904123306, 0.014690921641886234, 0.06990080326795578, -0.04978404939174652, -0.017202263697981834, 0.045578256249427795, 0.0176139734685421, 0.046719759702682495, 0.01596412993967533, -0.00252805114723742, -0.0519297793507576, -0.057141173630952835, -0.04947241023182869, -0.010976569727063179, 0.01680079847574234, 0.0631684735417366, 0.05460884049534798, 0.045056793838739395, -0.023102080449461937, -0.052763864398002625, -0.0035270988009870052, -0.013303152285516262, 0.004841167945414782, -0.029965242370963097, -0.036870911717414856, -0.06147017702460289, -0.024149147793650627, 0.08556672185659409, -0.05335864797234535, -0.006792930886149406, -0.05142593011260033 ]
0.042344
# Nextcloud Talk (plugin) Status: supported via plugin (webhook bot). Direct messages, rooms, reactions, and markdown messages are supported. ## Plugin required Nextcloud Talk ships as a plugin and is not bundled with the core install. Install via CLI (npm registry): ```bash openclaw plugins install @openclaw/nextcloud-talk ``` Local checkout (when running from a git repo): ```bash openclaw plugins install ./extensions/nextcloud-talk ``` If you choose Nextcloud Talk during configure/onboarding and a git checkout is detected, OpenClaw will offer the local install path automatically. Details: [Plugins](/plugin) ## Quick setup (beginner) 1. Install the Nextcloud Talk plugin. 2. On your Nextcloud server, create a bot: ```bash ./occ talk:bot:install "OpenClaw" "" "" --feature reaction ``` 3. Enable the bot in the target room settings. 4. Configure OpenClaw: - Config: `channels.nextcloud-talk.baseUrl` + `channels.nextcloud-talk.botSecret` - Or env: `NEXTCLOUD\_TALK\_BOT\_SECRET` (default account only) 5. Restart the gateway (or finish onboarding). Minimal config: ```json5 { channels: { "nextcloud-talk": { enabled: true, baseUrl: "https://cloud.example.com", botSecret: "shared-secret", dmPolicy: "pairing", }, }, } ``` ## Notes - Bots cannot initiate DMs. The user must message the bot first. - Webhook URL must be reachable by the Gateway; set `webhookPublicUrl` if behind a proxy. - Media uploads are not supported by the bot API; media is sent as URLs. - The webhook payload does not distinguish DMs vs rooms; set `apiUser` + `apiPassword` to enable room-type lookups (otherwise DMs are treated as rooms). ## Access control (DMs) - Default: `channels.nextcloud-talk.dmPolicy = "pairing"`. Unknown senders get a pairing code. - Approve via: - `openclaw pairing list nextcloud-talk` - `openclaw pairing approve nextcloud-talk ```` ` - Public DMs: `channels.nextcloud-talk.dmPolicy="open"` plus `channels.nextcloud-talk.allowFrom=["*"]`. - `allowFrom` matches Nextcloud user IDs only; display names are ignored. ## Rooms (groups) - Default: `channels.nextcloud-talk.groupPolicy = "allowlist"` (mention-gated). - Allowlist rooms with `channels.nextcloud-talk.rooms`: ```json5 { channels: { "nextcloud-talk": { rooms: { "room-token": { requireMention: true }, }, }, }, } ``` - To allow no rooms, keep the allowlist empty or set `channels.nextcloud-talk.groupPolicy="disabled"`. ## Capabilities | Feature | Status | | --------------- | ------------- | | Direct messages | Supported | | Rooms | Supported | | Threads | Not supported | | Media | URL-only | | Reactions | Supported | | Native commands | Not supported | ## Configuration reference (Nextcloud Talk) Full configuration: [Configuration](/gateway/configuration) Provider options: - `channels.nextcloud-talk.enabled`: enable/disable channel startup. - `channels.nextcloud-talk.baseUrl`: Nextcloud instance URL. - `channels.nextcloud-talk.botSecret`: bot shared secret. - `channels.nextcloud-talk.botSecretFile`: secret file path. - `channels.nextcloud-talk.apiUser`: API user for room lookups (DM detection). - `channels.nextcloud-talk.apiPassword`: API/app password for room lookups. - `channels.nextcloud-talk.apiPasswordFile`: API password file path. - `channels.nextcloud-talk.webhookPort`: webhook listener port (default: 8788). - `channels.nextcloud-talk.webhookHost`: webhook host (default: 0.0.0.0). - `channels.nextcloud-talk.webhookPath`: webhook path (default: /nextcloud-talk-webhook). - `channels.nextcloud-talk.webhookPublicUrl`: externally reachable webhook URL. - `channels.nextcloud-talk.dmPolicy`: `pairing | allowlist | open | disabled`. - `channels.nextcloud-talk.allowFrom`: DM allowlist (user IDs). `open` requires `"*"`. - `channels.nextcloud-talk.groupPolicy`: `allowlist | open | disabled`. - `channels.nextcloud-talk.groupAllowFrom`: group allowlist (user IDs). - `channels.nextcloud-talk.rooms`: per-room settings and allowlist. - `channels.nextcloud-talk.historyLimit`: group history limit (0 disables). - `channels.nextcloud-talk.dmHistoryLimit`: DM history limit (0 disables). - `channels.nextcloud-talk.dms`: per-DM overrides (historyLimit). - `channels.nextcloud-talk.textChunkLimit`: outbound text chunk size (chars). - `channels.nextcloud-talk.chunkMode`: `length` (default) or `newline` to split on blank lines (paragraph boundaries) before length chunking. - `channels.nextcloud-talk.blockStreaming`: disable block streaming for this channel. - `channels.nextcloud-talk.blockStreamingCoalesce`: block streaming coalesce tuning. - `channels.nextcloud-talk.mediaMaxMb`: inbound media cap (MB). ````
https://github.com/openclaw/openclaw/blob/main//docs/channels/nextcloud-talk.md
main
opebclaw
[ -0.047624241560697556, -0.058945804834365845, -0.03979688510298729, -0.044228289276361465, 0.03700914978981018, -0.07742028683423996, -0.06703312695026398, -0.023344190791249275, 0.057953108102083206, 0.019230803474783897, 0.043908197432756424, -0.0715174749493599, 0.019590629264712334, 0.025998195633292198, 0.09385712444782257, 0.05170838162302971, 0.08601707220077515, -0.05713639780879021, 0.06389111280441284, -0.020039020106196404, -0.050288211554288864, 0.05498214811086655, 0.06470164656639099, -0.02193419821560383, -0.03411860764026642, -0.08286692202091217, -0.05085517838597298, 0.03197786211967468, -0.06992191076278687, 0.0561075396835804, 0.1094132512807846, 0.00220714183524251, -0.02716977894306183, 0.06514254212379456, -0.003821205347776413, 0.12422409653663635, 0.022991111502051353, -0.030995691195130348, -0.06938020884990692, -0.032001957297325134, 0.05689717456698418, -0.03510141000151634, -0.021853122860193253, -0.09829642623662949, 0.003565439023077488, -0.061504945158958435, -0.10161254554986954, -0.11334089189767838, -0.040335629135370255, 0.025115707889199257, -0.09734521061182022, -0.1593516618013382, 0.014691945165395737, 0.009122614748775959, 0.02253117226064205, 0.04134301841259003, -0.029600832611322403, 0.07303756475448608, 0.04412473738193512, -0.022473255172371864, 0.06908360123634338, -0.0667605996131897, -0.005684669595211744, 0.022991575300693512, -0.06535247713327408, 0.051964763551950455, -0.03973287343978882, 0.014025825075805187, 0.04119643568992615, -0.0636737197637558, 0.022850660607218742, 0.017342200502753258, -0.0218015406280756, -0.0863272100687027, -0.054651156067848206, -0.005697888787835836, 0.029092030599713326, 0.06927864998579025, -0.019672751426696777, -0.07881858944892883, -0.03566636145114899, -0.012936712242662907, 0.006449853535741568, 0.029575210064649582, -0.05926533043384552, 0.033301450312137604, 0.03693119063973427, 0.04299561306834221, -0.03355482220649719, 0.004883222281932831, 0.01831843890249729, -0.10228484869003296, -0.06766859441995621, -0.014775221236050129, 0.02945473976433277, -0.029330935329198837, -0.05635892599821091, 0.030747059732675552, 0.009807491675019264, 0.007214920595288277, -0.011076060123741627, -0.034747425466775894, -0.0022582297679036856, -0.13515791296958923, -0.0018841567216441035, -0.028500981628894806, 0.049315717071294785, 0.047649797052145004, 0.03920671343803406, -0.01031051017343998, -0.0761982649564743, -0.09274210780858994, 0.0963449776172638, -0.028134457767009735, -0.02927655167877674, 0.11869470030069351, 0.02351101115345955, -0.03266109526157379, 0.035909831523895264, 0.05176585540175438, 0.07249456644058228, -0.019004959613084793, 0.037956353276968, -0.038295526057481766, 0.06280610710382462, 0.06007837876677513, 0.022530050948262215, 4.6053741755126205e-33, 0.10829412192106247, -0.02076614834368229, -0.01984441839158535, 0.02395964041352272, 0.09345316141843796, -0.02848880924284458, -0.02902339957654476, -0.06813329458236694, -0.06465240567922592, 0.004187607206404209, 0.04205881059169769, 0.026670783758163452, -0.02505260333418846, 0.03790081664919853, 0.01727410778403282, -0.06286518275737762, -0.03564032167196274, 0.006573588587343693, 0.06490407139062881, -0.07316699624061584, -0.05915158614516258, -0.014687892980873585, -0.034272048622369766, 0.0069885775446891785, 0.060292359441518784, 0.0007804952911101282, 0.023714860901236534, -0.04907830432057381, 0.04384113475680351, 0.025531291961669922, -0.03423679992556572, -0.027608344331383705, -0.006547252181917429, 0.058824896812438965, -0.04852170869708061, 0.008160761557519436, -0.1775849610567093, -0.04154185578227043, -0.03809804469347, -0.03743397817015648, 0.11835616827011108, -0.06364548206329346, -0.07637237757444382, -0.05690862238407135, 0.04691494256258011, -0.022811053320765495, 0.020321113988757133, 0.006493293214589357, 0.10896199196577072, 0.026710228994488716, -0.01673175022006035, -0.021429194137454033, 0.016202479600906372, 0.05563672259449959, -0.0015635982854291797, -0.03810747340321541, -0.009577158838510513, -0.06926893442869186, 0.042429566383361816, -0.044236913323402405, -0.07360181957483292, -0.013748891651630402, 0.012762773782014847, 0.013513429090380669, -0.025048237293958664, -0.07268889993429184, -0.05528910458087921, 0.06185317039489746, 0.011464214883744717, 0.044597506523132324, 0.0232820063829422, 0.0042062862776219845, -0.003292825073003769, 0.017880326136946678, -0.04553445428609848, 0.008612062782049179, -0.013417443260550499, 0.035937655717134476, 0.03454005345702171, 0.025176241993904114, -0.020161334425210953, -0.02039780095219612, -0.06904111802577972, 0.05459034442901611, 0.048389602452516556, 0.069242462515831, 0.0667092576622963, -0.012224093079566956, -0.02976098842918873, 0.08087341487407684, -0.021612541750073433, 0.030797090381383896, -0.06867320835590363, 0.014640312641859055, -0.01560564711689949, -6.0263308485698026e-33, 0.003035204019397497, 0.0021357096266001463, -0.035801373422145844, 0.02790648303925991, 0.035190027207136154, 0.006060345098376274, 0.04098380357027054, -0.0751035213470459, 0.06413420289754868, -0.0060669053345918655, -0.012951680459082127, 0.025418596342206, 0.08015751093626022, -0.04074079543352127, 0.06262747198343277, 0.010419349186122417, -0.0577508844435215, -0.07693833112716675, 0.10661786794662476, 0.01887858845293522, 0.03929314762353897, -0.0049873413518071175, 0.011979013681411743, 0.03993374854326248, 0.02218666672706604, -0.0022691108752042055, 0.02645971067249775, 0.04043322056531906, 0.009379026480019093, -0.04398103430867195, 0.011495574377477169, 0.02870994247496128, -0.09123514592647552, 0.05194087326526642, 0.020811589434742928, 0.04258463904261589, 0.019643442705273628, 0.07352179288864136, 0.0014036911306902766, -0.031176183372735977, 0.07584970444440842, -0.08079123497009277, -0.11665580421686172, -0.033246662467718124, -0.018676478415727615, 0.03468654304742813, 0.019506031647324562, -0.020854976028203964, -0.12679386138916016, -0.0038973847404122353, -0.00701514445245266, 0.02147606387734413, 0.041533179581165314, 0.025694875046610832, -0.022140754386782646, 0.12139739096164703, 0.03617790341377258, -0.019349699839949608, -0.06796712428331375, -0.056773070245981216, -0.005378608591854572, -0.10529433190822601, 0.0848577618598938, -0.02812647446990013, -0.06837049871683121, 0.002541404915973544, -0.056283287703990936, 0.040190860629081726, -0.044121112674474716, 0.018820974975824356, -0.0564466193318367, -0.01166410744190216, -0.016823308542370796, -0.08258570730686188, 0.020025156438350677, -0.008694075047969818, -0.02255976013839245, -0.06540954113006592, 0.008151422254741192, -0.022508978843688965, -0.05647415295243263, 0.09203038364648819, 0.04058782383799553, -0.050358597189188004, 0.00833316519856453, -0.018127858638763428, -0.02688235603272915, 0.06183844804763794, -0.006816324777901173, 0.0018951710080727935, -0.03223864734172821, 0.06786912679672241, 0.019547482952475548, 0.010548636317253113, -0.00499104056507349, -5.480166720417401e-8, -0.06598824262619019, -0.006566789001226425, 0.01719609647989273, 0.02887030690908432, 0.04585392028093338, -0.0528339184820652, 0.10026275366544724, 0.02635832503437996, -0.033745188266038895, 0.03618614748120308, 0.05250401049852371, 0.002586345188319683, -0.012573870830237865, 0.030559716746211052, -0.05268000438809395, 0.05627419799566269, -0.011587334796786308, -0.007684457115828991, 0.008206655271351337, -0.07835698872804642, 0.00810918863862753, -0.016057802364230156, 0.04400293901562691, 0.05199109762907028, -0.06911662220954895, 0.030908726155757904, 0.005207971669733524, 0.015827268362045288, -0.0973028838634491, -0.037729110568761826, 0.0014738040044903755, -0.02421773225069046, -0.07173891365528107, -0.02852691151201725, 0.029898397624492645, -0.008905894123017788, -0.04330405965447426, -0.0010417900048196316, 0.027538344264030457, 0.030983226373791695, 0.010350792668759823, 0.022004256024956703, -0.01087512169033289, -0.04135860502719879, -0.0517255961894989, -0.005149929318577051, 0.02324802801012993, -0.09781787544488907, -0.033382195979356766, 0.04006620869040489, 0.016412900760769844, 0.008226694539189339, 0.040814172476530075, 0.09429346024990082, 0.11597772687673569, 0.08387033641338348, 0.06961195170879364, -0.00716068921610713, 0.04759286344051361, 0.10180225223302841, -0.05758710578083992, 0.07714222371578217, 0.08424670994281769, -0.029580699279904366 ]
0.071631
# Google Chat (Chat API) Status: ready for DMs + spaces via Google Chat API webhooks (HTTP only). ## Quick setup (beginner) 1. Create a Google Cloud project and enable the \*\*Google Chat API\*\*. - Go to: [Google Chat API Credentials](https://console.cloud.google.com/apis/api/chat.googleapis.com/credentials) - Enable the API if it is not already enabled. 2. Create a \*\*Service Account\*\*: - Press \*\*Create Credentials\*\* > \*\*Service Account\*\*. - Name it whatever you want (e.g., `openclaw-chat`). - Leave permissions blank (press \*\*Continue\*\*). - Leave principals with access blank (press \*\*Done\*\*). 3. Create and download the \*\*JSON Key\*\*: - In the list of service accounts, click on the one you just created. - Go to the \*\*Keys\*\* tab. - Click \*\*Add Key\*\* > \*\*Create new key\*\*. - Select \*\*JSON\*\* and press \*\*Create\*\*. 4. Store the downloaded JSON file on your gateway host (e.g., `~/.openclaw/googlechat-service-account.json`). 5. Create a Google Chat app in the [Google Cloud Console Chat Configuration](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat): - Fill in the \*\*Application info\*\*: - \*\*App name\*\*: (e.g. `OpenClaw`) - \*\*Avatar URL\*\*: (e.g. `https://openclaw.ai/logo.png`) - \*\*Description\*\*: (e.g. `Personal AI Assistant`) - Enable \*\*Interactive features\*\*. - Under \*\*Functionality\*\*, check \*\*Join spaces and group conversations\*\*. - Under \*\*Connection settings\*\*, select \*\*HTTP endpoint URL\*\*. - Under \*\*Triggers\*\*, select \*\*Use a common HTTP endpoint URL for all triggers\*\* and set it to your gateway's public URL followed by `/googlechat`. - \_Tip: Run `openclaw status` to find your gateway's public URL.\_ - Under \*\*Visibility\*\*, check \*\*Make this Chat app available to specific people and groups in <Your Domain>\*\*. - Enter your email address (e.g. `user@example.com`) in the text box. - Click \*\*Save\*\* at the bottom. 6. \*\*Enable the app status\*\*: - After saving, \*\*refresh the page\*\*. - Look for the \*\*App status\*\* section (usually near the top or bottom after saving). - Change the status to \*\*Live - available to users\*\*. - Click \*\*Save\*\* again. 7. Configure OpenClaw with the service account path + webhook audience: - Env: `GOOGLE\_CHAT\_SERVICE\_ACCOUNT\_FILE=/path/to/service-account.json` - Or config: `channels.googlechat.serviceAccountFile: "/path/to/service-account.json"`. 8. Set the webhook audience type + value (matches your Chat app config). 9. Start the gateway. Google Chat will POST to your webhook path. ## Add to Google Chat Once the gateway is running and your email is added to the visibility list: 1. Go to [Google Chat](https://chat.google.com/). 2. Click the \*\*+\*\* (plus) icon next to \*\*Direct Messages\*\*. 3. In the search bar (where you usually add people), type the \*\*App name\*\* you configured in the Google Cloud Console. - \*\*Note\*\*: The bot will \_not\_ appear in the "Marketplace" browse list because it is a private app. You must search for it by name. 4. Select your bot from the results. 5. Click \*\*Add\*\* or \*\*Chat\*\* to start a 1:1 conversation. 6. Send "Hello" to trigger the assistant! ## Public URL (Webhook-only) Google Chat webhooks require a public HTTPS endpoint. For security, \*\*only expose the `/googlechat` path\*\* to the internet. Keep the OpenClaw dashboard and other sensitive endpoints on your private network. ### Option A: Tailscale Funnel (Recommended) Use Tailscale Serve for the private dashboard and Funnel for the public webhook path. This keeps `/` private while exposing only `/googlechat`. 1. \*\*Check what address your gateway is bound to:\*\* ```bash ss -tlnp | grep 18789 ``` Note the IP address (e.g., `127.0.0.1`, `0.0.0.0`, or your Tailscale IP like `100.x.x.x`). 2. \*\*Expose the dashboard to the tailnet only (port 8443):\*\* ```bash # If bound to localhost (127.0.0.1 or 0.0.0.0): tailscale serve --bg --https 8443 http://127.0.0.1:18789 # If bound to Tailscale IP only (e.g., 100.106.161.80): tailscale serve --bg --https 8443 http://100.106.161.80:18789 ``` 3. \*\*Expose only the webhook path publicly:\*\* ```bash # If bound to localhost (127.0.0.1 or 0.0.0.0): tailscale
https://github.com/openclaw/openclaw/blob/main//docs/channels/googlechat.md
main
opebclaw
[ -0.10940342396497726, -0.05663745850324631, 0.011696627363562584, -0.031246846541762352, -0.05471125245094299, -0.09877172112464905, 0.011439492926001549, -0.050806812942028046, 0.006945687346160412, 0.05116930976510048, 0.010343683883547783, -0.0706341564655304, 0.01527366228401661, -0.013660900294780731, 0.12207303196191788, 0.053239766508340836, 0.060139499604701996, -0.07387382537126541, -0.029262380674481392, 0.0022632332984358072, 0.01831669732928276, 0.04019831120967865, 0.006913947407156229, -0.041307877749204636, -0.027965394780039787, -0.05753239989280701, 0.0012045096373185515, 0.004743352998048067, -0.007189260330051184, 0.05731796473264694, 0.03885972127318382, -0.07417093962430954, 0.04517024755477905, 0.07020248472690582, 0.05298943445086479, 0.059500548988580704, 0.03192165866494179, 0.02764466218650341, -0.028021179139614105, 0.03535429760813713, -0.020269257947802544, -0.06657350808382034, -0.04436028376221657, -0.08807778358459473, 0.01759439893066883, -0.02522844262421131, -0.04731075465679169, -0.04709285870194435, 0.010895748622715473, 0.03424510359764099, -0.024763111025094986, -0.028110723942518234, -0.002558171283453703, 0.015427573584020138, -0.054226353764534, 0.0146596385166049, -0.07228472083806992, 0.12821249663829803, 0.03976860269904137, -0.02293749339878559, 0.027809908613562584, -0.07860516756772995, 0.025575507432222366, -0.026196392253041267, -0.058880701661109924, 0.033453553915023804, 0.012150788679718971, -0.023912755772471428, -0.025598620995879173, -0.03017180599272251, -0.021221814677119255, 0.054073870182037354, -0.09309995174407959, -0.049814917147159576, -0.05645041540265083, -0.004167196340858936, -0.04602707549929619, 0.04124165698885918, 0.02024819515645504, 0.0013562726089730859, 0.02154078520834446, 0.026725368574261665, 0.041435301303863525, 0.0996544361114502, -0.13618774712085724, 0.02686949074268341, -0.030328407883644104, 0.00889349915087223, 0.004173050168901682, -0.009817248210310936, 0.004071117844432592, -0.09280215203762054, -0.043701138347387314, 0.0017760269111022353, 0.0438416413962841, -0.0010170292807742953, -0.0054815784096717834, 0.04608452692627907, -0.03703397884964943, 0.03192964941263199, -0.02196359634399414, 0.011740067973732948, -0.036576662212610245, -0.08394834399223328, -0.005256175994873047, 0.02024536021053791, -0.0361979678273201, 0.05189202353358269, 0.053021691739559174, -0.01902245730161667, -0.04348508268594742, 0.023366330191493034, 0.0010489454725757241, 0.01764126867055893, -0.009045193903148174, 0.03486619144678116, -0.025390461087226868, -0.10304131358861923, 0.08412422239780426, 0.060356032103300095, 0.13139371573925018, -0.07108360528945923, 0.012531381100416183, -0.004502176772803068, -0.02029401622712612, 0.08870317786931992, 0.04996030032634735, 3.2816900273279675e-33, 0.09338889271020889, 0.013612844981253147, 0.05934012308716774, 0.06014755368232727, 0.05550790950655937, 0.009386940859258175, 0.03374503180384636, 0.007121361792087555, -0.04109455272555351, -0.04062512516975403, -0.003175000660121441, 0.05130697414278984, -0.02213871479034424, -0.03362595662474632, 0.004888192750513554, 0.04569752514362335, -0.014330132864415646, 0.03302188962697983, 0.11559417098760605, -0.018609119579195976, -0.08866490423679352, 0.005539600737392902, 0.05535859242081642, 0.016521302983164787, 0.027093350887298584, 0.0733884796500206, 0.02956988476216793, -0.0600312165915966, 0.014764746651053429, 0.021381787955760956, 0.039107974618673325, -0.05718590319156647, -0.035257093608379364, 0.07230173051357269, -0.004044464323669672, -0.0095472177490592, -0.14142562448978424, 0.006471454631537199, -0.04001017287373543, 0.004170544445514679, -0.040041495114564896, -0.06114193797111511, -0.041676606982946396, -0.06724511086940765, -0.021593254059553146, -0.04502755403518677, -0.005482912994921207, -0.09664173424243927, 0.04302312061190605, 0.06862659007310867, -0.016596276313066483, -0.006790162995457649, -0.08076018840074539, -0.0285533145070076, 0.004403796512633562, -0.10342718660831451, -0.015075360424816608, -0.06579101085662842, -0.043285071849823, -0.07857305556535721, -0.025577465072274208, 0.03605564311146736, 0.030527252703905106, -0.009235634468495846, 0.04497391730546951, -0.09580822288990021, -0.07921437174081802, 0.035998180508613586, -0.05819603055715561, -0.05536537617444992, 0.05788346379995346, -0.02046080119907856, 0.06091401353478432, 0.03464094176888466, -0.07927948236465454, 0.012898466549813747, 0.05668099597096443, 0.07515677809715271, -0.03933028504252434, 0.007392645813524723, 0.09514307230710983, -0.03082033060491085, -0.004308040719479322, -0.016879720613360405, -0.0490570105612278, -0.029217032715678215, 0.06525896489620209, -0.044659391045570374, -0.005202617030590773, 0.0681765004992485, -0.09550940990447998, -0.006930308882147074, 0.0052760569378733635, 0.009251167997717857, -0.06185368821024895, -5.485096515252758e-33, 0.03637249022722244, 0.037607017904520035, -0.05433182045817375, -0.013351887464523315, 0.08203224837779999, 0.014824878424406052, 0.09940899163484573, -0.007414355408400297, -0.007859301753342152, 0.051434747874736786, -0.020124219357967377, 0.012751718983054161, 0.029799288138747215, 0.03096790984272957, 0.08552101254463196, 0.03468000143766403, -0.03423091396689415, -0.08160681277513504, -0.06914228945970535, -0.0085173724219203, 0.023425724357366562, 0.017642702907323837, 0.010250452905893326, 0.023893220350146294, 0.028672924265265465, -0.06531509757041931, 0.0010156894568353891, 0.042112160474061966, -0.025982625782489777, 0.0011202495079487562, 0.033706411719322205, 0.04463514685630798, -0.06864802539348602, 0.07027940452098846, 0.03528435155749321, -0.06740990281105042, 0.04968566820025444, 0.06354978680610657, 0.0074686333537101746, -0.09543345868587494, 0.0661306083202362, -0.15780560672283173, -0.04176351800560951, -0.09189402312040329, 0.07536175101995468, 0.045526254922151566, -0.0420231968164444, -0.0010175631614401937, -0.14925740659236908, 0.0012053740210831165, 0.04030310735106468, -0.011016052216291428, 0.0074076056480407715, -0.013298091478645802, -0.006767836399376392, 0.06286513060331345, 0.0743311271071434, -0.01036226935684681, -0.03635526821017265, -0.050415609031915665, -0.024084342643618584, -0.1368284523487091, 0.050263095647096634, 0.06050039455294609, -0.01729184202849865, -0.041155993938446045, -0.010472542606294155, 0.08631497621536255, -0.10158877074718475, -0.02029566839337349, -0.06323295831680298, -0.09150516241788864, 0.02389778196811676, -0.00844833254814148, 0.013175751082599163, 0.030029423534870148, 0.014676937833428383, -0.08171585202217102, 0.037010181695222855, 0.006545641925185919, 0.019045677036046982, 0.015214131213724613, 0.07110706716775894, 0.03345822915434837, 0.03051876835525036, 0.0010848349193111062, 0.04245404526591301, 0.07073817402124405, -0.01742243580520153, -0.016649505123496056, -0.08375683426856995, -0.002466162433847785, -0.012828901410102844, 0.01937803626060486, 0.06348326057195663, -5.265502878160078e-8, -0.0496392622590065, -0.07382576167583466, -0.03331078216433525, 0.06189855933189392, -0.0385388545691967, -0.03409873694181442, 0.0035411864519119263, 0.04607747122645378, 0.03649701550602913, 0.04661007970571518, 0.022094449028372765, 0.011004404164850712, 0.003626725636422634, -0.0031801944132894278, -0.10211853682994843, 0.00042621130705811083, -0.08433953672647476, -0.02226821891963482, 0.059857167303562164, -0.011513079516589642, 0.06423258036375046, -0.024832626804709435, 0.03623582422733307, 0.006502164993435144, 0.02115149050951004, -0.03386162221431732, 0.04265173524618149, 0.022416284307837486, -0.07175656408071518, -0.02335943840444088, -0.05388835445046425, -0.04947330430150032, -0.05057547613978386, -0.019381821155548096, 0.0110411886125803, -0.07739482074975967, -0.07198060303926468, -0.03541089594364166, 0.002746886806562543, -0.005320472177118063, 0.05068749934434891, 0.052092406898736954, 0.013203299604356289, -0.03455491364002228, 0.03591056168079376, 0.031244661659002304, 0.03637481853365898, -0.011899285949766636, 0.009408815763890743, 0.12258309125900269, -0.04422492906451225, 0.02799312025308609, 0.06552760303020477, 0.04410335794091225, 0.018423136323690414, 0.010257014073431492, 0.02043663151562214, -0.02527576871216297, -0.004484115168452263, 0.07463038712739944, 0.012629624456167221, 0.1854383498430252, -0.02549980767071247, 0.009403320029377937 ]
-0.024389
(port 8443):\*\* ```bash # If bound to localhost (127.0.0.1 or 0.0.0.0): tailscale serve --bg --https 8443 http://127.0.0.1:18789 # If bound to Tailscale IP only (e.g., 100.106.161.80): tailscale serve --bg --https 8443 http://100.106.161.80:18789 ``` 3. \*\*Expose only the webhook path publicly:\*\* ```bash # If bound to localhost (127.0.0.1 or 0.0.0.0): tailscale funnel --bg --set-path /googlechat http://127.0.0.1:18789/googlechat # If bound to Tailscale IP only (e.g., 100.106.161.80): tailscale funnel --bg --set-path /googlechat http://100.106.161.80:18789/googlechat ``` 4. \*\*Authorize the node for Funnel access:\*\* If prompted, visit the authorization URL shown in the output to enable Funnel for this node in your tailnet policy. 5. \*\*Verify the configuration:\*\* ```bash tailscale serve status tailscale funnel status ``` Your public webhook URL will be: `https://..ts.net/googlechat` Your private dashboard stays tailnet-only: `https://..ts.net:8443/` Use the public URL (without `:8443`) in the Google Chat app config. > Note: This configuration persists across reboots. To remove it later, run `tailscale funnel reset` and `tailscale serve reset`. ### Option B: Reverse Proxy (Caddy) If you use a reverse proxy like Caddy, only proxy the specific path: ```caddy your-domain.com { reverse\_proxy /googlechat\* localhost:18789 } ``` With this config, any request to `your-domain.com/` will be ignored or returned as 404, while `your-domain.com/googlechat` is safely routed to OpenClaw. ### Option C: Cloudflare Tunnel Configure your tunnel's ingress rules to only route the webhook path: - \*\*Path\*\*: `/googlechat` -> `http://localhost:18789/googlechat` - \*\*Default Rule\*\*: HTTP 404 (Not Found) ## How it works 1. Google Chat sends webhook POSTs to the gateway. Each request includes an `Authorization: Bearer ` header. 2. OpenClaw verifies the token against the configured `audienceType` + `audience`: - `audienceType: "app-url"` β†’ audience is your HTTPS webhook URL. - `audienceType: "project-number"` β†’ audience is the Cloud project number. 3. Messages are routed by space: - DMs use session key `agent::googlechat:dm:`. - Spaces use session key `agent::googlechat:group:`. 4. DM access is pairing by default. Unknown senders receive a pairing code; approve with: - `openclaw pairing approve googlechat ```` ` 5. Group spaces require @-mention by default. Use `botUser` if mention detection needs the app’s user name. ## Targets Use these identifiers for delivery and allowlists: - Direct messages: `users/` or `users/` (email addresses are accepted). - Spaces: `spaces/`. ## Config highlights ```json5 { channels: { googlechat: { enabled: true, serviceAccountFile: "/path/to/service-account.json", audienceType: "app-url", audience: "https://gateway.example.com/googlechat", webhookPath: "/googlechat", botUser: "users/1234567890", // optional; helps mention detection dm: { policy: "pairing", allowFrom: ["users/1234567890", "name@example.com"], }, groupPolicy: "allowlist", groups: { "spaces/AAAA": { allow: true, requireMention: true, users: ["users/1234567890"], systemPrompt: "Short answers only.", }, }, actions: { reactions: true }, typingIndicator: "message", mediaMaxMb: 20, }, }, } ``` Notes: - Service account credentials can also be passed inline with `serviceAccount` (JSON string). - Default webhook path is `/googlechat` if `webhookPath` isn’t set. - Reactions are available via the `reactions` tool and `channels action` when `actions.reactions` is enabled. - `typingIndicator` supports `none`, `message` (default), and `reaction` (reaction requires user OAuth). - Attachments are downloaded through the Chat API and stored in the media pipeline (size capped by `mediaMaxMb`). ## Troubleshooting ### 405 Method Not Allowed If Google Cloud Logs Explorer shows errors like: ``` status code: 405, reason phrase: HTTP error response: HTTP/1.1 405 Method Not Allowed ``` This means the webhook handler isn't registered. Common causes: 1. **Channel not configured**: The `channels.googlechat` section is missing from your config. Verify with: ```bash openclaw config get channels.googlechat ``` If it returns "Config path not found", add the configuration (see [Config highlights](#config-highlights)). 2. **Plugin not enabled**: Check plugin status: ```bash openclaw plugins list | grep googlechat ``` If it shows "disabled", add `plugins.entries.googlechat.enabled: true` to your config. 3. **Gateway not restarted**: After adding config, restart
https://github.com/openclaw/openclaw/blob/main//docs/channels/googlechat.md
main
opebclaw
[ 0.009524781256914139, 0.08561164885759354, -0.034104254096746445, -0.06004676595330238, -0.018102655187249184, -0.11236647516489029, -0.032782066613435745, -0.01878010295331478, -0.008278192020952702, -0.010327069088816643, 0.03516048192977905, -0.09901659935712814, -0.014444314874708652, -0.0432424359023571, 0.06642469763755798, -0.013981720432639122, 0.024341832846403122, -0.057128991931676865, -0.0026388985570520163, -0.08967316150665283, -0.005022814031690359, 0.02918899804353714, -0.0020865444093942642, -0.01532367430627346, -0.09899087995290756, -0.03719509392976761, 0.0008352281292900443, 0.017088819295167923, -0.010297993198037148, 0.006648209411650896, 0.00362352654337883, -0.02940787933766842, -0.09058693796396255, 0.04986844211816788, -0.027778146788477898, 0.042497046291828156, 0.08042037487030029, 0.017311524599790573, -0.008019273169338703, 0.09666513651609421, 0.1371605396270752, -0.09168725460767746, -0.010746692307293415, -0.0698193609714508, -0.02507718652486801, -0.0433846041560173, -0.04576953873038292, 0.009384025819599628, -0.05685516446828842, -0.004399266093969345, -0.010211393237113953, -0.023285498842597008, -0.04920647293329239, 0.036416392773389816, -0.023947997018694878, -0.0050035747699439526, -0.043298572301864624, 0.08780479431152344, 0.038748279213905334, 0.011156266555190086, 0.043726470321416855, -0.045205987989902496, -0.006677307188510895, -0.02302579954266548, -0.024783693253993988, -0.056113872677087784, 0.0048692720010876656, 0.00693035451695323, 0.03653698042035103, 0.04251059144735336, -0.01722046732902527, 0.02734050340950489, -0.11742810904979706, 0.01040908694267273, -0.006429100409150124, 0.042252637445926666, 0.005606161430478096, 0.012943807058036327, -0.02002587355673313, -0.05583278462290764, 0.008883112110197544, -0.10386546701192856, 0.025605712085962296, 0.09620014578104019, -0.05021369457244873, 0.020126638934016228, -0.0069505698047578335, -0.0102321095764637, 0.07162604480981827, 0.008116231299936771, -0.00021921641018707305, -0.014584352262318134, -0.06842778623104095, -0.02013900876045227, 0.015488515608012676, 0.020028743892908096, -0.04394523426890373, 0.04849984496831894, -0.05286958068609238, 0.04475457966327667, -0.04157501459121704, -0.0315287820994854, 0.006401623133569956, -0.022418368607759476, 0.009083699434995651, -0.020908690989017487, -0.005736337974667549, 0.01888304017484188, 0.10925643891096115, 0.0001274476235266775, -0.009391880594193935, -0.057228174060583115, 0.06799618154764175, -0.03647838160395622, -0.032527003437280655, 0.06831905245780945, -0.005678432993590832, 0.004326710943132639, -0.002288918010890484, 0.07350064814090729, 0.022040389478206635, 0.05973183363676071, 0.0362943634390831, -0.00045062118442729115, -0.01125642191618681, 0.014727585949003696, 0.0858144536614418, 4.915774846448769e-33, 0.0762234777212143, 0.02206086553633213, -0.0007105963304638863, -0.09507390856742859, 0.05513918027281761, 0.05270843207836151, 0.027735861018300056, -0.020534206181764603, -0.024701401591300964, 0.0156986266374588, 0.0480789989233017, 0.018684610724449158, -0.02776292711496353, -0.0656614899635315, 0.0051546660251915455, 0.05257466062903404, 0.026032915338873863, 0.05654868856072426, 0.04430790990591049, 0.004990547429770231, 0.018672969192266464, -0.0914120227098465, -0.07993102073669434, -0.1124151423573494, 0.008981007151305676, -0.03067893721163273, -0.029205139726400375, -0.026703372597694397, -0.013253466226160526, 0.033271580934524536, 0.040954168885946274, 0.025374816730618477, 0.013410765677690506, 0.012988169677555561, 0.0110838757827878, -0.06652089953422546, -0.07160485535860062, -0.0497102290391922, 0.002508272882550955, -0.03738079592585564, -0.024308422580361366, -0.055847808718681335, -0.05967145040631294, -0.00723706278949976, -0.03909407928586006, 0.01237820740789175, -0.07434956729412079, -0.09343235939741135, 0.05427105352282524, 0.0011282588820904493, -0.06644439697265625, -0.0477999709546566, 0.030529342591762543, -0.017764609307050705, 0.05363445729017258, 0.016774946823716164, -0.03391217067837715, -0.02253125235438347, -0.05011449754238129, -0.04084647446870804, 0.056445784866809845, 0.07832222431898117, -0.01534505095332861, -0.020119737833738327, 0.09456923604011536, 0.034895773977041245, -0.00017230365483555943, 0.09260986745357513, -0.0748070701956749, 0.024424958974123, 0.02014177292585373, 0.012079772539436817, 0.07403035461902618, 0.06639063358306885, -0.053093526512384415, -0.016621090471744537, 0.04088124632835388, 0.10321320593357086, 0.016752082854509354, -0.04006931558251381, 0.030026528984308243, -0.01963954046368599, -0.012636995874345303, 0.044641658663749695, 0.0014666718197986484, 0.03660993650555611, 0.04412933066487312, -0.043990347534418106, -0.0412084199488163, 0.06043154001235962, -0.07055533677339554, 0.000024947348720161244, -0.030813664197921753, -0.05526954308152199, -0.09046506881713867, -5.784054850709606e-33, -0.020713021978735924, 0.08289027959108353, -0.0608937107026577, 0.0035499008372426033, 0.008397858589887619, 0.015111538581550121, 0.138795405626297, -0.04186161980032921, -0.025304455310106277, -0.010994893498718739, 0.010832569561898708, 0.04808465391397476, 0.04425879195332527, -0.033617399632930756, -0.0020979512482881546, 0.002894181990996003, 0.025088481605052948, -0.036431219428777695, 0.009241673164069653, -0.056316398084163666, -0.04253602400422096, 0.046863310039043427, -0.005814523436129093, 0.089448943734169, 0.0190630704164505, -0.08838839828968048, 0.07770753651857376, -0.0014763311482965946, -0.11708696186542511, -0.023955881595611572, 0.04070776328444481, 0.02313944138586521, 0.030111728236079216, 0.022183068096637726, -0.05043448507785797, -0.04281911626458168, 0.014254149980843067, 0.13896222412586212, 0.12214326113462448, -0.06338239461183548, 0.06738213449716568, -0.10568366199731827, -0.016572240740060806, -0.001242494792677462, -0.03465760126709938, 0.062273431569337845, 0.024060305207967758, 0.028859339654445648, -0.11055796593427658, 0.03091644123196602, 0.0029222737066447735, 0.05221036821603775, 0.007930214516818523, 0.08067907392978668, -0.028418999165296555, 0.11508215218782425, 0.014924414455890656, -0.02864452265202999, -0.030063604936003685, -0.05556708574295044, 0.01427476480603218, -0.08101924508810043, -0.04180476814508438, 0.10506552457809448, 0.028678791597485542, -0.06826651096343994, -0.11323899775743484, 0.028839128091931343, 0.02608148753643036, -0.05134015902876854, 0.0017843435052782297, -0.016349419951438904, 0.04888909310102463, 0.0009236359619535506, 0.024648554623126984, 0.03193962574005127, 0.06486354768276215, 0.021206432953476906, 0.0014453876065090299, 0.09028197079896927, -0.07863336056470871, 0.09210369735956192, -0.034092821180820465, -0.0640454813838005, 0.062216561287641525, -0.02265593782067299, -0.06699781119823456, 0.0790436714887619, 0.0318794921040535, 0.010056840255856514, -0.06828702241182327, 0.05660552158951759, -0.08366143703460693, 0.028878802433609962, 0.013543969951570034, -5.345679454649144e-8, 0.08151417970657349, -0.03463013097643852, 0.0052690706215798855, 0.10397978127002716, 0.01022277306765318, 0.061560895293951035, 0.018350593745708466, -0.05606206879019737, -0.08320767432451248, 0.0449739471077919, -0.027839817106723785, 0.04253001511096954, -0.02458263747394085, 0.06204269453883171, -0.04367179796099663, -0.07542514055967331, 0.02415706031024456, -0.04954075813293457, -0.002726328559219837, -0.05300956591963768, -0.024807315319776535, -0.08211219310760498, 0.017521435394883156, 0.020932471379637718, -0.03267256170511246, 0.047499049454927444, 0.008398895151913166, -0.017918402329087257, -0.04976925626397133, 0.04770916327834129, -0.014996575191617012, -0.05140438675880432, -0.08115390688180923, 0.005679471883922815, -0.07313946634531021, 0.02925271913409233, -0.1877550631761551, 0.036143843084573746, -0.030368564650416374, 0.015524538233876228, 0.0469641238451004, 0.028240559622645378, 0.0623430572450161, 0.02024233341217041, 0.04143676534295082, 0.006235700100660324, 0.04661429673433304, 0.017194822430610657, 0.08096200972795486, 0.04512378200888634, -0.014849072322249413, -0.03140950947999954, 0.11469224840402603, 0.010260685347020626, 0.04672524333000183, 0.025512710213661194, 0.027620619162917137, -0.06489725410938263, -0.04661845788359642, 0.11298756301403046, 0.029582835733890533, -0.024730946868658066, 0.0421835333108902, 0.04435400664806366 ]
0.000821
config get channels.googlechat ``` If it returns "Config path not found", add the configuration (see [Config highlights](#config-highlights)). 2. **Plugin not enabled**: Check plugin status: ```bash openclaw plugins list | grep googlechat ``` If it shows "disabled", add `plugins.entries.googlechat.enabled: true` to your config. 3. **Gateway not restarted**: After adding config, restart the gateway: ```bash openclaw gateway restart ``` Verify the channel is running: ```bash openclaw channels status # Should show: Google Chat default: enabled, configured, ... ``` ### Other issues - Check `openclaw channels status --probe` for auth errors or missing audience config. - If no messages arrive, confirm the Chat app's webhook URL + event subscriptions. - If mention gating blocks replies, set `botUser` to the app's user resource name and verify `requireMention`. - Use `openclaw logs --follow` while sending a test message to see if requests reach the gateway. Related docs: - [Gateway configuration](/gateway/configuration) - [Security](/gateway/security) - [Reactions](/tools/reactions) ````
https://github.com/openclaw/openclaw/blob/main//docs/channels/googlechat.md
main
opebclaw
[ -0.00868457742035389, -0.09454257786273956, -0.003082540351897478, -0.0012662650551646948, -0.005479829385876656, -0.09134643524885178, -0.04304429516196251, -0.07142417132854462, -0.030454708263278008, -0.009752911515533924, 0.06324315071105957, -0.054918572306632996, -0.03318919241428375, 0.01818232424557209, 0.121597521007061, 0.053658243268728256, 0.05908716470003128, -0.15393726527690887, -0.006359970662742853, -0.05698356404900551, -0.02166755683720112, 0.05687049403786659, 0.03334757685661316, -0.03364003449678421, -0.019509466364979744, -0.11598320305347443, -0.02951054833829403, -0.01302239578217268, -0.056360386312007904, -0.00783170573413372, 0.017067210748791695, -0.011838002130389214, -0.06271152198314667, 0.04928348958492279, 0.03671564534306526, 0.029178129509091377, 0.07837939262390137, 0.01935144141316414, -0.011327872984111309, 0.07943779230117798, 0.05208384618163109, -0.06512574106454849, -0.026064282283186913, -0.07314259558916092, 0.006617169361561537, -0.02990729548037052, -0.01054881326854229, -0.07462548464536667, 0.0031461501494050026, -0.005761298350989819, -0.0239688903093338, -0.019826332107186317, 0.03123677521944046, 0.02339024282991886, 0.02969193458557129, 0.05537378787994385, -0.053739432245492935, 0.08957323431968689, 0.09721557796001434, -0.043306391686201096, -0.006934333126991987, -0.0035317239817231894, -0.03611224517226219, -0.011785194277763367, -0.11872195452451706, 0.016454171389341354, -0.005912084132432938, -0.0804673358798027, -0.01317590568214655, 0.031983502209186554, -0.007171609904617071, 0.07170210033655167, -0.09525977075099945, -0.041368238627910614, -0.029610704630613327, -0.010152970440685749, 0.03748152032494545, -0.014561246149241924, -0.021640323102474213, -0.02899150364100933, -0.01654314622282982, -0.03594401106238365, -0.02107633277773857, 0.10954028367996216, -0.04445016756653786, 0.03948560729622841, -0.0288962721824646, 0.019785720854997635, 0.0004691458016168326, 0.052002910524606705, -0.022510576993227005, -0.06303300708532333, -0.03825242817401886, 0.010175487026572227, 0.002494117245078087, 0.0051504881121218204, -0.04470984637737274, 0.0034730539191514254, -0.0447918064892292, 0.054707080125808716, 0.027951180934906006, -0.02804303914308548, 0.037545766681432724, -0.007338698487728834, -0.025603439658880234, 0.013149406760931015, 0.029639704152941704, 0.09882519394159317, 0.0625079870223999, 0.008447260595858097, -0.005866297986358404, -0.0374905988574028, 0.15180526673793793, -0.00900915078818798, -0.04163273051381111, 0.11404954642057419, -0.02896418794989586, -0.04811511188745499, 0.013549907132983208, 0.09494514763355255, 0.09594359993934631, -0.006818641442805529, 0.061759721487760544, -0.009629936888813972, 0.01946662738919258, 0.10101926326751709, 0.08531087636947632, 4.744530298788917e-33, 0.07722306251525879, -0.03941406309604645, -0.05340762063860893, 0.02318432554602623, 0.03187502920627594, 0.08923732489347458, -0.0261449683457613, -0.01135527715086937, -0.03626403585076332, -0.01189005933701992, 0.041086047887802124, 0.012200497090816498, -0.11410511285066605, -0.039593491703271866, -0.015416665002703667, 0.08699587732553482, -0.03089870698750019, 0.011002989485859871, 0.041025180369615555, -0.03496802598237991, 0.00653899135068059, -0.06334809213876724, -0.0036016390658915043, 0.02046007290482521, 0.02819374017417431, 0.06929553300142288, 0.02973301149904728, -0.011185998097062111, -0.04374902695417404, 0.03554926812648773, 0.046140898019075394, 0.006538745015859604, -0.012406009249389172, 0.052370794117450714, -0.055852219462394714, -0.038164377212524414, -0.12147467583417892, -0.04840986430644989, -0.05587601661682129, 0.009226895868778229, -0.04872392490506172, -0.031346652656793594, -0.09991022199392319, -0.11699365824460983, 0.049930278211832047, -0.0347144678235054, 0.015045972540974617, -0.05098536238074303, 0.054456278681755066, 0.06937184929847717, -0.02192319743335247, 0.01804361678659916, -0.03538186103105545, 0.03474478796124458, 0.032448284327983856, -0.008983882144093513, -0.020664498209953308, -0.041322991251945496, -0.027248116210103035, -0.06372079253196716, 0.006991283502429724, 0.008302605710923672, 0.008074064739048481, -0.02736453153192997, 0.051924657076597214, -0.02401980571448803, -0.024940170347690582, 0.06875896453857422, -0.039858993142843246, 0.0040170275606215, 0.012831293046474457, -0.06524740159511566, 0.04776715487241745, 0.07808218896389008, -0.07371603697538376, -0.019427411258220673, -0.03900282084941864, 0.017335446551442146, -0.004226565361022949, 0.0022583177778869867, 0.05157184973359108, -0.02110779471695423, -0.008625558577477932, 0.011516274884343147, 0.01889192685484886, 0.033215977251529694, 0.11941320449113846, -0.03426568582653999, -0.03626072034239769, 0.10904067754745483, -0.09085316210985184, 0.06387638300657272, -0.03113473579287529, 0.0289504025131464, -0.027929311618208885, -5.703525773496602e-33, -0.05945555120706558, 0.08337817341089249, -0.029502669349312782, -0.027902785688638687, 0.017423199489712715, -0.06979195773601532, 0.05100113898515701, -0.012475743889808655, 0.051202040165662766, -0.02642958052456379, -0.017226548865437508, 0.024894284084439278, 0.03764934465289116, -0.030440086498856544, 0.05705547332763672, -0.03230809047818184, -0.06112150475382805, -0.08022191375494003, 0.004723700229078531, 0.019978852942585945, -0.006574924569576979, 0.05381748080253601, -0.04871845990419388, 0.025649413466453552, 0.022559454664587975, -0.005716512445360422, 0.04458012804389, 0.03613348677754402, -0.04786939173936844, -0.04812079668045044, 0.05295448750257492, 0.08438243716955185, -0.06558682024478912, 0.04084793105721474, 0.06374497711658478, 0.008852033875882626, 0.07370876520872116, 0.06262810528278351, -0.008113323710858822, -0.09892983734607697, 0.09938011318445206, 0.01722647435963154, -0.04197227582335472, -0.053079500794410706, -0.01857064478099346, 0.0963459312915802, 0.01182835828512907, -0.07746773213148117, -0.11209221184253693, 0.008740360848605633, 0.013507111929357052, -0.0068616559728980064, 0.10492490231990814, 0.004414553754031658, 0.035376016050577164, 0.09305942058563232, 0.05252028629183769, 0.0009191540302708745, 0.0016359062865376472, -0.0893816277384758, -0.05098796263337135, -0.06518809497356415, 0.022940000519156456, 0.0768471285700798, 0.003533752867951989, -0.04083480313420296, 0.017558639869093895, 0.09660639613866806, 0.06106211617588997, -0.014680215157568455, -0.05007161572575569, -0.03625086322426796, 0.057508185505867004, -0.03237098455429077, -0.012754542753100395, 0.06251750886440277, -0.029960397630929947, -0.006501334719359875, -0.024562057107686996, 0.04193120449781418, -0.0016334641259163618, 0.028445662930607796, 0.015004639513790607, -0.0621631033718586, 0.058271534740924835, -0.007779319770634174, -0.02614768221974373, 0.11489804834127426, 0.06283573061227798, 0.03467255458235741, -0.10746912658214569, 0.04487820714712143, -0.05424647778272629, 0.04423343762755394, -0.01944826915860176, -5.4595478360397465e-8, -0.030451180413365364, -0.06841227412223816, -0.09609488397836685, 0.018325427547097206, 0.043187033385038376, -0.0544547401368618, 0.03199397400021553, -0.0019400572637096047, -0.07057556509971619, 0.011545545421540737, 0.057901814579963684, 0.05103091895580292, -0.06035151332616806, 0.06848346441984177, -0.003267515217885375, -0.056392259895801544, -0.09619409590959549, -0.033963073045015335, 0.01443865243345499, -0.03009854257106781, -0.020195266231894493, -0.030681204050779343, 0.006250623147934675, 0.09287720918655396, -0.07172979414463043, -0.06207091361284256, -0.029032079502940178, -0.020140299573540688, -0.06213760003447533, 0.02796017751097679, -0.06380310654640198, -0.0025829460937529802, 0.015827588737010956, -0.080500528216362, -0.04553745687007904, 0.0270448736846447, -0.05903765186667442, -0.0013723457232117653, 0.03771891072392464, -0.0357036367058754, 0.08575499057769775, -0.010267039760947227, 0.06162671372294426, -0.0822281762957573, -0.036374934017658234, -0.00014956654922571033, 0.006792381871491671, 0.041606299579143524, 0.0940244197845459, 0.034991223365068436, -0.059301942586898804, -0.004458792973309755, 0.060308024287223816, 0.03452219069004059, 0.05546465516090393, 0.008555203676223755, 0.06271466612815857, -0.07365090399980545, -0.015027401968836784, -0.005548328161239624, -0.0013306097825989127, 0.038660209625959396, 0.0012816821690648794, -0.05518503487110138 ]
-0.050969
# Mattermost (plugin) Status: supported via plugin (bot token + WebSocket events). Channels, groups, and DMs are supported. Mattermost is a self-hostable team messaging platform; see the official site at [mattermost.com](https://mattermost.com) for product details and downloads. ## Plugin required Mattermost ships as a plugin and is not bundled with the core install. Install via CLI (npm registry): ```bash openclaw plugins install @openclaw/mattermost ``` Local checkout (when running from a git repo): ```bash openclaw plugins install ./extensions/mattermost ``` If you choose Mattermost during configure/onboarding and a git checkout is detected, OpenClaw will offer the local install path automatically. Details: [Plugins](/plugin) ## Quick setup 1. Install the Mattermost plugin. 2. Create a Mattermost bot account and copy the \*\*bot token\*\*. 3. Copy the Mattermost \*\*base URL\*\* (e.g., `https://chat.example.com`). 4. Configure OpenClaw and start the gateway. Minimal config: ```json5 { channels: { mattermost: { enabled: true, botToken: "mm-token", baseUrl: "https://chat.example.com", dmPolicy: "pairing", }, }, } ``` ## Environment variables (default account) Set these on the gateway host if you prefer env vars: - `MATTERMOST\_BOT\_TOKEN=...` - `MATTERMOST\_URL=https://chat.example.com` Env vars apply only to the \*\*default\*\* account (`default`). Other accounts must use config values. ## Chat modes Mattermost responds to DMs automatically. Channel behavior is controlled by `chatmode`: - `oncall` (default): respond only when @mentioned in channels. - `onmessage`: respond to every channel message. - `onchar`: respond when a message starts with a trigger prefix. Config example: ```json5 { channels: { mattermost: { chatmode: "onchar", oncharPrefixes: [">", "!"], }, }, } ``` Notes: - `onchar` still responds to explicit @mentions. - `channels.mattermost.requireMention` is honored for legacy configs but `chatmode` is preferred. ## Access control (DMs) - Default: `channels.mattermost.dmPolicy = "pairing"` (unknown senders get a pairing code). - Approve via: - `openclaw pairing list mattermost` - `openclaw pairing approve mattermost ```` ` - Public DMs: `channels.mattermost.dmPolicy="open"` plus `channels.mattermost.allowFrom=["*"]`. ## Channels (groups) - Default: `channels.mattermost.groupPolicy = "allowlist"` (mention-gated). - Allowlist senders with `channels.mattermost.groupAllowFrom` (user IDs or `@username`). - Open channels: `channels.mattermost.groupPolicy="open"` (mention-gated). ## Targets for outbound delivery Use these target formats with `openclaw message send` or cron/webhooks: - `channel:` for a channel - `user:` for a DM - `@username` for a DM (resolved via the Mattermost API) Bare IDs are treated as channels. ## Multi-account Mattermost supports multiple accounts under `channels.mattermost.accounts`: ```json5 { channels: { mattermost: { accounts: { default: { name: "Primary", botToken: "mm-token", baseUrl: "https://chat.example.com" }, alerts: { name: "Alerts", botToken: "mm-token-2", baseUrl: "https://alerts.example.com" }, }, }, }, } ``` ## Troubleshooting - No replies in channels: ensure the bot is in the channel and mention it (oncall), use a trigger prefix (onchar), or set `chatmode: "onmessage"`. - Auth errors: check the bot token, base URL, and whether the account is enabled. - Multi-account issues: env vars only apply to the `default` account. ````
https://github.com/openclaw/openclaw/blob/main//docs/channels/mattermost.md
main
opebclaw
[ -0.005706494674086571, -0.1072135716676712, -0.06538622826337814, 0.042759038507938385, 0.03524088114500046, -0.10614099353551865, -0.016280392184853554, 0.018887948244810104, 0.007166416384279728, 0.014995408244431019, 0.04962120205163956, -0.046900808811187744, -0.023955857381224632, 0.053249601274728775, 0.11150320619344711, 0.06162858381867409, 0.08206722885370255, -0.055619269609451294, 0.03069407492876053, -0.05879368260502815, -0.013061873614788055, -0.014467298984527588, 0.057195696979761124, -0.06808619201183319, -0.08015028387308121, -0.09614597260951996, -0.050709616392850876, 0.00483482051640749, -0.01618463546037674, -0.03122030384838581, 0.06067835912108421, 0.04272036999464035, 0.0288472231477499, 0.036068059504032135, 0.04513997957110405, 0.09408390522003174, 0.03681955114006996, -0.08295118808746338, -0.0756099596619606, -0.02313898876309395, 0.08741438388824463, 0.0019587085116654634, 0.0333467498421669, -0.028025666251778603, -0.009394158609211445, -0.02289861999452114, -0.016006961464881897, -0.06304164975881577, -0.05834730714559555, -0.012555002234876156, -0.04398077353835106, -0.14071908593177795, 0.009092974476516247, 0.00647059828042984, 0.061022356152534485, -0.008125470951199532, 0.029951706528663635, 0.008727816864848137, 0.02931688167154789, -0.07039155066013336, 0.11255409568548203, -0.0057864864356815815, -0.07285453379154205, -0.014653011225163937, -0.0694214403629303, 0.017863750457763672, -0.033595286309719086, 0.030302563682198524, -0.018686486408114433, -0.024103742092847824, 0.04090030491352081, 0.007513413671404123, -0.05197732895612717, -0.05541716143488884, 0.00279357866384089, 0.006449752952903509, 0.04234672710299492, 0.053232256323099136, -0.020396122708916664, -0.03661246970295906, -0.08219398558139801, 0.03641669079661369, -0.04408827796578407, 0.02536887302994728, -0.022957053035497665, 0.10020410269498825, 0.06201412156224251, 0.08848955482244492, -0.026554593816399574, 0.0382593609392643, -0.02829492650926113, -0.059710543602705, 0.000630919705145061, -0.03545081242918968, -0.00001460091516491957, -0.003957838285714388, -0.039108432829380035, 0.04571283608675003, -0.03333726152777672, 0.04240056499838829, 0.016494886949658394, -0.04125628247857094, -0.02130884863436222, -0.01689661666750908, -0.037245552986860275, 0.05203793942928314, -0.03278431296348572, 0.0898662805557251, 0.06201176717877388, 0.007998674176633358, -0.060932260006666183, -0.051360756158828735, 0.10777916759252548, -0.0724266842007637, -0.07188168168067932, 0.0314117893576622, 0.010236278176307678, 0.00867442600429058, 0.049447085708379745, 0.06829043477773666, 0.08040708303451538, 0.015333883464336395, 0.0459015928208828, -0.006460848730057478, 0.11258731037378311, 0.06805381178855896, 0.062132228165864944, 5.9356840710740804e-33, 0.0911780521273613, -0.032724667340517044, -0.0288498904556036, 0.022005045786499977, 0.06340271979570389, -0.0037260197568684816, 0.014772162772715092, -0.00844933558255434, -0.05553664267063141, 0.040847428143024445, -0.03154408186674118, 0.04119076207280159, -0.059758879244327545, -0.01991979219019413, 0.02035088650882244, -0.07333684712648392, -0.053273897618055344, 0.0017287243390455842, 0.060907796025276184, -0.06326525658369064, -0.049899786710739136, -0.02897016704082489, -0.08586027473211288, -0.02566199004650116, 0.06336748600006104, 0.019365182146430016, 0.033728595823049545, 0.029118774458765984, 0.03979012370109558, 0.022355832159519196, -0.0024706064723432064, 0.006118317134678364, -0.021593548357486725, 0.0792461559176445, -0.04605394974350929, -0.00120608473662287, -0.1571582853794098, -0.03953692689538002, -0.051740583032369614, -0.051121439784765244, 0.1136680617928505, -0.0001628953468753025, -0.07998084276914597, -0.047891631722450256, 0.018073365092277527, -0.029537608847022057, -0.02718309871852398, 0.013190072029829025, 0.17473773658275604, 0.0038297621067613363, -0.0012805875157937407, -0.011287088505923748, 0.09947219491004944, 0.005847747437655926, -0.004212064668536186, -0.02821105532348156, -0.0237114280462265, -0.030645281076431274, 0.011766977608203888, -0.032119784504175186, -0.08920653164386749, 0.018934976309537888, 0.044968996196985245, 0.02813764475286007, 0.012638762593269348, -0.052985839545726776, 0.0334981270134449, 0.04074312746524811, 0.006185129284858704, 0.05805029720067978, -0.02386600151658058, 0.007793959695845842, 0.024684201925992966, 0.005936366971582174, -0.04444882646203041, 0.018573317676782608, 0.029642513021826744, 0.020738087594509125, 0.012570466846227646, -0.03756332024931908, -0.049010034650564194, -0.0246729776263237, -0.006655051372945309, -0.03385794907808304, 0.03449312224984169, 0.03795470669865608, 0.035943273454904556, -0.010339957661926746, -0.01978938840329647, 0.02903694100677967, -0.046195633709430695, 0.008824842981994152, -0.016721729189157486, 0.03880101442337036, -0.056295718997716904, -5.546730622802248e-33, -0.08447565138339996, -0.03170941770076752, 0.030167952179908752, 0.06526636332273483, -0.005120315123349428, -0.05551500990986824, -0.05451522767543793, -0.09906194359064102, 0.06629793345928192, 0.019698897376656532, -0.07552514970302582, 0.06440635770559311, 0.06743456423282623, -0.05779001861810684, 0.08745969831943512, 0.012838567607104778, -0.07161712646484375, -0.08701062947511673, 0.04220186546444893, 0.05507410690188408, -0.025718586519360542, -0.00707244873046875, -0.0367029570043087, 0.0284572821110487, 0.04510566219687462, 0.04538935050368309, 0.06896274536848068, -0.03998655825853348, 0.03409137949347496, -0.053058382123708725, 0.0277640949934721, 0.05202214792370796, -0.06946835666894913, 0.007386608514934778, -0.04234074801206589, 0.02354925312101841, 0.030367985367774963, 0.11866859346628189, 0.019926767796278, 0.012485332787036896, 0.024962525814771652, -0.0037805777974426746, -0.07505994290113449, 0.03279103711247444, -0.039896607398986816, 0.05499616637825966, 0.04971721023321152, -0.01354866474866867, -0.10628917068243027, 0.033982668071985245, -0.024362122640013695, 0.019797002896666527, 0.03917167708277702, 0.01721905544400215, 0.0042034657672047615, 0.09063903242349625, 0.036671001464128494, 0.02329317294061184, -0.04511868208646774, -0.05630343779921532, 0.047959741204977036, -0.13576915860176086, 0.05223216116428375, -0.047465212643146515, -0.05465831980109215, -0.03983881697058678, -0.0698692575097084, 0.032691434025764465, -0.10770172625780106, -0.0001302509190281853, -0.045865144580602646, -0.012530267238616943, -0.05198237672448158, -0.12203094363212585, -0.01647007092833519, 0.023056143894791603, 0.03930237889289856, -0.005704495124518871, 0.001225448795594275, 0.04443720728158951, -0.045242149382829666, 0.07095871865749359, 0.021906182169914246, -0.056981075555086136, 0.024755163118243217, -0.05209202691912651, -0.007493967656046152, 0.0905686616897583, 0.04184124618768692, 0.0175832100212574, -0.10307838767766953, 0.04087507352232933, 0.0626806989312172, -0.02572866529226303, -0.06022743135690689, -5.7119727614463045e-8, -0.04275254160165787, -0.05940328910946846, -0.10066452622413635, 0.058684878051280975, -0.0016073078149929643, -0.06100338324904442, 0.03613125905394554, 0.052677322179079056, -0.035388704389333725, 0.08754482865333557, 0.0934610590338707, 0.03699192777276039, -0.0692664086818695, 0.047607120126485825, 0.020818296819925308, 0.047614868730306625, -0.0380157008767128, 0.0045292191207408905, -0.0408654659986496, -0.03680863976478577, 0.005669717211276293, 0.026690905913710594, 0.04224413260817528, 0.024801747873425484, -0.043925121426582336, -0.05546294152736664, -0.03098805621266365, 0.02402888424694538, -0.05750076845288277, 0.011825057677924633, -0.007356822956353426, -0.009775979444384575, -0.03988330438733101, -0.0032428260892629623, 0.02670164965093136, 0.004853507503867149, -0.0322423055768013, 0.03742063790559769, 0.0764152854681015, 0.005792851559817791, 0.04305130988359451, -0.009047328494489193, -0.01930077187716961, 0.014530885964632034, -0.11001799255609512, 0.023005764931440353, -0.034562818706035614, -0.022974785417318344, -0.029436355456709862, 0.011986381374299526, -0.026082566007971764, 0.0031312913633883, -0.05422528088092804, 0.03758340701460838, 0.0167002584785223, 0.14047886431217194, 0.06338139623403549, -0.01183453667908907, 0.04216132313013077, 0.04113997146487236, -0.05437213554978371, 0.013758302666246891, 0.09632175415754318, -0.03350047394633293 ]
0.105313
# Discord (Bot API) Status: ready for DM and guild text channels via the official Discord bot gateway. ## Quick setup (beginner) 1. Create a Discord bot and copy the bot token. 2. In the Discord app settings, enable \*\*Message Content Intent\*\* (and \*\*Server Members Intent\*\* if you plan to use allowlists or name lookups). 3. Set the token for OpenClaw: - Env: `DISCORD\_BOT\_TOKEN=...` - Or config: `channels.discord.token: "..."`. - If both are set, config takes precedence (env fallback is default-account only). 4. Invite the bot to your server with message permissions (create a private server if you just want DMs). 5. Start the gateway. 6. DM access is pairing by default; approve the pairing code on first contact. Minimal config: ```json5 { channels: { discord: { enabled: true, token: "YOUR\_BOT\_TOKEN", }, }, } ``` ## Goals - Talk to OpenClaw via Discord DMs or guild channels. - Direct chats collapse into the agent's main session (default `agent:main:main`); guild channels stay isolated as `agent::discord:channel:` (display names use `discord:#`). - Group DMs are ignored by default; enable via `channels.discord.dm.groupEnabled` and optionally restrict by `channels.discord.dm.groupChannels`. - Keep routing deterministic: replies always go back to the channel they arrived on. ## How it works 1. Create a Discord application β†’ Bot, enable the intents you need (DMs + guild messages + message content), and grab the bot token. 2. Invite the bot to your server with the permissions required to read/send messages where you want to use it. 3. Configure OpenClaw with `channels.discord.token` (or `DISCORD\_BOT\_TOKEN` as a fallback). 4. Run the gateway; it auto-starts the Discord channel when a token is available (config first, env fallback) and `channels.discord.enabled` is not `false`. - If you prefer env vars, set `DISCORD\_BOT\_TOKEN` (a config block is optional). 5. Direct chats: use `user:` (or a `<@id>` mention) when delivering; all turns land in the shared `main` session. Bare numeric IDs are ambiguous and rejected. 6. Guild channels: use `channel:` for delivery. Mentions are required by default and can be set per guild or per channel. 7. Direct chats: secure by default via `channels.discord.dm.policy` (default: `"pairing"`). Unknown senders get a pairing code (expires after 1 hour); approve via `openclaw pairing approve discord ```` `. - To keep old β€œopen to anyone” behavior: set `channels.discord.dm.policy="open"` and `channels.discord.dm.allowFrom=["*"]`. - To hard-allowlist: set `channels.discord.dm.policy="allowlist"` and list senders in `channels.discord.dm.allowFrom`. - To ignore all DMs: set `channels.discord.dm.enabled=false` or `channels.discord.dm.policy="disabled"`. 8. Group DMs are ignored by default; enable via `channels.discord.dm.groupEnabled` and optionally restrict by `channels.discord.dm.groupChannels`. 9. Optional guild rules: set `channels.discord.guilds` keyed by guild id (preferred) or slug, with per-channel rules. 10. Optional native commands: `commands.native` defaults to `"auto"` (on for Discord/Telegram, off for Slack). Override with `channels.discord.commands.native: true|false|"auto"`; `false` clears previously registered commands. Text commands are controlled by `commands.text` and must be sent as standalone `/...` messages. Use `commands.useAccessGroups: false` to bypass access-group checks for commands. - Full command list + config: [Slash commands](/tools/slash-commands) 11. Optional guild context history: set `channels.discord.historyLimit` (default 20, falls back to `messages.groupChat.historyLimit`) to include the last N guild messages as context when replying to a mention. Set `0` to disable. 12. Reactions: the agent can trigger reactions via the `discord` tool (gated by `channels.discord.actions.*`). - Reaction removal semantics: see [/tools/reactions](/tools/reactions). - The `discord` tool is only exposed when the current channel is Discord. 13. Native commands use isolated session keys (`agent::discord:slash:`) rather than the shared `main` session. Note: Name β†’ id resolution uses guild member search and requires Server Members Intent; if the bot can’t search members, use ids or `<@id>` mentions. Note: Slugs are lowercase with spaces replaced by `-`. Channel names are slugged without the
https://github.com/openclaw/openclaw/blob/main//docs/channels/discord.md
main
opebclaw
[ -0.05725705251097679, -0.10878714174032211, -0.019174717366695404, 0.011126385070383549, -0.041606418788433075, -0.03714622184634209, 0.005116064567118883, 0.01681920327246189, 0.013928879983723164, 0.01962086372077465, 0.001052610226906836, -0.022921893745660782, 0.008275113068521023, 0.04225311428308487, 0.15293140709400177, 0.05894521623849869, 0.0604388453066349, -0.026880111545324326, 0.014448439702391624, -0.04045185446739197, 0.010545268654823303, -0.022383008152246475, -0.049383584409952164, -0.05422073230147362, 0.02161322347819805, -0.15971744060516357, 0.005618737544864416, 0.05036402866244316, -0.016485316678881645, -0.0049646697007119656, 0.03199831023812294, -0.008867289870977402, -0.036982182413339615, 0.05592942237854004, -0.038963817059993744, 0.04295460507273674, 0.005373076535761356, 0.026510799303650856, 0.039530325680971146, 0.0236207228153944, 0.04321783035993576, -0.0245653223246336, -0.017891835421323776, -0.0016185938147827983, -0.023924721404910088, -0.01111097913235426, -0.05271046981215477, 0.055013760924339294, 0.0002352509181946516, 0.07361855357885361, 0.0014478430384770036, -0.0466136559844017, 0.017427001148462296, 0.012177558615803719, -0.07883316278457642, 0.008974911645054817, -0.038118455559015274, 0.051434699445962906, 0.04048730432987213, -0.08901859819889069, -0.0020541497506201267, -0.04701855033636093, 0.05350204184651375, -0.03576064109802246, -0.06753149628639221, -0.05466267466545105, 0.005181840155273676, 0.05589153990149498, -0.010391577146947384, 0.0101857241243124, -0.008115585893392563, -0.011691596359014511, -0.11141864955425262, -0.05305074527859688, -0.019506370648741722, -0.02713019959628582, -0.02153274044394493, 0.0071435109712183475, -0.026828862726688385, -0.037026166915893555, 0.001959689427167177, 0.05180595442652702, 0.03576740249991417, 0.07308702170848846, -0.052810367196798325, 0.11327889561653137, -0.03507713973522186, 0.04197942838072777, -0.04164589196443558, -0.011523990891873837, -0.029698945581912994, -0.018345283344388008, 0.011591276153922081, 0.013122678734362125, -0.04343212768435478, 0.11229672282934189, -0.12192706763744354, 0.05259693041443825, -0.027745986357331276, 0.07086900621652603, -0.04619084298610687, -0.005882269702851772, -0.03125031664967537, -0.0008703780476935208, 0.012979162856936455, -0.02638505958020687, 0.06166866794228554, 0.03519151359796524, 0.11409558355808258, 0.028192242607474327, -0.030563052743673325, -0.015433595515787601, 0.03906199336051941, 0.05284116417169571, 0.019027290865778923, 0.07346204668283463, 0.06374906003475189, 0.04405882954597473, 0.12272589653730392, -0.0015139143215492368, 0.06196264550089836, -0.03860299661755562, 0.036276932805776596, 0.009410036727786064, 0.02861662767827511, 0.035503096878528595, 0.07955539971590042, 4.758065381554666e-33, 0.02038452960550785, 0.033210624009370804, -0.04367221146821976, 0.07557172328233719, 0.0007853127899579704, 0.012918978929519653, -0.001791993621736765, -0.01403769664466381, -0.11845039576292038, -0.022615673020482063, -0.028714975342154503, 0.047485873103141785, 0.06707369536161423, -0.05491836741566658, -0.09530971199274063, -0.04780861362814903, 0.062308769673109055, -0.011910621076822281, 0.09079572558403015, -0.055315107107162476, -0.006735836621373892, 0.029865818098187447, 0.038843654096126556, 0.08988219499588013, 0.0353003665804863, 0.04111722484230995, -0.027827538549900055, -0.0015873695956543088, 0.08484142273664474, -0.008699197322130203, -0.037525635212659836, -0.023179618641734123, -0.008570567704737186, 0.11658861488103867, 0.03543710336089134, -0.0017465731361880898, -0.05557722970843315, -0.016185706481337547, -0.09259033203125, -0.05564410611987114, 0.005108387675136328, -0.016906864941120148, -0.0927954837679863, -0.08024583011865616, -0.10939954221248627, -0.024939116090536118, -0.05437173321843147, -0.02913655899465084, 0.06651283800601959, -0.05432439222931862, -0.04752897098660469, 0.07531305402517319, 0.0003603127261158079, -0.006604714784771204, 0.08465303480625153, -0.11091657727956772, -0.07463307678699493, -0.004049668088555336, -0.008007672615349293, -0.08319386839866638, 0.014832965098321438, 0.020956428721547127, 0.00968990009278059, 0.050823744386434555, 0.012031919322907925, -0.0477786548435688, -0.07048593461513519, 0.024909598752856255, 0.023949839174747467, -0.08470860123634338, -0.02631223388016224, 0.060397762805223465, -0.054667189717292786, 0.025970259681344032, -0.1037764847278595, -0.03944375738501549, 0.051633380353450775, 0.004058139398694038, 0.05435347184538841, 0.02665029466152191, 0.015074249356985092, -0.06697583198547363, -0.05643289536237717, -0.004714850801974535, 0.010875871405005455, 0.0063107311725616455, 0.04248041659593582, -0.07113756239414215, 0.04593897610902786, 0.04477445036172867, -0.10684709250926971, 0.059169951826334, -0.0014204697217792273, 0.09209489822387695, 0.026796439662575722, -5.347974731887354e-33, -0.07016704976558685, 0.03371148928999901, 0.05675885081291199, -0.0012688207207247615, 0.020238125696778297, 0.024696210399270058, 0.0842689648270607, -0.03416940197348595, 0.03200440853834152, 0.06739134341478348, -0.04529442638158798, -0.0007741816807538271, 0.004571150988340378, -0.0708196684718132, 0.04251917451620102, -0.004293233621865511, -0.025468753650784492, 0.032510075718164444, 0.02314390242099762, -0.0299926046282053, -0.02268163487315178, 0.054101306945085526, -0.05921990051865578, 0.05333613231778145, -0.00811055675148964, 0.022382155060768127, 0.04200278967618942, 0.0292322039604187, -0.058832138776779175, -0.02964117005467415, 0.06600353866815567, 0.036483582109212875, -0.017613748088479042, -0.04264575615525246, -0.02096380479633808, 0.00355377234518528, -0.010561306960880756, 0.1334475874900818, -0.042931463569402695, -0.050218068063259125, 0.12216158956289291, 0.009819244034588337, -0.12551045417785645, -0.022577892988920212, 0.02598150074481964, 0.05376448854804039, 0.004218673799186945, -0.03527599573135376, -0.09856865555047989, 0.04837602749466896, 0.03651127219200134, -0.049525175243616104, 0.05468735098838806, -0.01787536032497883, -0.039348404854536057, -0.006963522173464298, 0.13209190964698792, 0.07313597947359085, 0.05854902043938637, -0.04414946585893631, -0.02374604344367981, -0.14191505312919617, -0.019152531400322914, 0.06953179836273193, 0.06095245108008385, -0.03297009319067001, 0.004231392405927181, 0.10977441817522049, -0.012129561975598335, -0.012867380864918232, 0.024160297587513924, -0.01004194375127554, -0.017040308564901352, 0.007413928396999836, 0.05812089890241623, -0.045019760727882385, -0.017466269433498383, -0.07210694253444672, -0.016862375661730766, 0.050644539296627045, -0.03016924299299717, 0.032579753547906876, 0.010793522000312805, 0.08233413845300674, 0.035686980932950974, -0.012760953046381474, 0.044131167232990265, 0.13796280324459076, 0.008142827078700066, 0.013869667425751686, -0.019949888810515404, -0.03621691092848778, 0.05676455795764923, -0.014449777081608772, -0.0023626619949936867, -5.850572648569141e-8, -0.06453776359558105, -0.07391981780529022, -0.056411582976579666, 0.005706829950213432, -0.03488242253661156, 0.020845243707299232, -0.0255763940513134, -0.07062817364931107, 0.0223995391279459, 0.03269883617758751, -0.01605442725121975, 0.04747156798839569, -0.01010094303637743, 0.019702034071087837, -0.0023115428630262613, 0.028608448803424835, -0.039086081087589264, -0.01737275905907154, 0.027384480461478233, 0.0035241874866187572, 0.028423018753528595, -0.014433540403842926, 0.03948596492409706, 0.055682241916656494, -0.06933905929327011, -0.02873525395989418, 0.0014621992595493793, 0.03089412860572338, -0.09931852668523788, -0.023618513718247414, -0.12426705658435822, -0.01856241375207901, 0.024881882593035698, -0.032945118844509125, -0.10496367514133453, 0.04748278856277466, -0.054366353899240494, -0.03094993159174919, 0.0388844795525074, 0.005891292355954647, 0.05594146251678467, 0.0024423846043646336, -0.04205276072025299, -0.04399699345231056, -0.028946757316589355, 0.024476012215018272, -0.01558865886181593, -0.07969789952039719, 0.022777151316404343, -0.007124567404389381, -0.0632462278008461, 0.019708402454853058, 0.07813545316457748, 0.01931731402873993, -0.009071643464267254, -0.03005833737552166, 0.029930779710412025, 0.0003752116463147104, 0.02080288715660572, -0.037303343415260315, 0.050979480147361755, 0.05646592378616333, -0.030071506276726723, -0.12147090584039688 ]
0.062516
isolated session keys (`agent::discord:slash:`) rather than the shared `main` session. Note: Name β†’ id resolution uses guild member search and requires Server Members Intent; if the bot can’t search members, use ids or `<@id>` mentions. Note: Slugs are lowercase with spaces replaced by `-`. Channel names are slugged without the leading `#`. Note: Guild context `[from:]` lines include `author.tag` + `id` to make ping-ready replies easy. ## Config writes By default, Discord is allowed to write config updates triggered by `/config set|unset` (requires `commands.config: true`). Disable with: ```json5 { channels: { discord: { configWrites: false } }, } ``` ## How to create your own bot This is the β€œDiscord Developer Portal” setup for running OpenClaw in a server (guild) channel like `#help`. ### 1) Create the Discord app + bot user 1. Discord Developer Portal β†’ **Applications** β†’ **New Application** 2. In your app: - **Bot** β†’ **Add Bot** - Copy the **Bot Token** (this is what you put in `DISCORD_BOT_TOKEN`) ### 2) Enable the gateway intents OpenClaw needs Discord blocks β€œprivileged intents” unless you explicitly enable them. In **Bot** β†’ **Privileged Gateway Intents**, enable: - **Message Content Intent** (required to read message text in most guilds; without it you’ll see β€œUsed disallowed intents” or the bot will connect but not react to messages) - **Server Members Intent** (recommended; required for some member/user lookups and allowlist matching in guilds) You usually do **not** need **Presence Intent**. Setting the bot's own presence (`setPresence` action) uses gateway OP3 and does not require this intent; it is only needed if you want to receive presence updates about other guild members. ### 3) Generate an invite URL (OAuth2 URL Generator) In your app: **OAuth2** β†’ **URL Generator** **Scopes** - βœ… `bot` - βœ… `applications.commands` (required for native commands) **Bot Permissions** (minimal baseline) - βœ… View Channels - βœ… Send Messages - βœ… Read Message History - βœ… Embed Links - βœ… Attach Files - βœ… Add Reactions (optional but recommended) - βœ… Use External Emojis / Stickers (optional; only if you want them) Avoid **Administrator** unless you’re debugging and fully trust the bot. Copy the generated URL, open it, pick your server, and install the bot. ### 4) Get the ids (guild/user/channel) Discord uses numeric ids everywhere; OpenClaw config prefers ids. 1. Discord (desktop/web) β†’ **User Settings** β†’ **Advanced** β†’ enable **Developer Mode** 2. Right-click: - Server name β†’ **Copy Server ID** (guild id) - Channel (e.g. `#help`) β†’ **Copy Channel ID** - Your user β†’ **Copy User ID** ### 5) Configure OpenClaw #### Token Set the bot token via env var (recommended on servers): - `DISCORD_BOT_TOKEN=...` Or via config: ```json5 { channels: { discord: { enabled: true, token: "YOUR_BOT_TOKEN", }, }, } ``` Multi-account support: use `channels.discord.accounts` with per-account tokens and optional `name`. See [`gateway/configuration`](/gateway/configuration#telegramaccounts--discordaccounts--slackaccounts--signalaccounts--imessageaccounts) for the shared pattern. #### Allowlist + channel routing Example β€œsingle server, only allow me, only allow #help”: ```json5 { channels: { discord: { enabled: true, dm: { enabled: false }, guilds: { YOUR_GUILD_ID: { users: ["YOUR_USER_ID"], requireMention: true, channels: { help: { allow: true, requireMention: true }, }, }, }, retry: { attempts: 3, minDelayMs: 500, maxDelayMs: 30000, jitter: 0.1, }, }, }, } ``` Notes: - `requireMention: true` means the bot only replies when mentioned (recommended for shared channels). - `agents.list[].groupChat.mentionPatterns` (or `messages.groupChat.mentionPatterns`) also count as mentions for guild messages. - Multi-agent override: set per-agent patterns on `agents.list[].groupChat.mentionPatterns`. - If `channels` is present, any channel not listed is denied by default. - Use a `"*"` channel entry to apply defaults across all channels; explicit channel entries override the wildcard. - Threads inherit parent channel config
https://github.com/openclaw/openclaw/blob/main//docs/channels/discord.md
main
opebclaw
[ -0.03875581547617912, -0.010599755682051182, -0.037344496697187424, 0.012865968979895115, -0.015143903903663158, -0.03270871937274933, 0.021311843767762184, 0.004881676286458969, -0.0034001157619059086, 0.02923022210597992, -0.002813871018588543, -0.021876931190490723, 0.05448125675320625, 0.03836611285805702, 0.10129764676094055, 0.017671503126621246, 0.0208995770663023, -0.06190280616283417, -0.009644459933042526, -0.08241016417741776, -0.003090065671131015, 0.024966871365904808, -0.0241555105894804, -0.03670419007539749, -0.006835541687905788, -0.15112851560115814, -0.007589774206280708, -0.003069933271035552, -0.03185592591762543, -0.03361433371901512, 0.0025419448502361774, 0.05081283673644066, -0.0715641900897026, 0.024063585326075554, -0.01800464279949665, 0.07458687573671341, -0.006440281867980957, 0.0759262964129448, 0.03598124161362648, -0.010020572692155838, 0.04221854358911514, 0.014071688987314701, -0.0589635856449604, -0.012610972858965397, -0.0346391536295414, -0.013684753328561783, -0.0693548321723938, -0.024230139330029488, -0.030660266056656837, 0.07684849947690964, -0.0242198184132576, 0.02952532097697258, 0.021847456693649292, 0.023204054683446884, -0.030887028202414513, 0.0013371948152780533, -0.06704600155353546, 0.07317616045475006, 0.0752742812037468, -0.0898679569363594, -0.021771753206849098, -0.02252824977040291, 0.023724345490336418, -0.05016034096479416, -0.05256586894392967, -0.019473567605018616, 0.008896357379853725, -0.012706287205219269, 0.038831114768981934, 0.020288802683353424, -0.0007613328634761274, 0.018433965742588043, -0.04834122210741043, -0.09788347035646439, -0.019991261884570122, 0.029328620061278343, -0.02951022982597351, -0.01368361059576273, -0.04466012865304947, 0.016266033053398132, -0.027475696057081223, 0.017631016671657562, 0.0098736472427845, 0.022378716617822647, -0.018921220675110817, 0.07195989042520523, -0.009551710449159145, -0.013117240741848946, -0.010616064071655273, -0.01332114078104496, -0.04344434291124344, -0.033456675708293915, 0.047082141041755676, -0.021763155236840248, -0.028184939175844193, 0.09725876897573471, -0.037470292299985886, 0.04601236432790756, -0.05605114996433258, 0.0936615839600563, 0.013135646469891071, -0.013237298466265202, 0.006667202338576317, 0.022756580263376236, 0.023031476885080338, 0.030510732904076576, 0.06244368851184845, 0.01755039393901825, 0.0335652194917202, -0.030062463134527206, -0.08109444379806519, 0.04220835119485855, 0.04654379189014435, 0.0019945919048041105, 0.048110172152519226, 0.08382264524698257, 0.07671552896499634, 0.05120527744293213, 0.09018821269273758, 0.029835067689418793, 0.1284959316253662, -0.05486617982387543, -0.009864979423582554, 0.05909130722284317, 0.022595688700675964, 0.07966722548007965, 0.05176736041903496, 6.702399159371964e-33, 0.054368533194065094, -0.006223713047802448, -0.07526381313800812, 0.04516349732875824, 0.04615907743573189, 0.05752566084265709, 0.013811401091516018, 0.040633153170347214, -0.12232473492622375, -0.00041366915684193373, -0.02291717380285263, 0.059151094406843185, 0.03536861762404442, -0.02082142047584057, -0.047823354601860046, -0.010084887966513634, 0.07098335772752762, 0.011634309776127338, 0.07067585736513138, -0.08414056897163391, -0.01078031025826931, 0.08528311550617218, 0.019451702013611794, 0.07408254593610764, 0.03143032640218735, 0.06377457827329636, -0.018510131165385246, -0.024047140032052994, 0.0559050589799881, -0.0019733526278287172, 0.00032558824750594795, 0.062331508845090866, -0.022319231182336807, 0.10211140662431717, 0.03318585455417633, -0.0045431205071508884, -0.07117898762226105, 0.02741902880370617, -0.12315713614225388, -0.06445785611867905, -0.003941436298191547, 0.018468065187335014, -0.10698585212230682, -0.10074213147163391, -0.08204831928014755, -0.07257750630378723, -0.07243680953979492, -0.048051197081804276, 0.04209482669830322, -0.05700095742940903, -0.06345376372337341, 0.11993095278739929, 0.03227848559617996, -0.019339334219694138, 0.05535562336444855, -0.11545518785715103, -0.012901497073471546, 0.0122156273573637, -0.005817110184580088, -0.056804824620485306, 0.015630213543772697, -0.030503228306770325, -0.007816416211426258, 0.043960727751255035, -0.023811761289834976, -0.01482183113694191, -0.066207155585289, 0.055984653532505035, 0.05141162499785423, -0.04016835615038872, -0.028382236137986183, 0.06424465775489807, -0.00753072090446949, 0.02157437801361084, -0.08977966010570526, -0.11125406622886658, -0.046806834638118744, 0.015559343621134758, 0.030007118359208107, 0.023992355912923813, 0.033071037381887436, -0.013742716051638126, -0.07698150724172592, 0.04778164625167847, 0.005190087947994471, -0.03842968866229057, 0.026465123519301414, 0.00299631804227829, 0.019384972751140594, -0.0019098855555057526, -0.056422799825668335, 0.04740124195814133, -0.012914923951029778, 0.08037818968296051, -0.05227471515536308, -7.515880188391357e-33, -0.014669123105704784, 0.000025986313630710356, -0.002437521005049348, -0.012675793841481209, -0.004376579076051712, 0.0036436335649341345, 0.08997426182031631, -0.06297088414430618, 0.03142416104674339, -0.003750894218683243, -0.0030429542530328035, -0.011154904961585999, 0.014693818055093288, -0.041862066835165024, 0.019411005079746246, 0.036917589604854584, -0.028252292424440384, 0.013777313753962517, -0.049463145434856415, -0.03451979160308838, -0.06640177220106125, 0.04527214542031288, -0.05538933351635933, 0.04756021499633789, 0.019718818366527557, -0.019573386758565903, 0.025758543983101845, 0.03379438817501068, -0.06665191799402237, -0.033346887677907944, 0.02741059847176075, 0.06026441231369972, -0.0550699345767498, -0.06393764168024063, -0.03235691040754318, -0.024047456681728363, -0.04812603071331978, 0.1307646632194519, -0.07483246922492981, -0.03529859334230423, 0.10250302404165268, 0.03344668075442314, -0.09664639085531235, 0.04333747550845146, 0.024212218821048737, 0.0945306122303009, -0.031224900856614113, -0.017522478476166725, -0.09772080928087234, 0.0791935846209526, 0.04269227385520935, -0.10289561003446579, 0.05039449408650398, -0.09540437161922455, -0.0059657315723598, -0.03130638599395752, 0.022292690351605415, 0.05182173475623131, 0.041593752801418304, -0.04041845351457596, 0.03923194855451584, -0.09901989251375198, -0.05855787917971611, 0.10187132656574249, 0.048559412360191345, -0.07467645406723022, -0.06825456023216248, 0.11024602502584457, 0.0483982153236866, -0.03802609071135521, 0.03400131314992905, -0.05448298901319504, 0.0031086618546396494, 0.01592717319726944, 0.0690181627869606, -0.024788783863186836, -0.003046432277187705, -0.10177197307348251, 0.0007752747624181211, 0.08193153887987137, -0.07742726802825928, 0.018034392967820168, -0.017202068120241165, 0.04795295372605324, -0.0020758891478180885, 0.009349889121949673, 0.02150079421699047, 0.2112744152545929, -0.021942585706710815, 0.026891009882092476, 0.014640238136053085, -0.007840742357075214, -0.0415995791554451, 0.004994962364435196, 0.04445962607860565, -5.5181864411224524e-8, -0.02699759230017662, -0.03162698075175285, -0.09342513233423233, 0.05569571256637573, -0.03502390533685684, 0.016688255593180656, 0.018563203513622284, -0.022558780387043953, 0.0003135847218800336, 0.07218921929597855, 0.013057406060397625, 0.02551531046628952, 0.000492818362545222, 0.019168822094798088, -0.05281442403793335, 0.012019515037536621, -0.04921003803610802, 0.06004854664206505, 0.007190519478172064, -0.045669764280319214, -0.03264812007546425, -0.024281220510601997, 0.01235036738216877, 0.08216063678264618, -0.05508822947740555, -0.06274551898241043, -0.02359609678387642, 0.020876163616776466, -0.07345663756132126, -0.012079206295311451, -0.09795251488685608, -0.007982766255736351, 0.059067241847515106, -0.0243450365960598, -0.06947869062423706, 0.10446188598871231, -0.07346541434526443, 0.017795057967305183, 0.013726132921874523, 0.011473355814814568, 0.01774347573518753, -0.004200772847980261, -0.032697323709726334, -0.059441763907670975, -0.06562474370002747, 0.03397050499916077, -0.015540511347353458, 0.014473635703325272, 0.03417590260505676, -0.03449574112892151, -0.03386662155389786, 0.03277837112545967, 0.06734789907932281, 0.0006681288941763341, 0.07482776045799255, -0.002896136837080121, 0.0495053268969059, -0.02778981253504753, 0.06570129096508026, -0.06421039253473282, 0.026914868503808975, -0.01001664251089096, -0.08664793521165848, -0.09497290849685669 ]
0.103513
as mentions for guild messages. - Multi-agent override: set per-agent patterns on `agents.list[].groupChat.mentionPatterns`. - If `channels` is present, any channel not listed is denied by default. - Use a `"*"` channel entry to apply defaults across all channels; explicit channel entries override the wildcard. - Threads inherit parent channel config (allowlist, `requireMention`, skills, prompts, etc.) unless you add the thread channel id explicitly. - Bot-authored messages are ignored by default; set `channels.discord.allowBots=true` to allow them (own messages remain filtered). - Warning: If you allow replies to other bots (`channels.discord.allowBots=true`), prevent bot-to-bot reply loops with `requireMention`, `channels.discord.guilds.*.channels..users` allowlists, and/or clear guardrails in `AGENTS.md` and `SOUL.md`. ### 6) Verify it works 1. Start the gateway. 2. In your server channel, send: `@Krill hello` (or whatever your bot name is). 3. If nothing happens: check **Troubleshooting** below. ### Troubleshooting - First: run `openclaw doctor` and `openclaw channels status --probe` (actionable warnings + quick audits). - **β€œUsed disallowed intents”**: enable **Message Content Intent** (and likely **Server Members Intent**) in the Developer Portal, then restart the gateway. - **Bot connects but never replies in a guild channel**: - Missing **Message Content Intent**, or - The bot lacks channel permissions (View/Send/Read History), or - Your config requires mentions and you didn’t mention it, or - Your guild/channel allowlist denies the channel/user. - **`requireMention: false` but still no replies**: - `channels.discord.groupPolicy` defaults to **allowlist**; set it to `"open"` or add a guild entry under `channels.discord.guilds` (optionally list channels under `channels.discord.guilds..channels` to restrict). - If you only set `DISCORD_BOT_TOKEN` and never create a `channels.discord` section, the runtime defaults `groupPolicy` to `open`. Add `channels.discord.groupPolicy`, `channels.defaults.groupPolicy`, or a guild/channel allowlist to lock it down. - `requireMention` must live under `channels.discord.guilds` (or a specific channel). `channels.discord.requireMention` at the top level is ignored. - **Permission audits** (`channels status --probe`) only check numeric channel IDs. If you use slugs/names as `channels.discord.guilds.*.channels` keys, the audit can’t verify permissions. - **DMs don’t work**: `channels.discord.dm.enabled=false`, `channels.discord.dm.policy="disabled"`, or you haven’t been approved yet (`channels.discord.dm.policy="pairing"`). - **Exec approvals in Discord**: Discord supports a **button UI** for exec approvals in DMs (Allow once / Always allow / Deny). `/approve ...` is only for forwarded approvals and won’t resolve Discord’s button prompts. If you see `❌ Failed to submit approval: Error: unknown approval id` or the UI never shows up, check: - `channels.discord.execApprovals.enabled: true` in your config. - Your Discord user ID is listed in `channels.discord.execApprovals.approvers` (the UI is only sent to approvers). - Use the buttons in the DM prompt (**Allow once**, **Always allow**, **Deny**). - See [Exec approvals](/tools/exec-approvals) and [Slash commands](/tools/slash-commands) for the broader approvals and command flow. ## Capabilities & limits - DMs and guild text channels (threads are treated as separate channels; voice not supported). - Typing indicators sent best-effort; message chunking uses `channels.discord.textChunkLimit` (default 2000) and splits tall replies by line count (`channels.discord.maxLinesPerMessage`, default 17). - Optional newline chunking: set `channels.discord.chunkMode="newline"` to split on blank lines (paragraph boundaries) before length chunking. - File uploads supported up to the configured `channels.discord.mediaMaxMb` (default 8 MB). - Mention-gated guild replies by default to avoid noisy bots. - Reply context is injected when a message references another message (quoted content + ids). - Native reply threading is **off by default**; enable with `channels.discord.replyToMode` and reply tags. ## Retry policy Outbound Discord API calls retry on rate limits (429) using Discord `retry_after` when available, with exponential backoff and jitter. Configure via `channels.discord.retry`. See [Retry policy](/concepts/retry). ## Config ```json5 { channels: { discord: { enabled: true, token: "abc.123", groupPolicy: "allowlist", guilds: { "*": { channels: { general: { allow: true }, }, }, }, mediaMaxMb: 8, actions: { reactions: true, stickers:
https://github.com/openclaw/openclaw/blob/main//docs/channels/discord.md
main
opebclaw
[ 0.0011822348460555077, -0.09795238822698593, 0.0005498864920809865, 0.005901043768972158, -0.022558337077498436, -0.011730784550309181, 0.03126395493745804, -0.05496307834982872, 0.001146793132647872, 0.011785801500082016, -0.0017156078247353435, -0.06648535281419754, 0.07601626962423325, 0.02404129132628441, 0.0645582303404808, -0.0023911644238978624, 0.07791345566511154, -0.06638160347938538, -0.02520613744854927, -0.09375303238630295, 0.023966027423739433, 0.020806167274713516, 0.006232758518308401, 0.01874815858900547, -0.023036377504467964, -0.14100849628448486, -0.04183705896139145, -0.016515018418431282, -0.016942759975790977, -0.026428109034895897, 0.02209005318582058, 0.010827924124896526, -0.05790168419480324, 0.06797058880329132, -0.008883415721356869, 0.07488568872213364, -0.04971807450056076, 0.07084210962057114, 0.002091561444103718, 0.07566995918750763, -0.008750523440539837, -0.0084220664575696, -0.06072842702269554, 0.0009561036131344736, -0.029877135530114174, -0.014030823484063148, -0.05188395828008652, 0.045203905552625656, 0.010956916958093643, 0.06485266238451004, -0.051105041056871414, -0.0050631421618163586, 0.06852582097053528, 0.10500586032867432, -0.024013202637434006, -0.028403138741850853, -0.058081503957509995, 0.037636298686265945, 0.036855947226285934, -0.13386093080043793, -0.0001789309608284384, -0.05236932635307312, 0.021617429330945015, -0.04193083196878433, -0.04405229538679123, -0.030553482472896576, -0.019452612847089767, 0.08911079168319702, -0.01711268350481987, 0.021314462646842003, 0.01050324272364378, -0.012531444430351257, -0.10300669074058533, 0.010645482689142227, 0.02452787384390831, 0.05231083184480667, -0.030993452295660973, -0.014347834512591362, -0.008967270143330097, -0.032836198806762695, -0.02788223698735237, 0.01755901426076889, 0.041365113109350204, -0.0017637504497542977, -0.00504281697794795, 0.03617030009627342, 0.002492904895916581, 0.02578362636268139, -0.02549748867750168, -0.002123661804944277, 0.012070230208337307, -0.000588954018894583, 0.04746447131037712, 0.0833720788359642, 0.01741012930870056, 0.08366423845291138, -0.05728274956345558, 0.006537958048284054, -0.020012810826301575, 0.05843442305922508, -0.02567485347390175, -0.045478299260139465, -0.06026710569858551, -0.00038950523594394326, 0.0011875203344970942, -0.00423835264518857, 0.02981330081820488, 0.03132401034235954, 0.028949199244379997, -0.01825178787112236, -0.07365762442350388, 0.0578017421066761, 0.03721464052796364, 0.014720688574016094, 0.06422922015190125, 0.05735110864043236, 0.12731438875198364, 0.08318374305963516, 0.0057561867870390415, 0.003427974646911025, 0.07705090194940567, -0.038123007863759995, 0.028441883623600006, 0.04012402519583702, 0.09841854125261307, 0.07028862833976746, -0.006074745673686266, 1.5113363929300767e-33, 0.05579659715294838, 0.01783551461994648, -0.04608575254678726, 0.04321165755391121, -0.036226242780685425, 0.07246328145265579, -0.040055446326732635, 0.016051525250077248, -0.08418852090835571, -0.04194411635398865, -0.017818840220570564, 0.020273227244615555, 0.026544269174337387, -0.031295157968997955, -0.06624005734920502, 0.011755786836147308, 0.06170852109789848, -0.007840223610401154, 0.0807158574461937, -0.027646297588944435, -0.011389045044779778, 0.04382176324725151, -0.0018125862115994096, 0.0823565348982811, -0.005390480160713196, 0.07774744182825089, 0.0035413464065641165, -0.03337964043021202, 0.05052223056554794, 0.011152788996696472, -0.024722672998905182, 0.025737963616847992, -0.012974238023161888, 0.11939913779497147, -0.012186044827103615, 0.011933214031159878, -0.05961843580007553, -0.00023366797540802509, -0.036837514489889145, -0.010098258033394814, -0.0363314226269722, 0.00582137843593955, -0.04121097922325134, -0.12438777089118958, -0.027119483798742294, -0.027287963777780533, -0.08417458087205887, -0.02960883267223835, 0.042745817452669144, -0.03939781337976456, 0.00007318403368117288, 0.04508045315742493, -0.0010954717872664332, 0.024301204830408096, 0.09316553920507431, -0.09405241161584854, -0.034561097621917725, 0.05257560312747955, 0.012420039623975754, -0.006593822967261076, 0.029865359887480736, -0.03358565270900726, 0.01174036506563425, 0.021564092487096786, 0.07004961371421814, -0.04733151197433472, -0.058041900396347046, 0.07675961405038834, 0.02303248830139637, -0.04388205707073212, -0.030159082263708115, 0.04673143848776817, 0.008193492889404297, 0.06984380632638931, -0.12073161453008652, -0.09414064884185791, -0.02663213573396206, -0.02883240208029747, 0.022255824878811836, 0.029472144320607185, -0.03862826153635979, 0.0011611379450187087, -0.08345276862382889, -0.02903328649699688, 0.008866955526173115, -0.010796047747135162, 0.038154106587171555, -0.02268068492412567, 0.01971803978085518, 0.01797613687813282, -0.12407789379358292, 0.05717003718018532, 0.015385141596198082, 0.11097940802574158, -0.058738987892866135, -2.744193766046538e-33, -0.04427757114171982, 0.041137102991342545, -0.035123780369758606, -0.01476199459284544, 0.04550802335143089, -0.030467169359326363, 0.032790035009384155, -0.019016200676560402, 0.021983912214636803, 0.004045739304274321, -0.019625991582870483, -0.050646305084228516, -0.015448302030563354, -0.029341192916035652, 0.02091195248067379, -0.0581619031727314, 0.026910502463579178, 0.025675630196928978, -0.027272986248135567, -0.05832532420754433, -0.0427117794752121, 0.05775340273976326, -0.0716886967420578, 0.04276308789849281, 0.04109058901667595, -0.0019106860272586346, 0.0098158810287714, 0.037027303129434586, -0.009133771061897278, -0.04971151053905487, 0.05833108350634575, 0.05147328972816467, -0.03715214133262634, -0.03720564395189285, 0.022353773936629295, -0.021786445751786232, -0.005113741382956505, 0.11711658537387848, -0.06023833528161049, -0.012909838929772377, 0.14505243301391602, -0.002683888655155897, -0.12381312996149063, -0.04024254530668259, -0.025246893987059593, 0.02031533606350422, -0.015492705628275871, -0.04792935028672218, -0.04027662053704262, 0.11480873078107834, 0.01101548783481121, -0.13954482972621918, 0.14305491745471954, -0.03935463726520538, -0.04302250221371651, -0.010083583183586597, 0.05794525519013405, 0.0504738986492157, 0.09996890276670456, -0.04336730018258095, -0.02328883297741413, -0.0674336850643158, -0.00195318809710443, 0.045155495405197144, 0.06435797363519669, -0.04645991325378418, -0.0008809832506813109, 0.0712207481265068, 0.090053990483284, -0.021187635138630867, 0.0333017036318779, 0.01133184414356947, -0.0629129558801651, 0.014577023684978485, 0.10078421235084534, 0.02744719199836254, -0.07764842361211777, -0.07282713055610657, -0.0341608002781868, 0.062664695084095, -0.06525113433599472, 0.03731786459684372, 0.011333542875945568, 0.10223499685525894, 0.029597874730825424, 0.01270365621894598, 0.039065998047590256, 0.14039728045463562, 0.016121812164783478, 0.0010288518387824297, 0.05088211968541145, -0.04450560733675957, 0.05785295367240906, -0.005950802005827427, -0.007375128101557493, -5.2119094817726364e-8, 0.0010649750474840403, -0.06500320881605148, -0.0408453606069088, 0.01775684580206871, 0.004419649951159954, 0.012557868845760822, -0.021573761478066444, -0.05488293990492821, 0.005460089072585106, 0.05020570382475853, 0.0005798955098725855, 0.03739754855632782, 0.03764255717396736, -0.03213063254952431, 0.05599852278828621, -0.07539533823728561, -0.07491637021303177, -0.009583409875631332, -0.006711831782013178, -0.09105347096920013, 0.02883332408964634, -0.031789857894182205, -0.007208746857941151, 0.057027459144592285, -0.0805480107665062, -0.04091210663318634, 0.0166737399995327, -0.0005043926066718996, -0.13783153891563416, 0.03354477137327194, -0.07044100016355515, -0.05445689707994461, 0.05872953683137894, -0.05879078060388565, -0.09427134692668915, 0.060521483421325684, -0.055122047662734985, -0.03729128837585449, 0.04321913421154022, 0.019476767629384995, 0.015591573901474476, -0.03146658465266228, 0.027373671531677246, -0.0795423611998558, 0.020652471110224724, -0.05646701529622078, -0.03855739161372185, -0.06439747661352158, 0.052764177322387695, -0.005690963473170996, -0.09798207134008408, 0.024782510474324226, 0.045585982501506805, 0.045663021504879, 0.041562531143426895, -0.025718240067362785, 0.052965033799409866, -0.01398512627929449, 0.06337884813547134, -0.07218661904335022, 0.02025180496275425, 0.037459515035152435, -0.060625363141298294, -0.08618384599685669 ]
0.057153
Discord `retry_after` when available, with exponential backoff and jitter. Configure via `channels.discord.retry`. See [Retry policy](/concepts/retry). ## Config ```json5 { channels: { discord: { enabled: true, token: "abc.123", groupPolicy: "allowlist", guilds: { "*": { channels: { general: { allow: true }, }, }, }, mediaMaxMb: 8, actions: { reactions: true, stickers: true, emojiUploads: true, stickerUploads: true, polls: true, permissions: true, messages: true, threads: true, pins: true, search: true, memberInfo: true, roleInfo: true, roles: false, channelInfo: true, channels: true, voiceStatus: true, events: true, moderation: false, presence: false, }, replyToMode: "off", dm: { enabled: true, policy: "pairing", // pairing | allowlist | open | disabled allowFrom: ["123456789012345678", "steipete"], groupEnabled: false, groupChannels: ["openclaw-dm"], }, guilds: { "*": { requireMention: true }, "123456789012345678": { slug: "friends-of-openclaw", requireMention: false, reactionNotifications: "own", users: ["987654321098765432", "steipete"], channels: { general: { allow: true }, help: { allow: true, requireMention: true, users: ["987654321098765432"], skills: ["search", "docs"], systemPrompt: "Keep answers short.", }, }, }, }, }, }, } ``` Ack reactions are controlled globally via `messages.ackReaction` + `messages.ackReactionScope`. Use `messages.removeAckAfterReply` to clear the ack reaction after the bot replies. - `dm.enabled`: set `false` to ignore all DMs (default `true`). - `dm.policy`: DM access control (`pairing` recommended). `"open"` requires `dm.allowFrom=["*"]`. - `dm.allowFrom`: DM allowlist (user ids or names). Used by `dm.policy="allowlist"` and for `dm.policy="open"` validation. The wizard accepts usernames and resolves them to ids when the bot can search members. - `dm.groupEnabled`: enable group DMs (default `false`). - `dm.groupChannels`: optional allowlist for group DM channel ids or slugs. - `groupPolicy`: controls guild channel handling (`open|disabled|allowlist`); `allowlist` requires channel allowlists. - `guilds`: per-guild rules keyed by guild id (preferred) or slug. - `guilds."*"`: default per-guild settings applied when no explicit entry exists. - `guilds..slug`: optional friendly slug used for display names. - `guilds..users`: optional per-guild user allowlist (ids or names). - `guilds..tools`: optional per-guild tool policy overrides (`allow`/`deny`/`alsoAllow`) used when the channel override is missing. - `guilds..toolsBySender`: optional per-sender tool policy overrides at the guild level (applies when the channel override is missing; `"*"` wildcard supported). - `guilds..channels..allow`: allow/deny the channel when `groupPolicy="allowlist"`. - `guilds..channels..requireMention`: mention gating for the channel. - `guilds..channels..tools`: optional per-channel tool policy overrides (`allow`/`deny`/`alsoAllow`). - `guilds..channels..toolsBySender`: optional per-sender tool policy overrides within the channel (`"*"` wildcard supported). - `guilds..channels..users`: optional per-channel user allowlist. - `guilds..channels..skills`: skill filter (omit = all skills, empty = none). - `guilds..channels..systemPrompt`: extra system prompt for the channel (combined with channel topic). - `guilds..channels..enabled`: set `false` to disable the channel. - `guilds..channels`: channel rules (keys are channel slugs or ids). - `guilds..requireMention`: per-guild mention requirement (overridable per channel). - `guilds..reactionNotifications`: reaction system event mode (`off`, `own`, `all`, `allowlist`). - `textChunkLimit`: outbound text chunk size (chars). Default: 2000. - `chunkMode`: `length` (default) splits only when exceeding `textChunkLimit`; `newline` splits on blank lines (paragraph boundaries) before length chunking. - `maxLinesPerMessage`: soft max line count per message. Default: 17. - `mediaMaxMb`: clamp inbound media saved to disk. - `historyLimit`: number of recent guild messages to include as context when replying to a mention (default 20; falls back to `messages.groupChat.historyLimit`; `0` disables). - `dmHistoryLimit`: DM history limit in user turns. Per-user overrides: `dms[""].historyLimit`. - `retry`: retry policy for outbound Discord API calls (attempts, minDelayMs, maxDelayMs, jitter). - `pluralkit`: resolve PluralKit proxied messages so system members appear as distinct senders. - `actions`: per-action tool gates; omit to allow all (set `false` to disable). - `reactions` (covers react + read reactions) - `stickers`, `emojiUploads`, `stickerUploads`, `polls`, `permissions`, `messages`, `threads`, `pins`, `search` - `memberInfo`, `roleInfo`, `channelInfo`, `voiceStatus`, `events` - `channels` (create/edit/delete channels + categories + permissions) - `roles` (role add/remove, default `false`) - `moderation` (timeout/kick/ban, default `false`) - `presence` (bot status/activity, default
https://github.com/openclaw/openclaw/blob/main//docs/channels/discord.md
main
opebclaw
[ -0.05079291760921478, -0.07037555426359177, 0.06101891025900841, 0.045153189450502396, 0.004834258463233709, -0.023209379985928535, 0.041715990751981735, -0.08233651518821716, 0.018383821472525597, -0.005514224525541067, 0.0164234209805727, 0.041651833802461624, -0.04565059021115303, 0.028686828911304474, 0.05373870208859444, -0.031473107635974884, 0.040460824966430664, -0.036888811737298965, -0.07420898973941803, -0.11040652543306351, -0.0021536333952099085, 0.028132518753409386, -0.027910122647881508, 0.003990171942859888, 0.010567124001681805, -0.09181658923625946, -0.0412655808031559, 0.0067229438573122025, -0.008181664161384106, -0.04979877918958664, 0.0033478369005024433, 0.005455666687339544, -0.11412540078163147, -0.0337553508579731, -0.0020870205480605364, 0.08771588653326035, -0.0317896269261837, -0.036124929785728455, -0.012480759993195534, 0.04212552309036255, 0.003432744648307562, -0.0156810712069273, -0.07312680780887604, 0.0229995995759964, 0.06872159242630005, -0.07210780680179596, -0.0465848408639431, -0.0034111328423023224, 0.0009669667342677712, 0.0733989030122757, -0.0025104598607867956, -0.001129870768636465, 0.011254712007939816, 0.05004900321364403, 0.03194963186979294, 0.0700523629784584, -0.05366208404302597, 0.07610470056533813, 0.028768837451934814, -0.03853578492999077, 0.027909673750400543, -0.09347041696310043, 0.012757360003888607, -0.04733143374323845, -0.03926011547446251, 0.039510734379291534, 0.04442613944411278, 0.024025270715355873, 0.029071377590298653, 0.0788952112197876, 0.056214600801467896, 0.003718745894730091, -0.02717646211385727, 0.011647873558104038, 0.005022088065743446, -0.012278939597308636, -0.0032138824462890625, -0.035572271794080734, 0.01923368312418461, 0.011770580895245075, 0.007666337303817272, -0.10456360131502151, -0.018274402245879173, -0.01332324743270874, 0.022286957129836082, 0.009747718460857868, -0.0220975112169981, -0.013445780612528324, -0.03464809060096741, -0.023868078365921974, -0.10600893944501877, 0.015584378503262997, 0.047398198395967484, 0.03237944841384888, -0.0339793786406517, 0.06795140355825424, -0.06788789480924606, -0.019986707717180252, -0.04508005827665329, 0.045084454119205475, 0.005186758004128933, -0.029631396755576134, 0.029735010117292404, 0.036149125546216965, 0.015294458717107773, -0.08635656535625458, -0.0014209665823727846, 0.08827316015958786, 0.02640675939619541, -0.0109588373452425, -0.08016925305128098, 0.04442053288221359, 0.06757251918315887, -0.0057089319452643394, 0.016375424340367317, 0.07570795714855194, -0.013250722549855709, 0.05762042477726936, 0.06721983104944229, -0.009144242852926254, 0.1544531285762787, 0.0047884751111269, 0.03979633376002312, -0.0706232339143753, 0.068809874355793, 0.024940716102719307, -0.001397842774167657, 3.341422038081033e-33, 0.0019415420247241855, -0.021526232361793518, -0.09139611572027206, 0.010166012682020664, 0.06676007807254791, -0.04634850472211838, -0.03421849384903908, -0.018178699538111687, -0.06253231316804886, -0.0187236275523901, -0.010104652494192123, 0.03802017495036125, 0.010460823774337769, -0.03197253495454788, -0.012283281423151493, -0.06647796183824539, 0.04529795050621033, 0.06571824848651886, 0.03556736931204796, -0.01246711052954197, -0.005247621331363916, 0.005277729593217373, -0.029264084994792938, 0.04296134412288666, -0.00341192283667624, 0.08160681277513504, 0.0069322227500379086, 0.03734860196709633, 0.028592953458428383, 0.01588532142341137, -0.014901470392942429, 0.039125747978687286, 0.01714576594531536, -0.021970365196466446, 0.05287801846861839, -0.03381380811333656, -0.019236743450164795, 0.007862464524805546, -0.03975369408726692, -0.07977595180273056, 0.003424427006393671, 0.01588253118097782, -0.21125642955303192, -0.013154127635061741, -0.05300416052341461, -0.10600356012582779, -0.03730570524930954, -0.058313243091106415, 0.013596356846392155, -0.024061627686023712, -0.024897675961256027, 0.08771537244319916, 0.048824526369571686, -0.008052315562963486, 0.04117249324917793, -0.08335220068693161, -0.045398082584142685, 0.10202556103467941, -0.04771757498383522, 0.0013014303985983133, 0.08696141093969345, -0.010097097605466843, 0.047262609004974365, -0.054071616381406784, 0.032424382865428925, 0.04874589666724205, -0.09847383946180344, 0.005133821628987789, -0.0011426267446950078, -0.012787891551852226, -0.004611199721693993, 0.08928169310092926, 0.020637748762965202, 0.00803938414901495, -0.04806266352534294, -0.07368578761816025, -0.024595212191343307, 0.01473233476281166, 0.006387710105627775, -0.024373549968004227, 0.014658843167126179, -0.11792201548814774, -0.08987975120544434, 0.025802219286561012, 0.022921159863471985, 0.0003211949369870126, 0.06109421327710152, -0.06064577400684357, -0.03676581755280495, 0.015306029468774796, -0.06834582984447479, 0.06413935124874115, 0.09601707011461258, 0.026989798992872238, -0.05461159721016884, -3.9300585484369705e-33, -0.01166415587067604, 0.009633130393922329, -0.0038183999713510275, 0.018480334430933, -0.006359665654599667, -0.01438182219862938, 0.08407048881053925, 0.06582148373126984, 0.05199422687292099, -0.03472411260008812, 0.01801280491054058, -0.07322347909212112, -0.028378048911690712, -0.019916880875825882, -0.015651755034923553, -0.013066998682916164, -0.04344498738646507, -0.055393800139427185, 0.05948278307914734, 0.03407927602529526, -0.003857665229588747, -0.008304974995553493, -0.008280865848064423, 0.08450616151094437, -0.006050917785614729, 0.05655374005436897, 0.022811967879533768, -0.02484499104321003, -0.02665955387055874, -0.12744124233722687, 0.044105514883995056, -0.058695048093795776, -0.039846356958150864, 0.015202756971120834, 0.05705438181757927, 0.00020868635328952223, 0.008052281104028225, 0.13973712921142578, -0.07506859302520752, -0.06152405962347984, 0.1544560343027115, 0.06568244099617004, -0.07541512697935104, 0.05813195928931236, -0.004308529198169708, 0.05224102362990379, 0.029955824837088585, -0.005773424636572599, -0.04763671010732651, 0.01965606026351452, 0.07547764480113983, -0.07783279567956924, 0.06433118879795074, 0.003305222140625119, -0.05481566861271858, 0.008564130403101444, 0.04941162094473839, -0.024375135079026222, -0.0006127438973635435, 0.04789407551288605, 0.010266175493597984, -0.15398646891117096, 0.015605601482093334, 0.03492797911167145, 0.1203647032380104, -0.003569801105186343, -0.03405209630727768, 0.08121141791343689, 0.08492682129144669, -0.04631198197603226, 0.04859624803066254, 0.019980181008577347, -0.004993832670152187, 0.0059373145923018456, 0.03820876404643059, -0.0020429170690476894, -0.08255774527788162, -0.12185677140951157, -0.01731369085609913, 0.030796660110354424, -0.08634665608406067, 0.06646085530519485, -0.05880015715956688, 0.07172133028507233, 0.054102327674627304, 0.007273510098457336, -0.028018055483698845, 0.12702803313732147, 0.048397134989500046, -0.007947850041091442, -0.015020587481558323, -0.03766496479511261, -0.027936190366744995, 0.05886591225862503, 0.022215580567717552, -5.609109621218522e-8, -0.043932393193244934, -0.00592747563496232, -0.04123556986451149, -0.011526184156537056, 0.08466881513595581, 0.005368081387132406, 0.017031867057085037, -0.10313770920038223, 0.03909234702587128, -0.046849511563777924, 0.032520562410354614, 0.05651911348104477, 0.03206154331564903, 0.009335581213235855, -0.014634689316153526, -0.05763688683509827, -0.07119552046060562, 0.06664391607046127, 0.02736128307878971, -0.023817727342247963, -0.016249479725956917, -0.013523342087864876, 0.020222844555974007, 0.0484616793692112, -0.04875853285193443, 0.017704058438539505, 0.02606966719031334, 0.06169210001826286, -0.03595070540904999, -0.09659147262573242, -0.0827561616897583, -0.06743960827589035, 0.0833413377404213, -0.007119829300791025, -0.10148464143276215, 0.018591303378343582, -0.026995396241545677, 0.015801310539245605, 0.028294721618294716, 0.0015771340113133192, 0.04580492526292801, -0.018396176397800446, -0.014944100752472878, 0.0333123505115509, -0.038237154483795166, -0.0775647982954979, -0.013971841894090176, 0.031856924295425415, 0.07042402774095535, -0.03896757960319519, -0.05057290568947792, -0.04439050704240799, -0.003673698753118515, -0.002781488699838519, 0.058097727596759796, -0.03380727022886276, 0.04380633309483528, 0.03735950589179993, -0.007436735555529594, 0.02445906586945057, 0.07831016927957535, -0.0037516371812671423, -0.08622938394546509, -0.044249262660741806 ]
0.082228
`false` to disable). - `reactions` (covers react + read reactions) - `stickers`, `emojiUploads`, `stickerUploads`, `polls`, `permissions`, `messages`, `threads`, `pins`, `search` - `memberInfo`, `roleInfo`, `channelInfo`, `voiceStatus`, `events` - `channels` (create/edit/delete channels + categories + permissions) - `roles` (role add/remove, default `false`) - `moderation` (timeout/kick/ban, default `false`) - `presence` (bot status/activity, default `false`) - `execApprovals`: Discord-only exec approval DMs (button UI). Supports `enabled`, `approvers`, `agentFilter`, `sessionFilter`. Reaction notifications use `guilds..reactionNotifications`: - `off`: no reaction events. - `own`: reactions on the bot's own messages (default). - `all`: all reactions on all messages. - `allowlist`: reactions from `guilds..users` on all messages (empty list disables). ### PluralKit (PK) support Enable PK lookups so proxied messages resolve to the underlying system + member. When enabled, OpenClaw uses the member identity for allowlists and labels the sender as `Member (PK:System)` to avoid accidental Discord pings. ```json5 { channels: { discord: { pluralkit: { enabled: true, token: "pk_live_...", // optional; required for private systems }, }, }, } ``` Allowlist notes (PK-enabled): - Use `pk:` in `dm.allowFrom`, `guilds..users`, or per-channel `users`. - Member display names are also matched by name/slug. - Lookups use the **original** Discord message ID (the pre-proxy message), so the PK API only resolves it within its 30-minute window. - If PK lookups fail (e.g., private system without a token), proxied messages are treated as bot messages and are dropped unless `channels.discord.allowBots=true`. ### Tool action defaults | Action group | Default | Notes | | -------------- | -------- | ---------------------------------- | | reactions | enabled | React + list reactions + emojiList | | stickers | enabled | Send stickers | | emojiUploads | enabled | Upload emojis | | stickerUploads | enabled | Upload stickers | | polls | enabled | Create polls | | permissions | enabled | Channel permission snapshot | | messages | enabled | Read/send/edit/delete | | threads | enabled | Create/list/reply | | pins | enabled | Pin/unpin/list | | search | enabled | Message search (preview feature) | | memberInfo | enabled | Member info | | roleInfo | enabled | Role list | | channelInfo | enabled | Channel info + list | | channels | enabled | Channel/category management | | voiceStatus | enabled | Voice state lookup | | events | enabled | List/create scheduled events | | roles | disabled | Role add/remove | | moderation | disabled | Timeout/kick/ban | | presence | disabled | Bot status/activity (setPresence) | - `replyToMode`: `off` (default), `first`, or `all`. Applies only when the model includes a reply tag. ## Reply tags To request a threaded reply, the model can include one tag in its output: - `[[reply_to_current]]` β€” reply to the triggering Discord message. - `[[reply_to:]]` β€” reply to a specific message id from context/history. Current message ids are appended to prompts as `[message_id: …]`; history entries already include ids. Behavior is controlled by `channels.discord.replyToMode`: - `off`: ignore tags. - `first`: only the first outbound chunk/attachment is a reply. - `all`: every outbound chunk/attachment is a reply. Allowlist matching notes: - `allowFrom`/`users`/`groupChannels` accept ids, names, tags, or mentions like `<@id>`. - Prefixes like `discord:`/`user:` (users) and `channel:` (group DMs) are supported. - Use `*` to allow any sender/channel. - When `guilds..channels` is present, channels not listed are denied by default. - When `guilds..channels` is omitted, all channels in the allowlisted guild are allowed. - To allow **no channels**, set `channels.discord.groupPolicy: "disabled"` (or keep an empty allowlist). - The configure wizard accepts `Guild/Channel` names (public + private) and resolves them to IDs when possible. - On startup, OpenClaw resolves channel/user names in allowlists to IDs (when the
https://github.com/openclaw/openclaw/blob/main//docs/channels/discord.md
main
opebclaw
[ -0.06398756802082062, -0.06230982393026352, 0.011523043736815453, 0.04705267399549484, 0.0829024538397789, 0.005254737567156553, 0.03817960247397423, 0.029979484155774117, 0.0013771330704912543, 0.039799243211746216, 0.060923654586076736, -0.04524540901184082, -0.013805175200104713, 0.0590054914355278, 0.053368013352155685, 0.049457848072052, 0.10878553986549377, -0.11143968999385834, -0.06493733823299408, -0.038147371262311935, -0.040454842150211334, -0.04029291868209839, 0.03586810082197189, 0.010157998651266098, -0.03461248800158501, -0.024050207808613777, -0.04149910807609558, -0.002870028605684638, -0.020447799935936928, -0.09247555583715439, 0.018432263284921646, 0.008468827232718468, -0.010015306994318962, -0.007144655101001263, -0.013903594575822353, 0.0372941680252552, 0.0002282472705701366, -0.016089998185634613, -0.020214740186929703, -0.033228643238544464, -0.027926383540034294, -0.028560534119606018, -0.03020346164703369, -0.03882038593292236, 0.06128494441509247, -0.011137211695313454, -0.02479013241827488, -0.05902036279439926, -0.04491143673658371, 0.018989140167832375, -0.009319858625531197, 0.0386030338704586, 0.0425887331366539, 0.019485561177134514, 0.05597667396068573, -0.022100036963820457, -0.01933194324374199, -0.0016486858949065208, 0.035528674721717834, -0.07726205885410309, 0.002996288938447833, -0.031175969168543816, -0.012244272977113724, 0.033798493444919586, -0.0076757026836276054, 0.045286454260349274, -0.013309056870639324, -0.02233736589550972, 0.09414681792259216, 0.013760044239461422, -0.05948431044816971, 0.02731906622648239, -0.011931664310395718, -0.005568471271544695, 0.00011896635260200128, -0.07086222618818283, -0.021814635023474693, -0.04697856307029724, 0.016376471146941185, -0.05006875842809677, -0.018945610150694847, -0.05597157031297684, 0.0010897739557549357, 0.01949518546462059, -0.03311945125460625, 0.07288087159395218, -0.030540963634848595, 0.002850736491382122, -0.03871196135878563, 0.03510648384690285, -0.006223086267709732, -0.001511473092250526, 0.1199687197804451, 0.034864868968725204, -0.0440543107688427, 0.014005831442773342, -0.06105347350239754, 0.05421915650367737, -0.04622520133852959, 0.04701957106590271, 0.041055794805288315, -0.03017975389957428, -0.06761348992586136, 0.027465997263789177, -0.043976686894893646, -0.046330347657203674, -0.029561098664999008, 0.0034273257479071617, 0.00923877116292715, 0.011752557940781116, -0.09187585115432739, -0.03287903591990471, -0.008905218914151192, -0.018120115622878075, -0.03208966925740242, 0.012647937051951885, 0.04839928448200226, 0.00762786203995347, 0.04289194568991661, 0.003326514270156622, 0.1370248943567276, 0.0037676601205021143, 0.041364893317222595, -0.009533725678920746, 0.03784627467393875, 0.03601634129881859, -0.015997212380170822, -1.941529580942113e-34, 0.0520298071205616, -0.010450849309563637, -0.09316934645175934, 0.012415768578648567, 0.07151880860328674, 0.0348680354654789, -0.010585636831820011, -0.01435759011656046, -0.057425253093242645, 0.009498859755694866, 0.044982727617025375, 0.07048213481903076, -0.0027124944608658552, 0.05116250365972519, 0.04306104779243469, -0.01779233105480671, 0.10304336994886398, -0.019306164234876633, 0.030863596126437187, -0.0534183531999588, 0.024445204064249992, -0.010188003070652485, -0.054602283984422684, 0.10069937258958817, 0.018996816128492355, 0.07860005646944046, -0.041711051017045975, 0.10008939355611801, 0.0006490828236564994, -0.01716451905667782, -0.05574924871325493, -0.03080587089061737, -0.03535795211791992, 0.026115573942661285, 0.005671288818120956, -0.02317441999912262, -0.1315251588821411, -0.019174665212631226, -0.04394513741135597, -0.05837090685963631, -0.09272319078445435, 0.0038865727838128805, -0.1443554311990738, -0.037370480597019196, 0.023631369695067406, -0.031632959842681885, -0.0319979190826416, -0.040620069950819016, 0.06269952654838562, 0.048653535544872284, -0.01385642308741808, 0.01674104668200016, 0.10107023268938065, -0.03127651661634445, 0.03435992822051048, -0.0415332205593586, -0.04408884048461914, 0.01639796793460846, 0.017494596540927887, 0.005193913821130991, 0.023575183004140854, 0.014012604020535946, -0.0199666079133749, -0.048536285758018494, -0.02522892877459526, 0.03690827637910843, -0.08226869255304337, -0.03482599928975105, 0.06628478318452835, -0.024598175659775734, -0.09333575516939163, 0.0395931676030159, 0.07201872020959854, 0.03535159304738045, -0.06211747229099274, -0.08360360562801361, -0.07103975117206573, -0.06184839829802513, -0.053018275648355484, 0.02958252653479576, -0.016448985785245895, -0.046390634030103683, -0.061339348554611206, 0.05894780904054642, 0.0814153254032135, -0.0830790102481842, -0.06214918568730354, -0.011353300884366035, -0.008037129417061806, 0.04411644488573074, -0.010909187607467175, -0.00569627620279789, 0.05170835927128792, 0.022129174321889877, -0.08816611021757126, -3.01182187097611e-33, -0.004968750290572643, -0.0008035438368096948, -0.05088689550757408, -0.008293094113469124, -0.06660417467355728, 0.04744350165128708, -0.027957947924733162, 0.05449069291353226, 0.09688090533018112, -0.05318068340420723, 0.022848373278975487, 0.013327119871973991, 0.03124871291220188, -0.016520710662007332, -0.08285164088010788, 0.03708161413669586, -0.05197814851999283, -0.004729733802378178, -0.01126275397837162, -0.030186181887984276, -0.05478743836283684, 0.14517197012901306, -0.04354511573910713, 0.08813454210758209, -0.04142027348279953, 0.04790271073579788, 0.04075084254145622, -0.029573597013950348, 0.03278443217277527, -0.038855865597724915, 0.06469438225030899, 0.013518678024411201, -0.08516281098127365, -0.0075134835205972195, 0.050711434334516525, -0.05540569871664047, -0.035826269537210464, 0.08801057189702988, -0.0786086842417717, -0.03753245249390602, 0.05637546628713608, 0.033289749175310135, -0.015930626541376114, 0.0941193699836731, -0.04087090864777565, 0.061383284628391266, -0.059368494898080826, -0.07275279611349106, -0.04394968971610069, 0.06749510020017624, 0.009287712164223194, -0.08812636882066727, 0.07006128877401352, 0.004340633284300566, 0.01089105848222971, -0.02345341257750988, 0.02776454947888851, -0.030941203236579895, 0.04006674140691757, -0.02241363748908043, 0.06443795561790466, -0.05283598229289055, -0.03630729019641876, 0.036145273596048355, 0.06364548206329346, -0.027520669624209404, -0.04898764565587044, 0.14065121114253998, 0.09608423709869385, -0.03714023903012276, 0.0963425561785698, 0.010548884980380535, -0.025634612888097763, -0.0589497871696949, 0.0686848908662796, -0.0384274423122406, -0.09372279793024063, -0.08987082540988922, -0.01837284117937088, 0.05908053368330002, -0.0826641097664833, 0.03183230757713318, 0.036410581320524216, 0.04255763441324234, -0.020811110734939575, -0.027429699897766113, -0.06683081388473511, 0.149593785405159, 0.035638175904750824, -0.0016249148175120354, 0.004437140189111233, 0.007360351737588644, 0.013814308680593967, 0.11664050817489624, -0.013659616932272911, -4.850643264830978e-8, 0.030320873484015465, -0.08704773336648941, 0.015020626597106457, -0.030825983732938766, 0.012082358822226524, -0.01832791417837143, 0.00888101290911436, -0.05146205052733421, -0.0670158714056015, -0.02897460199892521, 0.05894819647073746, 0.057981789112091064, -0.0844983458518982, -0.06357026845216751, 0.09960014373064041, -0.0337766669690609, -0.05767516419291496, 0.13644474744796753, -0.050898995250463486, -0.10943187773227692, -0.02378581278026104, -0.029501209035515785, -0.0641510859131813, 0.016231423243880272, 0.013978490605950356, -0.04943295568227768, 0.04642803594470024, 0.0320909209549427, -0.04566708207130432, 0.016286181285977364, -0.028721392154693604, -0.0517992228269577, 0.059722039848566055, -0.060658667236566544, -0.03510167449712753, 0.02299140952527523, 0.02482137829065323, -0.03594017028808594, 0.03760237619280815, -0.010178305208683014, 0.006107135210186243, -0.022047657519578934, -0.023263150826096535, 0.06080393120646477, -0.0628916472196579, -0.030563896521925926, -0.018162470310926437, -0.06064886599779129, 0.03741518408060074, -0.03572319075465202, -0.011623221449553967, 0.0061211674474179745, -0.02110062539577484, 0.13988268375396729, 0.008359536528587341, 0.057850029319524765, 0.04903314262628555, 0.030146939679980278, 0.060051362961530685, -0.019833631813526154, 0.1414283812046051, 0.037814363837242126, -0.01768793724477291, 0.010139895603060722 ]
0.213358
channels in the allowlisted guild are allowed. - To allow **no channels**, set `channels.discord.groupPolicy: "disabled"` (or keep an empty allowlist). - The configure wizard accepts `Guild/Channel` names (public + private) and resolves them to IDs when possible. - On startup, OpenClaw resolves channel/user names in allowlists to IDs (when the bot can search members) and logs the mapping; unresolved entries are kept as typed. Native command notes: - The registered commands mirror OpenClaw’s chat commands. - Native commands honor the same allowlists as DMs/guild messages (`channels.discord.dm.allowFrom`, `channels.discord.guilds`, per-channel rules). - Slash commands may still be visible in Discord UI to users who aren’t allowlisted; OpenClaw enforces allowlists on execution and replies β€œnot authorized”. ## Tool actions The agent can call `discord` with actions like: - `react` / `reactions` (add or list reactions) - `sticker`, `poll`, `permissions` - `readMessages`, `sendMessage`, `editMessage`, `deleteMessage` - Read/search/pin tool payloads include normalized `timestampMs` (UTC epoch ms) and `timestampUtc` alongside raw Discord `timestamp`. - `threadCreate`, `threadList`, `threadReply` - `pinMessage`, `unpinMessage`, `listPins` - `searchMessages`, `memberInfo`, `roleInfo`, `roleAdd`, `roleRemove`, `emojiList` - `channelInfo`, `channelList`, `voiceStatus`, `eventList`, `eventCreate` - `timeout`, `kick`, `ban` - `setPresence` (bot activity and online status) Discord message ids are surfaced in the injected context (`[discord message id: …]` and history lines) so the agent can target them. Emoji can be unicode (e.g., `βœ…`) or custom emoji syntax like `<:party_blob:1234567890>`. ## Safety & ops - Treat the bot token like a password; prefer the `DISCORD_BOT_TOKEN` env var on supervised hosts or lock down the config file permissions. - Only grant the bot permissions it needs (typically Read/Send Messages). - If the bot is stuck or rate limited, restart the gateway (`openclaw gateway --force`) after confirming no other processes own the Discord session. ````
https://github.com/openclaw/openclaw/blob/main//docs/channels/discord.md
main
opebclaw
[ -0.012477128766477108, -0.097713902592659, -0.08864704519510269, 0.012409129180014133, -0.00911477580666542, -0.03676673769950867, -0.015709655359387398, -0.05365040525794029, -0.027944594621658325, -0.023910164833068848, 0.01694699190557003, -0.010197379626333714, 0.006792859639972448, 0.04999234154820442, 0.064095139503479, 0.006608853116631508, 0.07970260828733444, -0.09687309712171555, -0.02951657585799694, -0.055769506841897964, 0.061677590012550354, 0.074949711561203, -0.014425655826926231, -0.050292108207941055, -0.009166152216494083, -0.1919865757226944, -0.04578790441155434, -0.018883710727095604, -0.02644040621817112, -0.042329102754592896, 0.02222244255244732, 0.021354112774133682, 0.02593853324651718, 0.06109505519270897, -0.0014593551168218255, 0.049761030822992325, 0.01916470192372799, 0.026752222329378128, -0.0783662423491478, 0.030309518799185753, 0.020514698699116707, -0.02901292033493519, -0.062443044036626816, 0.0047831484116613865, -0.06290911883115768, -0.04805995523929596, -0.0030058855190873146, -0.073994480073452, -0.044370029121637344, 0.09632808715105057, -0.015215616673231125, -0.015282822772860527, 0.0029104198329150677, 0.05986998230218887, 0.013741888105869293, -0.024824490770697594, -0.07613936811685562, 0.014255106449127197, 0.08105690777301788, -0.12338616698980331, 0.027139900252223015, -0.034225545823574066, -0.02569800801575184, 0.01824759505689144, -0.09930858761072159, -0.010677841491997242, 0.016486570239067078, 0.034154415130615234, 0.003577832132577896, -0.058596059679985046, -0.01131144817918539, 0.0041331821121275425, -0.03720306232571602, -0.01892988197505474, 0.06402935832738876, 0.04904497042298317, 0.00893839355558157, -0.0011051336769014597, -0.022979959845542908, -0.12132944911718369, 0.001965949544683099, 0.01874971017241478, 0.006618945859372616, 0.04766540601849556, -0.015548041090369225, 0.1511198729276657, -0.02088908664882183, 0.04226066544651985, -0.012261226773262024, 0.0015519738662987947, -0.02106747031211853, -0.012567120604217052, 0.028626613318920135, 0.00739632872864604, -0.005294256843626499, 0.0037436371203511953, -0.01610947959125042, 0.0192912258207798, -0.058538760989904404, 0.06248430535197258, -0.0030261275824159384, -0.0198726374655962, -0.08373547345399857, -0.02192683331668377, -0.085260309278965, -0.00969221256673336, 0.05223522707819939, 0.057018429040908813, -0.0015039767604321241, 0.014376437291502953, -0.03594452515244484, 0.018199147656559944, 0.05459503456950188, -0.0593658871948719, 0.04365486651659012, 0.039723947644233704, 0.028580226004123688, -0.006366731598973274, 0.08205271512269974, 0.022066734731197357, 0.05482054129242897, 0.0243630800396204, 0.0776333138346672, 0.030159613117575645, 0.06761471182107925, 0.1443241536617279, 0.017611324787139893, 1.43113939287118e-33, 0.04972877725958824, -0.030820902436971664, -0.0709109678864479, -0.011119051836431026, 0.06426815688610077, 0.06072808802127838, 0.019785186275839806, 0.04423804581165314, -0.11027966439723969, 0.03386298567056656, 0.012708486057817936, 0.06525333970785141, 0.019613664597272873, -0.02977026253938675, 0.0465627983212471, 0.06609753519296646, 0.05304808169603348, -0.01042667031288147, 0.012076836079359055, -0.07524114102125168, -0.028727075085043907, 0.0887584462761879, -0.027799071744084358, 0.10589952766895294, -0.01810801774263382, 0.03428279608488083, -0.058600421994924545, 0.0002454933419357985, 0.10651951283216476, 0.03886773809790611, -0.018316136673092842, -0.010390002280473709, -0.0006120966281741858, 0.0805210992693901, 0.03259890899062157, 0.07936431467533112, -0.07404834777116776, -0.028787000104784966, -0.0228116475045681, -0.0755411684513092, -0.00835979450494051, -0.04002128168940544, -0.10110846161842346, -0.020638706162571907, -0.026899196207523346, -0.0746123343706131, -0.05391845852136612, -0.005895362701267004, 0.0007204252760857344, 0.03076222725212574, -0.025995785370469093, 0.09156947582960129, 0.006362507119774818, -0.013824175111949444, 0.05542214214801788, -0.08225977420806885, -0.050693076103925705, 0.021800410002470016, 0.02782485820353031, -0.022451644763350487, -0.005460516549646854, 0.0839700773358345, 0.016586698591709137, 0.023936137557029724, -0.07436753809452057, -0.014811430126428604, -0.02447684481739998, 0.033779460936784744, -0.0022074170410633087, -0.07725989073514938, -0.03644516319036484, 0.005848066881299019, -0.023953069001436234, 0.09615417569875717, -0.10797353088855743, -0.04953503608703613, -0.032770298421382904, -0.047090061008930206, 0.07351196557283401, -0.017167426645755768, -0.014245543628931046, -0.047150298953056335, -0.08467543125152588, 0.046852223575115204, 0.002309724222868681, -0.05167630314826965, 0.060342613607645035, -0.011417568661272526, 0.049846600741147995, 0.02674045041203499, -0.096236452460289, 0.04136348515748978, -0.023640736937522888, 0.09043357521295547, 0.016770482063293457, -3.156985137727093e-33, -0.007259473670274019, 0.06425561755895615, -0.013763410039246082, -0.027860134840011597, -0.016041172668337822, -0.0005908026942051947, 0.035055387765169144, -0.08072345703840256, 0.03431866317987442, -0.049567919224500656, 0.023596057668328285, 0.034475479274988174, -0.018407853320240974, -0.08753767609596252, 0.04586700722575188, -0.10995260626077652, -0.0531076155602932, 0.008564207702875137, -0.025058526545763016, -0.004379376769065857, -0.06424571573734283, 0.0267302505671978, -0.03137461468577385, 0.09357291460037231, 0.008710174821317196, 0.026936210691928864, 0.045411981642246246, 0.015217465348541737, 0.0047961208038032055, -0.012599095702171326, 0.10005539655685425, 0.028084533289074898, -0.06833310425281525, -0.02140771970152855, -0.01723867654800415, 0.005894720088690519, 0.011750034987926483, 0.10614535957574844, -0.06433846056461334, -0.07739447057247162, 0.04006386920809746, 0.026902060955762863, -0.07904669642448425, 0.039441365748643875, -0.017695873975753784, 0.09435467422008514, -0.006976001895964146, -0.06483320146799088, -0.08227813988924026, 0.05529782921075821, 0.0630483627319336, -0.041195355355739594, 0.13921163976192474, -0.030555738136172295, 0.022275300696492195, 0.06578924506902695, 0.057216621935367584, 0.0014337800676003098, 0.06953983753919601, -0.05799257755279541, 0.004563718102872372, -0.06571704149246216, -0.03262200579047203, 0.07572096586227417, 0.0507572777569294, -0.07279355078935623, -0.03705891594290733, 0.11295271664857864, -0.002924415748566389, -0.029683787375688553, 0.035618457943201065, -0.058581892400979996, -0.03222180902957916, -0.04595983773469925, 0.008245888166129589, -0.026650570333003998, -0.05015892907977104, -0.08507241308689117, -0.05885184928774834, 0.06108257174491882, -0.05344529077410698, 0.015435087494552135, 0.08479128032922745, 0.033215731382369995, 0.018415601924061775, -0.023124074563384056, 0.05708123371005058, 0.12553277611732483, 0.04787531495094299, 0.03641995042562485, -0.02925637550652027, -0.03800343722105026, -0.019113320857286453, 0.01343572698533535, 0.04251442849636078, -4.750662085939439e-8, -0.08340179920196533, -0.048678383231163025, -0.056191712617874146, 0.006514814682304859, -0.0056016407907009125, -0.029588934034109116, 0.00010926270624622703, -0.002269522286951542, -0.0022375122644007206, 0.0838426724076271, 0.07709129899740219, 0.03642478585243225, -0.04283886030316353, -0.04001344367861748, 0.04647870361804962, 0.03382879123091698, 0.02111772634088993, -0.0025089869741350412, 0.0024027912877500057, 0.01897565834224224, -0.029197560623288155, -0.06324931979179382, 0.0018314069602638483, 0.0787404403090477, -0.10296790301799774, -0.07391876727342606, -0.04566490277647972, 0.010813339613378048, -0.06680158525705338, 0.05249141901731491, -0.0353718027472496, -0.03462449833750725, 0.088960200548172, 0.01813955418765545, -0.055658187717199326, 0.04423659294843674, -0.08029098808765411, 0.011155596002936363, 0.03970806673169136, 0.025783734396100044, 0.042051803320646286, -0.05166008695960045, 0.026771798729896545, -0.037351276725530624, -0.0643717423081398, -0.003407084383070469, -0.011868602596223354, -0.05018330737948418, 0.018472706899046898, 0.003020779462531209, -0.05337144806981087, 0.04807744920253754, 0.03615613281726837, 0.054506972432136536, 0.015872111544013023, 0.034699443727731705, 0.03743220493197441, -0.012155947275459766, 0.014311380684375763, -0.0018513797549530864, -0.020132489502429962, 0.03176325187087059, -0.014601723290979862, -0.04069902375340462 ]
0.068416
# LINE (plugin) LINE connects to OpenClaw via the LINE Messaging API. The plugin runs as a webhook receiver on the gateway and uses your channel access token + channel secret for authentication. Status: supported via plugin. Direct messages, group chats, media, locations, Flex messages, template messages, and quick replies are supported. Reactions and threads are not supported. ## Plugin required Install the LINE plugin: ```bash openclaw plugins install @openclaw/line ``` Local checkout (when running from a git repo): ```bash openclaw plugins install ./extensions/line ``` ## Setup 1. Create a LINE Developers account and open the Console: https://developers.line.biz/console/ 2. Create (or pick) a Provider and add a \*\*Messaging API\*\* channel. 3. Copy the \*\*Channel access token\*\* and \*\*Channel secret\*\* from the channel settings. 4. Enable \*\*Use webhook\*\* in the Messaging API settings. 5. Set the webhook URL to your gateway endpoint (HTTPS required): ``` https://gateway-host/line/webhook ``` The gateway responds to LINE’s webhook verification (GET) and inbound events (POST). If you need a custom path, set `channels.line.webhookPath` or `channels.line.accounts..webhookPath` and update the URL accordingly. ## Configure Minimal config: ```json5 { channels: { line: { enabled: true, channelAccessToken: "LINE\_CHANNEL\_ACCESS\_TOKEN", channelSecret: "LINE\_CHANNEL\_SECRET", dmPolicy: "pairing", }, }, } ``` Env vars (default account only): - `LINE\_CHANNEL\_ACCESS\_TOKEN` - `LINE\_CHANNEL\_SECRET` Token/secret files: ```json5 { channels: { line: { tokenFile: "/path/to/line-token.txt", secretFile: "/path/to/line-secret.txt", }, }, } ``` Multiple accounts: ```json5 { channels: { line: { accounts: { marketing: { channelAccessToken: "...", channelSecret: "...", webhookPath: "/line/marketing", }, }, }, }, } ``` ## Access control Direct messages default to pairing. Unknown senders get a pairing code and their messages are ignored until approved. ```bash openclaw pairing list line openclaw pairing approve line ```` ``` Allowlists and policies: - `channels.line.dmPolicy`: `pairing | allowlist | open | disabled` - `channels.line.allowFrom`: allowlisted LINE user IDs for DMs - `channels.line.groupPolicy`: `allowlist | open | disabled` - `channels.line.groupAllowFrom`: allowlisted LINE user IDs for groups - Per-group overrides: `channels.line.groups..allowFrom` LINE IDs are case-sensitive. Valid IDs look like: - User: `U` + 32 hex chars - Group: `C` + 32 hex chars - Room: `R` + 32 hex chars ## Message behavior - Text is chunked at 5000 characters. - Markdown formatting is stripped; code blocks and tables are converted into Flex cards when possible. - Streaming responses are buffered; LINE receives full chunks with a loading animation while the agent works. - Media downloads are capped by `channels.line.mediaMaxMb` (default 10). ## Channel data (rich messages) Use `channelData.line` to send quick replies, locations, Flex cards, or template messages. ```json5 { text: "Here you go", channelData: { line: { quickReplies: ["Status", "Help"], location: { title: "Office", address: "123 Main St", latitude: 35.681236, longitude: 139.767125, }, flexMessage: { altText: "Status card", contents: { /* Flex payload */ }, }, templateMessage: { type: "confirm", text: "Proceed?", confirmLabel: "Yes", confirmData: "yes", cancelLabel: "No", cancelData: "no", }, }, }, } ``` The LINE plugin also ships a `/card` command for Flex message presets: ``` /card info "Welcome" "Thanks for joining!" ``` ## Troubleshooting - **Webhook verification fails:** ensure the webhook URL is HTTPS and the `channelSecret` matches the LINE console. - **No inbound events:** confirm the webhook path matches `channels.line.webhookPath` and that the gateway is reachable from LINE. - **Media download errors:** raise `channels.line.mediaMaxMb` if media exceeds the default limit. ````
https://github.com/openclaw/openclaw/blob/main//docs/channels/line.md
main
opebclaw
[ -0.08621446788311005, -0.01687822863459587, -0.12222238630056381, 0.051471952348947525, -0.03980923816561699, -0.12319580465555191, 0.007097961846739054, 0.01806970313191414, 0.06852179020643234, -0.00831916555762291, 0.0047349631786346436, -0.03895566985011101, 0.0158794317394495, -0.01909376122057438, 0.10166002064943314, 0.08536624163389206, -0.0014397917548194528, -0.05873236432671547, -0.00006561331974808127, -0.04389796033501625, -0.019931398332118988, 0.030016982927918434, 0.016775693744421005, -0.008832304738461971, -0.026739640161395073, -0.1267796754837036, 0.019306346774101257, 0.05355696752667427, -0.0769277811050415, -0.022868074476718903, 0.07078192383050919, 0.031660452485084534, -0.016190173104405403, 0.042700596153736115, -0.02199903130531311, 0.09321697801351547, 0.09837017953395844, -0.023090839385986328, -0.08268732577562332, 0.01985364779829979, 0.01946946606040001, -0.025625906884670258, -0.042654894292354584, -0.03629372641444206, -0.045752253383398056, -0.0993051752448082, -0.03874272480607033, -0.04212101176381111, -0.014376870356500149, 0.04775029793381691, -0.04275621473789215, -0.07565728574991226, -0.004641515668481588, -0.004818673711270094, -0.00265767821110785, -0.014472734183073044, -0.01296931691467762, 0.018268410116434097, 0.0394163578748703, -0.05363638326525688, 0.06761284172534943, -0.05011006072163582, -0.00929983239620924, 0.006419687066227198, -0.13685236871242523, -0.011564994230866432, -0.039525412023067474, 0.041948385536670685, -0.004532842431217432, -0.040571052581071854, -0.04313882440328598, -0.032611530274152756, -0.09040435403585434, -0.06115394085645676, 0.007486415095627308, -0.008137832395732403, 0.03956706449389458, 0.019834164530038834, -0.04290204122662544, -0.011331348679959774, -0.04521266371011734, -0.036655493080616, -0.02251577377319336, 0.05201167240738869, -0.022309210151433945, 0.14315642416477203, 0.030825603753328323, 0.052666980773210526, 0.02230856940150261, 0.02135372906923294, -0.026167741045355797, -0.03665594011545181, 0.011946014128625393, -0.015166537836194038, -0.022004131227731705, -0.025958862155675888, -0.05600105971097946, -0.01889621466398239, -0.08949019759893417, 0.09145554900169373, -0.007322659716010094, 0.02597527578473091, 0.003348423633724451, -0.02523285150527954, -0.008231316693127155, 0.03299896419048309, 0.05097222328186035, 0.10217812657356262, 0.030743815004825592, 0.007401122711598873, -0.008936443366110325, -0.05810660868883133, 0.07501017302274704, -0.05263173580169678, -0.01527142059057951, 0.0831134095788002, -0.011573847383260727, 0.0014897262444719672, 0.09994900226593018, 0.08246302604675293, 0.06912155449390411, 0.0169646218419075, -0.06958724558353424, 0.017535051330924034, 0.09201490879058838, 0.07904595136642456, 0.1354406774044037, 4.7698746916766146e-33, 0.0698237493634224, 0.0246978010982275, 0.02362891286611557, 0.018910156562924385, 0.09845758974552155, 0.025808479636907578, -0.013222239911556244, -0.046869706362485886, -0.0789177417755127, 0.021538499742746353, 0.01934385485947132, -0.03267136961221695, 0.014565271325409412, -0.031937774270772934, -0.035073909908533096, -0.02131349965929985, -0.07426296174526215, -0.014069952070713043, 0.08167693018913269, 0.00597081333398819, -0.06957579404115677, -0.08935697376728058, 0.0025189595762640238, 0.0010456294985488057, 0.06441406905651093, -0.011370732448995113, 0.0044404929503798485, 0.011756162159144878, 0.019713345915079117, 0.033379655331373215, 0.05942945182323456, -0.047634609043598175, -0.0018604074139147997, 0.05481855571269989, -0.09131281077861786, -0.01789388433098793, -0.107793889939785, -0.06453388929367065, -0.01661060005426407, -0.035418082028627396, 0.03390173986554146, -0.0477021224796772, -0.09684782475233078, -0.0014578962000086904, -0.010528108105063438, -0.01593679003417492, -0.05073866248130798, 0.0706198513507843, 0.061127517372369766, 0.029452018439769745, -0.03512458875775337, 0.03776085004210472, -0.0008776956237852573, -0.022242050617933273, 0.04992975667119026, -0.056116100400686264, -0.05929837375879288, -0.012072036042809486, -0.00798347219824791, -0.018779661506414413, -0.04275348782539368, 0.05268503352999687, 0.0011394588509574533, -0.00851828046143055, 0.034002624452114105, -0.003873731242492795, -0.01643422432243824, 0.046881530433893204, -0.015293621458113194, -0.023454252630472183, -0.025040095672011375, 0.0314495712518692, 0.035033971071243286, 0.04727574810385704, -0.09214566648006439, -0.022079555317759514, 0.0030870495829731226, 0.0306545402854681, 0.1441175937652588, 0.03371664881706238, 0.07350273430347443, -0.04648229852318764, -0.00788087584078312, 0.04647244140505791, 0.04654582962393761, 0.02535891905426979, 0.06478019058704376, -0.0759868174791336, -0.030033057555556297, 0.12398567795753479, -0.06224502623081207, 0.03503959998488426, -0.04141336306929588, 0.009913231246173382, 0.017631180584430695, -5.905395622415221e-33, -0.044785112142562866, 0.03047364205121994, -0.052316032350063324, -0.0017895660130307078, 0.0033444499131292105, 0.000780282833147794, 0.012024147436022758, -0.05660706013441086, 0.03518880903720856, 0.04164503142237663, -0.07143017649650574, 0.07343742996454239, -0.018248513340950012, -0.03929651528596878, 0.10899946838617325, -0.06670217961072922, -0.02820836380124092, -0.07165955007076263, 0.023434659466147423, 0.0011054502101615071, -0.01234368048608303, -0.04020290449261665, 0.006514855194836855, 0.02394445426762104, 0.04372863844037056, -0.023387940600514412, 0.05176445469260216, 0.02923402190208435, -0.04606388136744499, -0.043677542358636856, 0.005468529183417559, 0.05340023338794708, -0.060860004276037216, 0.016546793282032013, -0.001162226195447147, -0.01444331370294094, 0.008211906999349594, 0.1491849273443222, 0.04695085808634758, -0.015123961493372917, 0.08198447525501251, -0.006893649231642485, -0.08420190960168839, -0.04997481778264046, -0.056354179978370667, 0.07310303300619125, -0.00030918329139240086, -0.05358890816569328, -0.15250776708126068, 0.033298466354608536, -0.0385148711502552, 0.04180101305246353, 0.06643061339855194, 0.06971680372953415, -0.0372258685529232, 0.06451655924320221, 0.06622860580682755, 0.0004792929394170642, -0.01987399533390999, -0.1027354970574379, -0.01974899135529995, -0.09977701306343079, 0.021630067378282547, 0.0650845617055893, 0.046138372272253036, -0.059558428823947906, 0.0023658324498683214, 0.011357313953340054, -0.013604344800114632, -0.006791748106479645, 0.011529793031513691, -0.0348837710916996, -0.003681720234453678, -0.04499585181474686, 0.06349003314971924, 0.027084609493613243, -0.0036000022664666176, -0.041722264140844345, -0.10025820136070251, 0.0633532926440239, -0.021270012483000755, 0.04442639648914337, 0.06697771698236465, -0.035030264407396317, 0.06731385737657547, -0.035390015691518784, -0.021356113255023956, 0.13654659688472748, 0.06781379878520966, 0.059870343655347824, -0.06274130940437317, 0.07227220386266708, -0.039272621273994446, -0.038444843143224716, 0.011577277444303036, -5.696791305354054e-8, -0.09401950985193253, -0.09224782884120941, -0.040614984929561615, 0.03764558956027031, -0.007871095091104507, 0.012491913512349129, 0.009546472690999508, -0.02406027726829052, -0.06683897972106934, 0.011119372211396694, 0.03725307062268257, 0.06623391807079315, -0.026022737845778465, 0.0414435900747776, 0.013707584701478481, 0.033612657338380814, -0.019968869164586067, -0.08365330845117569, 0.013262941502034664, -0.04637076333165169, 0.015651417896151543, 0.009351729415357113, 0.06218405440449715, 0.05972042679786682, -0.08705206960439682, 0.012022349052131176, -0.04228271543979645, 0.041576750576496124, -0.10133837908506393, -0.025190653279423714, 0.0008455795468762517, -0.03997648134827614, -0.02089553326368332, -0.024163290858268738, -0.039924364537000656, -0.005437453277409077, -0.010979844257235527, -0.009943793527781963, -0.013033912517130375, 0.04332956671714783, 0.02931400202214718, -0.0016724811866879463, -0.029172338545322418, -0.053340423852205276, -0.03257787227630615, 0.041391074657440186, -0.014104662463068962, -0.05721842497587204, 0.026065640151500702, 0.004079844336956739, -0.033631160855293274, -0.002778482623398304, 0.02757522277534008, 0.022004850208759308, -0.023531649261713028, 0.06703495234251022, 0.08047639578580856, -0.05575375631451607, -0.0004934925236739218, 0.06604891270399094, -0.03411110118031502, 0.06641250848770142, 0.061192091554403305, -0.05537068098783493 ]
0.066578
### Run a model ``` ollama run gemma3 ``` ### Launch integrations ``` ollama launch ``` Configure and launch external applications to use Ollama models. This provides an interactive way to set up and start integrations with supported apps. #### Supported integrations - \*\*OpenCode\*\* - Open-source coding assistant - \*\*Claude Code\*\* - Anthropic's agentic coding tool - \*\*Codex\*\* - OpenAI's coding assistant - \*\*Droid\*\* - Factory's AI coding agent #### Examples Launch an integration interactively: ``` ollama launch ``` Launch a specific integration: ``` ollama launch claude ``` Launch with a specific model: ``` ollama launch claude --model qwen3-coder ``` Configure without launching: ``` ollama launch droid --config ``` #### Multiline input For multiline input, you can wrap text with `"""`: ``` >>> """Hello, ... world! ... """ I'm a basic program that prints the famous "Hello, world!" message to the console. ``` #### Multimodal models ``` ollama run gemma3 "What's in this image? /Users/jmorgan/Desktop/smile.png" ``` ### Generate embeddings ``` ollama run embeddinggemma "Hello world" ``` Output is a JSON array: ``` echo "Hello world" | ollama run nomic-embed-text ``` ### Download a model ``` ollama pull gemma3 ``` ### Remove a model ``` ollama rm gemma3 ``` ### List models ``` ollama ls ``` ### Sign in to Ollama ``` ollama signin ``` ### Sign out of Ollama ``` ollama signout ``` ### Create a customized model First, create a `Modelfile` ``` FROM gemma3 SYSTEM """You are a happy cat.""" ``` Then run `ollama create`: ``` ollama create -f Modelfile ``` ### List running models ``` ollama ps ``` ### Stop a running model ``` ollama stop gemma3 ``` ### Start Ollama ``` ollama serve ``` To view a list of environment variables that can be set run `ollama serve --help`
https://github.com/ollama/ollama/blob/main//docs/cli.mdx
main
ollama
[ -0.08234318345785141, -0.06286581605672836, -0.044265564531087875, -0.04176494851708412, -0.0562053844332695, -0.06023188680410385, -0.0465020090341568, 0.07974686473608017, -0.046845633536577225, -0.017451811581850052, 0.040055371820926666, -0.08036747574806213, 0.02370145544409752, 0.003964158706367016, 0.12142409384250641, 0.12723308801651, 0.0366479866206646, -0.02535044401884079, -0.05241529271006584, 0.016845276579260826, 0.097469262778759, 0.023397034034132957, 0.04111063852906227, -0.0024147259537130594, -0.021621190011501312, 0.00794603955000639, 0.04577512666583061, 0.03707021474838257, -0.0008370248251594603, -0.06092537194490433, 0.037738654762506485, 0.015671908855438232, 0.034514714032411575, 0.07226299494504929, 0.11810050159692764, 0.020490629598498344, -0.021000821143388748, -0.11805235594511032, -0.10409161448478699, -0.03154456615447998, -0.00007860752521082759, 0.03216009959578514, -0.04647708684206009, 0.011399636045098305, 0.03516378626227379, -0.11029841005802155, -0.0422854870557785, -0.037649109959602356, 0.03543202951550484, -0.05729414150118828, -0.0695389062166214, -0.060261402279138565, 0.008535905741155148, -0.024867374449968338, -0.00323093100450933, 0.05706598609685898, -0.00432041147723794, -0.025723125785589218, 0.04150322824716568, -0.010446865111589432, -0.0013370305532589555, 0.09672114253044128, -0.022722184658050537, 0.04562053084373474, -0.02266884595155716, -0.022981779649853706, -0.09493619203567505, 0.022392628714442253, 0.02034257911145687, -0.025874115526676178, -0.09652554243803024, -0.010344973765313625, 0.006627226714044809, -0.024760250002145767, -0.03570562228560448, -0.03523936867713928, 0.06252915412187576, 0.049710314720869064, -0.036020856350660324, -0.07321219146251678, 0.0027503471355885267, -0.0463569238781929, -0.03596840426325798, 0.09393083304166794, 0.039354246109724045, 0.1047637090086937, 0.023129649460315704, 0.038861844688653946, 0.11008425801992416, -0.007393339648842812, -0.03569808602333069, -0.04801977425813675, -0.01024307869374752, -0.035278093069791794, 0.05042083188891411, -0.027834031730890274, 0.0483914390206337, -0.06447383016347885, -0.04012215882539749, 0.08191879093647003, -0.02301657572388649, -0.060997359454631805, 0.04867740347981453, 0.027294784784317017, -0.07594849169254303, -0.0014138949336484075, 0.12923505902290344, 0.02569486014544964, -0.019992295652627945, 0.01289909053593874, -0.007370525971055031, -0.10379698872566223, 0.0705537497997284, -0.035028859972953796, 0.018399754539132118, 0.05915312469005585, -0.0038231706712394953, 0.0075201475992798805, 0.07336153090000153, 0.04076813906431198, 0.01674608141183853, -0.04649755358695984, -0.03949648514389992, 0.020180221647024155, 0.030729619786143303, 0.051579978317022324, -0.023062122985720634, 4.950707232477346e-33, 0.04800436645746231, -0.021361274644732475, 0.0013830779353156686, 0.04987679049372673, 0.02779325842857361, 0.010272663086652756, 0.001215552561916411, -0.026658883318305016, -0.09503182768821716, 0.024843955412507057, -0.05861208215355873, 0.0757954940199852, -0.0694374144077301, 0.10206787288188934, 0.0005611914675682783, -0.04070733115077019, 0.003811362897977233, 0.030924087390303612, 0.055223289877176285, 0.013466889038681984, 0.061285458505153656, -0.04750591143965721, -0.03875363990664482, -0.01858280599117279, 0.005176922772079706, 0.13885095715522766, 0.014949732460081577, -0.03783079981803894, 0.05703584477305412, 0.03228555992245674, 0.0410127229988575, -0.022085560485720634, -0.039258185774087906, 0.04520019143819809, -0.08570219576358795, -0.00048048089956864715, -0.10831759870052338, -0.07244128733873367, -0.03356848657131195, 0.0014130468480288982, -0.05461420863866806, 0.005036398768424988, -0.013545773923397064, -0.06845776736736298, 0.010876858606934547, -0.05957894027233124, -0.013818721286952496, 0.010166146792471409, 0.05116385221481323, -0.022472012788057327, 0.017452405765652657, 0.04946480691432953, -0.01567806676030159, -0.0647253766655922, 0.007723088841885328, -0.07497327774763107, -0.04384395852684975, -0.04302550479769707, 0.0658908411860466, -0.0028184656985104084, -0.12534385919570923, 0.0310733113437891, -0.03079763986170292, 0.011673308908939362, 0.043072719126939774, 0.039627961814403534, -0.018901042640209198, -0.027850909158587456, 0.03129124268889427, 0.07008454948663712, -0.09635910391807556, -0.06570234149694443, -0.01956716738641262, 0.06436225771903992, 0.008404158055782318, -0.008100196719169617, -0.05394979193806648, -0.05257603898644447, -0.034656405448913574, -0.01774771511554718, 0.0005741643253713846, -0.01320760790258646, -0.018651412799954414, 0.048855382949113846, 0.08538193255662918, -0.03414665535092354, 0.0026737204752862453, -0.012471554800868034, -0.04830431565642357, 0.07511254400014877, 0.007324656471610069, -0.05995282158255577, -0.04587871581315994, 0.025409584864974022, -0.013057418167591095, -7.334726958038043e-33, 0.02569475583732128, 0.018290188163518906, -0.025780903175473213, -0.041867248713970184, -0.006109372712671757, -0.051402147859334946, -0.018253268674016, 0.008435100317001343, 0.05084038898348808, -0.009209966287016869, -0.020549222826957703, 0.0008821393712423742, 0.06846961379051208, -0.009269436821341515, 0.06503119319677353, -0.00016246830637101084, -0.07475461065769196, -0.02076828107237816, 0.014413812197744846, 0.06070403382182121, -0.011491704732179642, 0.03101194277405739, -0.0352904237806797, 0.0029520352836698294, 0.01944381184875965, 0.003886935068294406, 0.021685894578695297, 0.04206494241952896, 0.0163780115544796, -0.051778413355350494, -0.030552303418517113, 0.05397184193134308, -0.08911992609500885, -0.0007671007188037038, -0.012536538764834404, 0.0634768083691597, -0.005182879976928234, 0.008124890737235546, -0.004079039674252272, 0.018684757873415947, 0.10922837257385254, -0.036868590861558914, -0.002098886528983712, -0.009505834430456161, -0.010444332845509052, 0.04827665165066719, -0.06473793089389801, -0.012803109362721443, -0.06985990703105927, -0.03864190727472305, -0.021798904985189438, -0.0029212606605142355, -0.04323692247271538, -0.07113117724657059, 0.011756434105336666, 0.015262453816831112, 0.09863743185997009, -0.04838458076119423, -0.05469481274485588, 0.0009280609665438533, 0.058606065809726715, -0.09885391592979431, 0.05346585810184479, -0.028478456661105156, -0.05937563255429268, -0.0895172506570816, -0.016499556601047516, 0.044669296592473984, -0.04890811815857887, -0.058879029005765915, -0.011031177826225758, -0.06344559043645859, -0.0037993963342159986, 0.027350254356861115, -0.012668131850659847, 0.0012023530434817076, -0.13775603473186493, -0.0482332743704319, 0.03729873150587082, 0.011951177380979061, -0.04146995022892952, 0.008305277675390244, 0.12334547191858292, 0.025838814675807953, -0.029170669615268707, 0.02930477261543274, 0.022629089653491974, 0.10088597238063812, 0.016852296888828278, 0.005620747804641724, -0.041127417236566544, 0.059579942375421524, 0.08568128943443298, 0.1496294140815735, -0.07346118241548538, -5.128668689735605e-8, 0.005559971090406179, -0.05050137639045715, 0.011002243496477604, -0.029428616166114807, -0.06530371308326721, -0.025331540033221245, -0.01983540877699852, -0.009706147946417332, 0.062004223465919495, 0.0046301186084747314, 0.06011774763464928, 0.03974475339055061, -0.0673939511179924, 0.055303268134593964, -0.004822900053113699, 0.12112710624933243, 0.019795836880803108, 0.034326184540987015, 0.03090769611299038, -0.08729015290737152, 0.04579424858093262, 0.0364537388086319, -0.03487413004040718, 0.023417195305228233, 0.03928826376795769, -0.04838262498378754, -0.07622148841619492, 0.05650165304541588, -0.053820766508579254, 0.020087387412786484, 0.09034707397222519, 0.014280853793025017, 0.07305511832237244, -0.022196326404809952, -0.07731136679649353, -0.008103259839117527, 0.07623148709535599, -0.052483975887298584, 0.0027557373978197575, -0.11365288496017456, 0.07677070796489716, 0.03619522973895073, -0.04606976360082626, -0.08670806139707565, 0.04538218677043915, 0.007273015566170216, 0.05280182138085365, -0.12153860926628113, -0.005682903807610273, -0.004683045204728842, -0.06639356911182404, -0.01037538331001997, -0.018255993723869324, -0.003818823955953121, 0.06861796230077744, -0.01377430371940136, -0.04572737589478493, -0.06658744066953659, -0.008194231428205967, 0.016519950702786446, -0.01734945736825466, -0.024892432615160942, 0.06757854670286179, -0.015048062428832054 ]
0.180969
## Install To install Ollama, run the following command: ```shell curl -fsSL https://ollama.com/install.sh | sh ``` ## Manual install If you are upgrading from a prior version, you should remove the old libraries with `sudo rm -rf /usr/lib/ollama` first. Download and extract the package: ```shell curl -fsSL https://ollama.com/download/ollama-linux-amd64.tar.zst \ | sudo tar x -C /usr ``` Start Ollama: ```shell ollama serve ``` In another terminal, verify that Ollama is running: ```shell ollama -v ``` ### AMD GPU install If you have an AMD GPU, also download and extract the additional ROCm package: ```shell curl -fsSL https://ollama.com/download/ollama-linux-amd64-rocm.tar.zst \ | sudo tar x -C /usr ``` ### ARM64 install Download and extract the ARM64-specific package: ```shell curl -fsSL https://ollama.com/download/ollama-linux-arm64.tar.zst \ | sudo tar x -C /usr ``` ### Adding Ollama as a startup service (recommended) Create a user and group for Ollama: ```shell sudo useradd -r -s /bin/false -U -m -d /usr/share/ollama ollama sudo usermod -a -G ollama $(whoami) ``` Create a service file in `/etc/systemd/system/ollama.service`: ```ini [Unit] Description=Ollama Service After=network-online.target [Service] ExecStart=/usr/bin/ollama serve User=ollama Group=ollama Restart=always RestartSec=3 Environment="PATH=$PATH" [Install] WantedBy=multi-user.target ``` Then start the service: ```shell sudo systemctl daemon-reload sudo systemctl enable ollama ``` ### Install CUDA drivers (optional) [Download and install](https://developer.nvidia.com/cuda-downloads) CUDA. Verify that the drivers are installed by running the following command, which should print details about your GPU: ```shell nvidia-smi ``` ### Install AMD ROCm drivers (optional) [Download and Install](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/tutorial/quick-start.html) ROCm v6. ### Start Ollama Start Ollama and verify it is running: ```shell sudo systemctl start ollama sudo systemctl status ollama ``` While AMD has contributed the `amdgpu` driver upstream to the official linux kernel source, the version is older and may not support all ROCm features. We recommend you install the latest driver from https://www.amd.com/en/support/linux-drivers for best support of your Radeon GPU. ## Customizing To customize the installation of Ollama, you can edit the systemd service file or the environment variables by running: ```shell sudo systemctl edit ollama ``` Alternatively, create an override file manually in `/etc/systemd/system/ollama.service.d/override.conf`: ```ini [Service] Environment="OLLAMA\_DEBUG=1" ``` ## Updating Update Ollama by running the install script again: ```shell curl -fsSL https://ollama.com/install.sh | sh ``` Or by re-downloading Ollama: ```shell curl -fsSL https://ollama.com/download/ollama-linux-amd64.tar.zst \ | sudo tar x -C /usr ``` ## Installing specific versions Use `OLLAMA\_VERSION` environment variable with the install script to install a specific version of Ollama, including pre-releases. You can find the version numbers in the [releases page](https://github.com/ollama/ollama/releases). For example: ```shell curl -fsSL https://ollama.com/install.sh | OLLAMA\_VERSION=0.5.7 sh ``` ## Viewing logs To view logs of Ollama running as a startup service, run: ```shell journalctl -e -u ollama ``` ## Uninstall Remove the ollama service: ```shell sudo systemctl stop ollama sudo systemctl disable ollama sudo rm /etc/systemd/system/ollama.service ``` Remove ollama libraries from your lib directory (either `/usr/local/lib`, `/usr/lib`, or `/lib`): ```shell sudo rm -r $(which ollama | tr 'bin' 'lib') ``` Remove the ollama binary from your bin directory (either `/usr/local/bin`, `/usr/bin`, or `/bin`): ```shell sudo rm $(which ollama) ``` Remove the downloaded models and Ollama service user and group: ```shell sudo userdel ollama sudo groupdel ollama sudo rm -r /usr/share/ollama ```
https://github.com/ollama/ollama/blob/main//docs/linux.mdx
main
ollama
[ -0.04092478007078171, 0.006369300186634064, -0.037535659968853, 0.03426586836576462, 0.0032200762070715427, -0.12913955748081207, -0.06516725569963455, 0.027653377503156662, -0.012914850376546383, -0.054279450327157974, 0.02890542335808277, -0.009943856857717037, -0.07885291427373886, 0.028845831751823425, 0.06493934243917465, 0.11215616017580032, 0.07898742705583572, -0.06363334506750107, -0.009740606881678104, 0.03281833976507187, 0.039587896317243576, 0.0002934990916401148, 0.04875750094652176, 0.004163786303251982, -0.025867322459816933, -0.003821577876806259, -0.010167466476559639, 0.015289925038814545, 0.008340105414390564, -0.0505712628364563, 0.06779935210943222, 0.000050840906624216586, 0.020431745797395706, -0.04704832285642624, 0.06227833405137062, 0.00245893863029778, 0.009388342499732971, -0.10657689720392227, -0.10232480615377426, -0.007956384681165218, 0.02824060060083866, 0.06013992801308632, -0.032460395246744156, -0.0633765384554863, -0.0014293512795120478, -0.04485619440674782, 0.0784984678030014, -0.048135776072740555, 0.03622104600071907, 0.018175609409809113, -0.05164641514420509, -0.054502882063388824, -0.020385555922985077, -0.010723361745476723, 0.041758112609386444, 0.07053704559803009, -0.01366746611893177, -0.0758293941617012, 0.02103991061449051, 0.06261679530143738, -0.01205010898411274, 0.02703712321817875, -0.01657770201563835, 0.035971108824014664, -0.01666276343166828, -0.05341489985585213, 0.0023782760836184025, -0.038689352571964264, -0.006227008067071438, -0.00301772216334939, -0.0007936822948977351, -0.001252446323633194, 0.025851242244243622, 0.008326099254190922, -0.006013008300215006, -0.023997526615858078, 0.0982552096247673, -0.00789082981646061, 0.007355107925832272, 0.029976457357406616, -0.08425638824701309, -0.04205470159649849, 0.030091922730207443, -0.0383450984954834, 0.10712501406669617, 0.04344355687499046, 0.010797897353768349, 0.009535425342619419, 0.07881636172533035, -0.014219139702618122, 0.0033710601273924112, 0.0040514362044632435, -0.02450304850935936, -0.03852858394384384, 0.0530887246131897, -0.07427305728197098, 0.04500381648540497, 0.017050623893737793, -0.03649573400616646, 0.11194150149822235, -0.07622777670621872, -0.06457528471946716, 0.0169856995344162, 0.07896478474140167, -0.11884951591491699, 0.06731927394866943, 0.06517204642295837, 0.10518387705087662, -0.08414941281080246, 0.0633610412478447, 0.054106876254081726, -0.14534330368041992, 0.09929651021957397, -0.0022665271535515785, 0.00438386807218194, 0.05497414618730545, -0.0287446528673172, 0.00883600115776062, -0.014319424517452717, 0.027368221431970596, -0.011629425920546055, -0.07101842015981674, 0.08035474270582199, 0.044666778296232224, -0.02025594562292099, 0.07330735772848129, 0.01005548145622015, 2.5310099676722466e-33, 0.08065959066152573, 0.01905902661383152, -0.08299782127141953, 0.039061516523361206, -0.03101000003516674, 0.064215749502182, 0.05464977025985718, -0.052019380033016205, -0.023667169734835625, -0.0014398304047062993, -0.01835581287741661, 0.07233734428882599, -0.021199442446231842, 0.05275385081768036, 0.011280826292932034, -0.04829652979969978, 0.06037790700793266, 0.02848067693412304, 0.013455113396048546, -0.0029541885014623404, 0.09559828042984009, 0.048512641340494156, 0.0337214395403862, -0.022894421592354774, -0.030020613223314285, 0.03249961510300636, -0.030452197417616844, -0.009008978493511677, 0.026733413338661194, 0.017166176810860634, 0.15018688142299652, -0.029029710218310356, -0.057524558156728745, -0.0110470587387681, 0.015608488582074642, 0.03200497478246689, -0.08495170623064041, -0.021699899807572365, -0.07270293682813644, -0.012558775022625923, -0.004607263952493668, 0.06099258363246918, -0.006203757133334875, -0.03788483515381813, 0.03243426978588104, 0.019678976386785507, -0.09580263495445251, 0.02041899971663952, 0.09207846224308014, -0.0223153717815876, -0.06642816960811615, 0.014414433389902115, -0.04124141484498978, 0.01739887334406376, 0.013735214248299599, -0.018231485038995743, -0.01446470431983471, -0.04059293121099472, 0.14492183923721313, -0.020001394674181938, -0.05437691882252693, 0.012853318825364113, -0.028564784675836563, -0.0389881357550621, 0.018698522821068764, -0.055374421179294586, -0.021017085760831833, 0.05023423582315445, -0.05015163868665695, 0.01744001917541027, -0.0331849679350853, -0.04879533872008324, 0.006447124294936657, 0.14754913747310638, 0.04405641928315163, -0.011753056198358536, 0.010036349296569824, -0.03107953816652298, -0.052090730518102646, -0.021816886961460114, 0.03254183754324913, 0.02407945692539215, 0.029341060668230057, -0.04615989699959755, 0.031722258776426315, -0.024341387674212456, 0.013658680953085423, 0.06468547880649567, 0.00036555423866957426, 0.05275541543960571, 0.03594232350587845, -0.048334818333387375, 0.017961811274290085, 0.048826221376657486, -0.0579952597618103, -3.902054599580537e-33, 0.0013834387063980103, 0.000973376096226275, 0.05509693920612335, -0.0309284720569849, -0.0031224435660988092, 0.04895821958780289, -0.016124023124575615, -0.029809245839715004, -0.02051747962832451, -0.0562543049454689, -0.0025550625286996365, 0.03418876230716705, 0.08684245496988297, 0.052425164729356766, 0.10107314586639404, -0.04444067180156708, -0.08891355246305466, -0.017547056078910828, -0.013518206775188446, 0.0009306090651080012, -0.054830923676490784, 0.04891536012291908, 0.014989555813372135, 0.016287585720419884, 0.014333748258650303, -0.011948212049901485, 0.050544027239084244, -0.056216657161712646, -0.01683911494910717, 0.01902994140982628, -0.04211091622710228, 0.09935042262077332, -0.07451467216014862, 0.030768584460020065, -0.026393549516797066, 0.0891609787940979, 0.025741690769791603, -0.05022343993186951, -0.08025417476892471, 0.04061783850193024, 0.027797404676675797, 0.0005284026265144348, 0.0030591702088713646, -0.0876578688621521, -0.0924907997250557, 0.03158418461680412, 0.015384707599878311, 0.0194501131772995, -0.05323993042111397, -0.014911845326423645, 0.010435514152050018, -0.06191391870379448, 0.014991221949458122, -0.02558823861181736, 0.0605376772582531, -0.030060378834605217, 0.04366292804479599, -0.0014452767791226506, -0.0942009687423706, -0.017852872610092163, 0.07287033647298813, -0.022757450118660927, 0.04923662915825844, -0.09284257143735886, -0.04991038888692856, -0.042641352862119675, 0.006938079372048378, 0.012322265654802322, -0.03664301335811615, 0.001325154327787459, -0.09404394030570984, 0.010379265993833542, 0.03552360460162163, -0.014926191419363022, 0.0781330019235611, 0.02367307059466839, -0.14729838073253632, -0.021387886255979538, 0.037911564111709595, -0.016031278297305107, -0.02813778817653656, -0.04865448921918869, 0.12289988249540329, -0.002405581995844841, 0.03680603951215744, -0.012434636242687702, 0.08267621695995331, -0.041251927614212036, 0.07010260969400406, -0.04224684089422226, -0.025222403928637505, -0.024461735039949417, 0.01932983286678791, 0.07492140680551529, 0.07074420154094696, -4.622162208534064e-8, 0.011776232160627842, -0.026909898966550827, -0.015454907901585102, 0.013575742021203041, 0.04970916733145714, -0.01609622873365879, 0.017345033586025238, -0.03286052867770195, -0.05562103912234306, -0.007567425258457661, 0.06491505354642868, 0.08147914707660675, -0.01318097673356533, -0.02696838602423668, -0.06835279613733292, 0.05145848169922829, -0.09985047578811646, 0.02604079060256481, 0.031966254115104675, -0.07139170914888382, 0.0232855211943388, -0.011508195661008358, 0.02148595079779625, -0.03283495455980301, 0.006933136843144894, -0.09286311268806458, -0.03695087879896164, 0.03175894543528557, -0.044167980551719666, -0.08870568126440048, -0.012276861816644669, -0.02288351207971573, 0.06298007071018219, -0.07658874988555908, 0.022949282079935074, -0.04710035398602486, 0.0491948276758194, 0.04861391708254814, -0.002563752932474017, -0.04606376215815544, 0.0412517786026001, 0.05807293951511383, 0.03861856833100319, -0.05294640362262726, 0.010366441681981087, 0.0450332909822464, 0.020041663199663162, -0.03156481683254242, -0.13399183750152588, -0.002004916314035654, 0.02130134217441082, -0.05710680037736893, -0.001152445562183857, 0.023784127086400986, -0.02311522513628006, -0.12719042599201202, -0.11702505499124527, -0.014666293747723103, -0.06157245859503746, -0.04000040888786316, 0.060070984065532684, -0.09396564215421677, 0.07917040586471558, -0.04360231012105942 ]
0.031845
## Nvidia Ollama supports Nvidia GPUs with compute capability 5.0+ and driver version 531 and newer. Check your compute compatibility to see if your card is supported: [https://developer.nvidia.com/cuda-gpus](https://developer.nvidia.com/cuda-gpus) | Compute Capability | Family | Cards | | ------------------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | 12.1 | NVIDIA | `GB10 (DGX Spark)` | | 12.0 | GeForce RTX 50xx | `RTX 5060` `RTX 5060 Ti` `RTX 5070` `RTX 5070 Ti` `RTX 5080` `RTX 5090` | | | NVIDIA Professional | `RTX PRO 4000 Blackwell` `RTX PRO 4500 Blackwell` `RTX PRO 5000 Blackwell` `RTX PRO 6000 Blackwell` | | 9.0 | NVIDIA | `H200` `H100` | | 8.9 | GeForce RTX 40xx | `RTX 4090` `RTX 4080 SUPER` `RTX 4080` `RTX 4070 Ti SUPER` `RTX 4070 Ti` `RTX 4070 SUPER` `RTX 4070` `RTX 4060 Ti` `RTX 4060` | | | NVIDIA Professional | `L4` `L40` `RTX 6000` | | 8.6 | GeForce RTX 30xx | `RTX 3090 Ti` `RTX 3090` `RTX 3080 Ti` `RTX 3080` `RTX 3070 Ti` `RTX 3070` `RTX 3060 Ti` `RTX 3060` `RTX 3050 Ti` `RTX 3050` | | | NVIDIA Professional | `A40` `RTX A6000` `RTX A5000` `RTX A4000` `RTX A3000` `RTX A2000` `A10` `A16` `A2` | | 8.0 | NVIDIA | `A100` `A30` | | 7.5 | GeForce GTX/RTX | `GTX 1650 Ti` `TITAN RTX` `RTX 2080 Ti` `RTX 2080` `RTX 2070` `RTX 2060` | | | NVIDIA Professional | `T4` `RTX 5000` `RTX 4000` `RTX 3000` `T2000` `T1200` `T1000` `T600` `T500` | | | Quadro | `RTX 8000` `RTX 6000` `RTX 5000` `RTX 4000` | | 7.0 | NVIDIA | `TITAN V` `V100` `Quadro GV100` | | 6.1 | NVIDIA TITAN | `TITAN Xp` `TITAN X` | | | GeForce GTX | `GTX 1080 Ti` `GTX 1080` `GTX 1070 Ti` `GTX 1070` `GTX 1060` `GTX 1050 Ti` `GTX 1050` | | | Quadro | `P6000` `P5200` `P4200` `P3200` `P5000` `P4000` `P3000` `P2200` `P2000` `P1000` `P620` `P600` `P500` `P520` | | | Tesla | `P40` `P4` | | 6.0 | NVIDIA | `Tesla P100` `Quadro GP100` | | 5.2 | GeForce GTX | `GTX TITAN X` `GTX 980 Ti` `GTX 980` `GTX 970` `GTX 960` `GTX 950` | | | Quadro | `M6000 24GB` `M6000` `M5000` `M5500M` `M4000` `M2200` `M2000` `M620` | | | Tesla | `M60` `M40` | | 5.0 | GeForce GTX | `GTX 750 Ti` `GTX 750` `NVS 810` | | | Quadro | `K2200` `K1200` `K620` `M1200` `M520` `M5000M` `M4000M` `M3000M` `M2000M` `M1000M` `K620M` `M600M` `M500M` | For building locally to support older GPUs, see [developer](./development#linux-cuda-nvidia) ### GPU Selection If you have multiple NVIDIA GPUs in your system and want to limit Ollama to use a subset, you can set `CUDA\_VISIBLE\_DEVICES` to a comma separated list of GPUs. Numeric IDs may be used, however ordering may vary, so UUIDs are more reliable. You can discover the UUID of your GPUs by running `nvidia-smi -L` If you want to ignore the GPUs and force CPU usage, use an invalid GPU ID (e.g., "-1") ### Linux Suspend Resume On linux, after a suspend/resume cycle, sometimes Ollama will fail to discover your NVIDIA GPU, and fallback to running on the CPU. You can workaround this driver bug by reloading the NVIDIA UVM driver with `sudo rmmod nvidia\_uvm && sudo modprobe nvidia\_uvm` ## AMD Radeon Ollama supports the following AMD GPUs via the ROCm library: > \*\*NOTE:\*\* > Additional AMD GPU support is provided by the Vulkan Library - see below. ### Linux Support | Family | Cards and accelerators | | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | AMD Radeon RX | `7900 XTX` `7900 XT` `7900 GRE`
https://github.com/ollama/ollama/blob/main//docs/gpu.mdx
main
ollama
[ -0.06072494760155678, -0.03281419724225998, -0.008617082610726357, 0.010285579599440098, -0.0715637132525444, -0.07295554131269455, -0.09122493863105774, -0.05798002704977989, -0.06069985404610634, -0.05849428474903107, -0.01377780269831419, -0.06710223853588104, -0.06176045164465904, 0.027107909321784973, 0.01928708702325821, 0.04557972773909569, 0.05048958584666252, -0.1252216398715973, -0.023931454867124557, 0.011023660190403461, 0.05721917003393173, 0.007281717844307423, -0.006447019521147013, -0.056322723627090454, 0.009318426251411438, -0.06507913768291473, -0.01719946414232254, -0.024807123467326164, 0.006043912842869759, -0.019273929297924042, 0.032936252653598785, 0.026584181934595108, -0.030682014301419258, 0.029201490804553032, 0.06855599582195282, -0.03973771631717682, -0.043030235916376114, -0.06895147264003754, -0.047073617577552795, -0.0638442263007164, 0.05127687007188797, -0.00867889728397131, -0.044407282024621964, -0.012155492790043354, 0.08036888390779495, -0.053150586783885956, 0.016747869551181793, 0.02322990819811821, 0.022838905453681946, -0.015680359676480293, -0.04812835901975632, -0.06257519870996475, 0.00037211645394563675, 0.00010953228047583252, -0.05209328606724739, 0.0015768230659887195, -0.03528790920972824, -0.14604879915714264, 0.04175557568669319, -0.03824358433485031, 0.04603260010480881, -0.060142140835523605, -0.01655036397278309, -0.018536236137151718, -0.03575616329908371, 0.02670574188232422, 0.009819231927394867, -0.1317465901374817, -0.05466990917921066, -0.03177464008331299, 0.033519160002470016, 0.05953871086239815, 0.03262604400515556, -0.00010128704161616042, -0.044938452541828156, 0.012597668915987015, 0.010427296161651611, -0.024214303120970726, 0.08405939489603043, -0.06870092451572418, -0.03847770765423775, 0.041218940168619156, 0.0032025824766606092, -0.02987767942249775, 0.025650156661868095, 0.004227021709084511, -0.029808685183525085, 0.09062515199184418, 0.081966333091259, -0.1384870857000351, -0.00178635457996279, 0.00788162648677826, 0.0084920609369874, -0.03277520090341568, 0.010435525327920914, -0.05386899411678314, 0.010874993167817593, 0.001100166467949748, -0.0353485532104969, 0.035891342908144, -0.03708576783537865, -0.03349073603749275, 0.020776713266968727, 0.06917770951986313, -0.06497015058994293, 0.1245831623673439, 0.015233293175697327, 0.09269913285970688, -0.1294557899236679, -0.006406224332749844, 0.03135319799184799, -0.0067835599184036255, -0.004047372844070196, 0.026999304071068764, -0.009438371285796165, 0.03748200461268425, -0.09670152515172958, -0.01627196930348873, 0.021338505670428276, -0.008397405035793781, -0.055893976241350174, -0.07233978062868118, -0.0034537403844296932, -0.04039294272661209, -0.047135185450315475, 0.01780306175351143, -0.04675678163766861, 9.592616507097492e-33, 0.01933196187019348, -0.06683038920164108, 0.021618127822875977, -0.05881141126155853, 0.034000054001808167, 0.07130678743124008, -0.025725534185767174, -0.08067604154348373, -0.04418168589472771, -0.013700783252716064, -0.07441818714141846, 0.004127829801291227, 0.014500455930829048, 0.0538022555410862, -0.030171513557434082, 0.04015173390507698, -0.00668182922527194, 0.03539681434631348, 0.03637179732322693, 0.07142958045005798, 0.05842620134353638, 0.021557405591011047, -0.020850462839007378, -0.046512212604284286, -0.03477736562490463, 0.09659305959939957, -0.044165439903736115, 0.007960008457303047, 0.03411099687218666, 0.01952189952135086, 0.0859113410115242, -0.08214232325553894, -0.010326090268790722, -0.0981149673461914, 0.04607369378209114, 0.016241513192653656, -0.01976836286485195, 0.014427692629396915, -0.008487231098115444, 0.06563709676265717, 0.00885829422622919, 0.057104337960481644, -0.003180387197062373, -0.09785179793834686, -0.055949851870536804, 0.0440368615090847, -0.014204403385519981, 0.02997424080967903, 0.0015683125238865614, 0.06166088208556175, -0.08232719451189041, 0.013994171284139156, -0.11415034532546997, -0.0799669548869133, 0.06950254738330841, -0.03713701292872429, -0.011677658185362816, 0.06403374671936035, 0.08197619765996933, 0.06477810442447662, -0.08447440713644028, -0.10255882143974304, -0.09921616315841675, -0.09683869779109955, -0.05984868109226227, 0.009791764430701733, 0.013470008969306946, 0.059961024671792984, -0.048785123974084854, 0.0007365635829046369, -0.015901809558272362, 0.030875474214553833, 0.03288658335804939, 0.08052266389131546, 0.11721037328243256, -0.03472469002008438, 0.03247005492448807, -0.05796173959970474, -0.09509129077196121, 0.02381465770304203, 0.0036018656101077795, 0.037185072898864746, 0.007566879503428936, 0.032137129455804825, -0.03256390616297722, 0.024846870452165604, -0.00747905857861042, 0.07676519453525543, -0.04133615642786026, -0.023106763139367104, -0.019595056772232056, 0.010173952206969261, 0.07679521292448044, 0.023099452257156372, 0.0003994691069237888, -1.5110320133616107e-32, -0.03533884510397911, 0.015789533033967018, 0.0006489584920927882, 0.018770819529891014, 0.05680166557431221, 0.025653107091784477, 0.010712256655097008, -0.042508065700531006, -0.0064881653524935246, -0.08157186955213547, 0.06915222853422165, 0.08479870855808258, 0.027649903669953346, 0.08179889619350433, 0.04686864838004112, -0.062342479825019836, -0.10609058290719986, -0.027734030038118362, -0.020532099530100822, -0.02368464134633541, -0.04091537371277809, 0.045497916638851166, -0.024002164602279663, 0.0054555898532271385, 0.05926087498664856, -0.013576203025877476, 0.02433169260621071, -0.03258471190929413, 0.05350955203175545, -0.02431885339319706, -0.05940798670053482, 0.036055341362953186, -0.06351090967655182, 0.03224628418684006, 0.054350048303604126, -0.04427118971943855, 0.048068344593048096, -0.05727434530854225, 0.0011260509490966797, -0.008878462947905064, 0.014818811789155006, 0.05060504749417305, 0.037462230771780014, -0.027819624170660973, -0.0462898313999176, 0.07468463480472565, 0.027948956936597824, 0.0131340017542243, -0.016062945127487183, -0.02056184597313404, -0.006900405511260033, 0.0263935886323452, -0.039918024092912674, 0.008022666908800602, 0.0478125661611557, -0.007844609208405018, 0.12568244338035583, -0.0028842641040682793, -0.10396850109100342, -0.04893610626459122, -0.022840145975351334, -0.04511058330535889, 0.06409043073654175, -0.028683340176939964, 0.05023171380162239, -0.03768777847290039, -0.0658993273973465, 0.11761265993118286, 0.016210203990340233, -0.034641657024621964, -0.14214769005775452, -0.0694056823849678, 0.04791625961661339, -0.053363364189863205, -0.013051008805632591, 0.060116853564977646, -0.07763919234275818, -0.04556288197636604, 0.10351394861936569, 0.009579398669302464, 0.005342421121895313, -0.0903843492269516, 0.02681061439216137, -0.0035454800818115473, 0.08384563028812408, -0.00343611859716475, 0.07503809034824371, -0.08925637602806091, 0.06426446884870529, -0.011892086826264858, -0.055488221347332, -0.03901660814881325, -0.03684103116393089, 0.033022474497556686, -0.050241366028785706, -5.5303360113612143e-8, 0.050687894225120544, 0.0036240958143025637, -0.04163341969251633, 0.01723785325884819, -0.009862259030342102, -0.024531684815883636, -0.004420517012476921, -0.03768187016248703, -0.001696450519375503, 0.031156722456216812, 0.03904055058956146, -0.02253640629351139, 0.04226856306195259, -0.005447010975331068, -0.050608061254024506, 0.03421156853437424, -0.036390408873558044, -0.032595064491033554, 0.02276490442454815, -0.058450594544410706, -0.05069021135568619, -0.07066048681735992, -0.027334947139024734, -0.007071943022310734, -0.04105384647846222, -0.09222322702407837, -0.0010576630011200905, -0.0016677321400493383, -0.01233762875199318, -0.10305919498205185, -0.0461864210665226, 0.02613891288638115, 0.03477989882230759, -0.021204326301813126, 0.07220175117254257, -0.00834901724010706, 0.07114798575639725, 0.07688112556934357, 0.11172468215227127, -0.001237095333635807, 0.04426007717847824, 0.011801067739725113, 0.020255988463759422, -0.04197795316576958, 0.03968467563390732, 0.021462781354784966, 0.03579004481434822, -0.07630804181098938, -0.0681394562125206, 0.05947330594062805, -0.07734277099370956, -0.007338569965213537, -0.039474353194236755, -0.0031501254998147488, -0.008022136986255646, -0.04624130204319954, -0.0981716513633728, -0.029727360233664513, 0.004889019764959812, 0.039119698107242584, 0.08919002115726471, -0.0605274960398674, 0.034382954239845276, 0.003865484381094575 ]
0.013952
the following AMD GPUs via the ROCm library: > \*\*NOTE:\*\* > Additional AMD GPU support is provided by the Vulkan Library - see below. ### Linux Support | Family | Cards and accelerators | | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | AMD Radeon RX | `7900 XTX` `7900 XT` `7900 GRE` `7800 XT` `7700 XT` `7600 XT` `7600` `6950 XT` `6900 XTX` `6900XT` `6800 XT` `6800` `Vega 64` | | AMD Radeon PRO | `W7900` `W7800` `W7700` `W7600` `W7500` `W6900X` `W6800X Duo` `W6800X` `W6800` `V620` `V420` `V340` `V320` `Vega II Duo` `Vega II` `SSG` | | AMD Instinct | `MI300X` `MI300A` `MI300` `MI250X` `MI250` `MI210` `MI200` `MI100` `MI60` | ### Windows Support With ROCm v6.1, the following GPUs are supported on Windows. | Family | Cards and accelerators | | -------------- | -------------------------------------------------------------------------------------------------------------------- | | AMD Radeon RX | `7900 XTX` `7900 XT` `7900 GRE` `7800 XT` `7700 XT` `7600 XT` `7600` `6950 XT` `6900 XTX` `6900XT` `6800 XT` `6800` | | AMD Radeon PRO | `W7900` `W7800` `W7700` `W7600` `W7500` `W6900X` `W6800X Duo` `W6800X` `W6800` `V620` | ### Overrides on Linux Ollama leverages the AMD ROCm library, which does not support all AMD GPUs. In some cases you can force the system to try to use a similar LLVM target that is close. For example The Radeon RX 5400 is `gfx1034` (also known as 10.3.4) however, ROCm does not currently support this target. The closest support is `gfx1030`. You can use the environment variable `HSA\_OVERRIDE\_GFX\_VERSION` with `x.y.z` syntax. So for example, to force the system to run on the RX 5400, you would set `HSA\_OVERRIDE\_GFX\_VERSION="10.3.0"` as an environment variable for the server. If you have an unsupported AMD GPU you can experiment using the list of supported types below. If you have multiple GPUs with different GFX versions, append the numeric device number to the environment variable to set them individually. For example, `HSA\_OVERRIDE\_GFX\_VERSION\_0=10.3.0` and `HSA\_OVERRIDE\_GFX\_VERSION\_1=11.0.0` At this time, the known supported GPU types on linux are the following LLVM Targets. This table shows some example GPUs that map to these LLVM targets: | \*\*LLVM Target\*\* | \*\*An Example GPU\*\* | |-----------------|---------------------| | gfx908 | Radeon Instinct MI100 | | gfx90a | Radeon Instinct MI210 | | gfx940 | Radeon Instinct MI300 | | gfx941 | | | gfx942 | | | gfx1030 | Radeon PRO V620 | | gfx1100 | Radeon PRO W7900 | | gfx1101 | Radeon PRO W7700 | | gfx1102 | Radeon RX 7600 | AMD is working on enhancing ROCm v6 to broaden support for families of GPUs in a future release which should increase support for more GPUs. Reach out on [Discord](https://discord.gg/ollama) or file an [issue](https://github.com/ollama/ollama/issues) for additional help. ### GPU Selection If you have multiple AMD GPUs in your system and want to limit Ollama to use a subset, you can set `ROCR\_VISIBLE\_DEVICES` to a comma separated list of GPUs. You can see the list of devices with `rocminfo`. If you want to ignore the GPUs and force CPU usage, use an invalid GPU ID (e.g., "-1"). When available, use the `Uuid` to uniquely identify the device instead of numeric value. ### Container Permission In some Linux distributions, SELinux can prevent containers from accessing the AMD GPU devices. On the host system you can run `sudo setsebool container\_use\_devices=1` to allow containers to use devices. ## Metal (Apple GPUs) Ollama supports GPU acceleration on Apple devices via the Metal API. ## Vulkan GPU Support > \*\*NOTE:\*\* > Vulkan is currently an Experimental feature. To enable, you must set OLLAMA\_VULKAN=1 for the Ollama server as described in the [FAQ](faq#how-do-i-configure-ollama-server) Additional GPU support on Windows and
https://github.com/ollama/ollama/blob/main//docs/gpu.mdx
main
ollama
[ -0.009242328815162182, -0.04292284697294235, -0.0710827112197876, 0.028188740834593773, 0.04676514118909836, -0.0890885442495346, -0.08493079990148544, 0.08312798291444778, -0.054338548332452774, -0.07001113146543503, -0.006145707331597805, -0.02430565096437931, -0.0653025358915329, 0.05644042417407036, -0.07974354922771454, 0.05052684620022774, 0.014271813444793224, -0.02395354025065899, -0.01276788953691721, 0.005027974955737591, -0.008649071678519249, -0.010363221168518066, -0.04551979899406433, 0.00345995812676847, -0.028743069618940353, -0.0018446159083396196, 0.07197435945272446, -0.06212972104549408, 0.035349950194358826, 0.030207855626940727, 0.05797163024544716, 0.005239628255367279, -0.02103492058813572, 0.004543687216937542, -0.05176420509815216, -0.0075135258957743645, -0.003594021312892437, -0.10401000827550888, -0.0858684629201889, -0.0338096022605896, -0.023560207337141037, 0.012563836760818958, 0.013289262540638447, 0.02866813726723194, 0.05152256041765213, -0.003559770295396447, 0.0013001190964132547, -0.0706678181886673, -0.002366201253607869, -0.05324222892522812, 0.0029370561242103577, -0.026810677722096443, -0.06518347561359406, 0.02627338469028473, -0.07228956371545792, -0.02124013565480709, -0.10522562265396118, -0.15316176414489746, 0.09417662769556046, 0.001388734090141952, 0.04910147562623024, -0.04070381075143814, 0.03789053484797478, 0.07174485176801682, -0.00048596516717225313, 0.047354165464639664, -0.011971119791269302, -0.08966509997844696, 0.002223854186013341, -0.02909856103360653, 0.04724939167499542, 0.03538244217634201, 0.015445445664227009, -0.06583341211080551, -0.01315377652645111, 0.06337688118219376, 0.007968633435666561, -0.012596041895449162, 0.0442487969994545, -0.0598725862801075, -0.026514964178204536, -0.016045857220888138, 0.06524160504341125, -0.08051081001758575, 0.09515979886054993, 0.010060393251478672, 0.032158978283405304, 0.00884474627673626, 0.0136862238869071, -0.06682972609996796, 0.018585972487926483, 0.0035351573023945093, 0.02311948500573635, -0.01629737764596939, -0.030235035344958305, -0.04616237059235573, 0.05716109275817871, -0.0012547895312309265, -0.06967683881521225, 0.0470840185880661, -0.06839191168546677, -0.02045365981757641, -0.0321587435901165, 0.09912411123514175, -0.06055476889014244, 0.0697627142071724, -0.04298832267522812, 0.07626333832740784, -0.11979735642671585, 0.015536939725279808, 0.041954752057790756, 0.1034417450428009, -0.014875897206366062, -0.04113321751356125, 0.017221974208950996, 0.08131137490272522, -0.05934910848736763, -0.01334789115935564, 0.022861462086439133, 0.03663741797208786, -0.0924486368894577, -0.030786586925387383, 0.015838855877518654, 0.02140270732343197, 0.02154153399169445, -0.012857679277658463, -0.07041851431131363, 9.533244491489366e-34, -0.0037381891161203384, -0.03670307993888855, -0.024638155475258827, -0.04347413778305054, 0.008353414945304394, 0.025456229224801064, -0.013413114473223686, -0.061019156128168106, -0.01858619414269924, 0.028112899512052536, -0.03730219975113869, -0.004138678777962923, 0.016186323016881943, 0.09236540645360947, -0.008961810730397701, -0.05525264889001846, 0.06403549760580063, 0.020596183836460114, -0.0870320126414299, -0.02203676477074623, 0.01065156701952219, 0.07715878635644913, 0.020976785570383072, -0.029693227261304855, 0.03340361267328262, 0.06497728824615479, -0.028502272441983223, 0.008295879699289799, 0.02849508821964264, 0.016119306907057762, -0.015702420845627785, -0.06139668449759483, -0.060169875621795654, 0.007040154654532671, -0.03196578100323677, 0.03907139599323273, -0.05797438323497772, -0.058888569474220276, 0.027190055698156357, 0.028633832931518555, -0.036132678389549255, 0.014878162182867527, -0.017109762877225876, -0.1418088972568512, -0.044469092041254044, 0.002540642861276865, -0.013195917010307312, -0.020371247082948685, -0.06185588613152504, -0.03764670342206955, -0.07372010499238968, 0.03383718058466911, -0.05652078613638878, 0.0019257856765761971, 0.0590103380382061, -0.11314962804317474, -0.00019914588483516127, 0.049184124916791916, 0.07046689093112946, 0.13211549818515778, -0.03435097634792328, -0.06702808290719986, -0.09075579047203064, 0.02341294288635254, -0.0757037103176117, 0.07927204668521881, -0.018878644332289696, -0.037701211869716644, -0.027624908834695816, 0.03442249074578285, -0.04318949580192566, 0.04341179132461548, 0.08670243620872498, 0.02965751849114895, 0.026180241256952286, -0.010746973566710949, 0.04305329546332359, -0.028906887397170067, -0.08117063343524933, 0.023256627842783928, -0.06911807507276535, 0.07006324082612991, 0.0018183712381869555, -0.020320892333984375, -0.025839848443865776, -0.015722163021564484, -0.026263393461704254, -0.025297584012150764, -0.03309515491127968, 0.009648039005696774, -0.033416856080293655, -0.03502889722585678, 0.07503426820039749, 0.035360392183065414, -0.05680888146162033, -6.263439446732182e-33, -0.03958156332373619, -0.018788577988743782, 0.021837836131453514, 0.026436977088451385, -0.037670861929655075, 0.06725269556045532, 0.0633508488535881, 0.024407975375652313, -0.049680113792419434, -0.1910652071237564, 0.05089760571718216, 0.048108067363500595, 0.01220564916729927, 0.02941429801285267, 0.04268747568130493, -0.007137851323932409, 0.003661029040813446, -0.033163346350193024, -0.03564925864338875, -0.051639530807733536, 0.013117840513586998, 0.13020776212215424, 0.005175013095140457, -0.0030674515292048454, 0.007446888834238052, -0.004286356270313263, 0.02002588100731373, -0.04185909032821655, -0.001185635570436716, 0.01552027091383934, -0.06725190579891205, 0.04025678336620331, -0.06993629038333893, 0.08892583847045898, 0.005032051354646683, 0.05958472192287445, 0.013222976587712765, 0.005128118675202131, -0.046315744519233704, 0.07318851351737976, 0.013688884675502777, 0.04018222168087959, -0.005343634635210037, 0.08185214549303055, -0.02682858519256115, 0.09997018426656723, 0.014988135546445847, 0.01722363941371441, 0.05657483637332916, -0.12346673011779785, -0.03314453735947609, -0.10784223675727844, -0.008152580820024014, 0.050139542669057846, -0.022368894889950752, -0.015401715412735939, -0.01868387684226036, 0.028077036142349243, -0.0650496631860733, -0.039407406002283096, 0.0770048275589943, -0.02348068729043007, -0.003648291574791074, -0.10413923859596252, 0.023089226335287094, -0.013314152136445045, -0.04932854324579239, 0.005831378512084484, -0.015268629416823387, -0.009536339901387691, 0.0035044164396822453, -0.03371403366327286, 0.01064359862357378, 0.026393812149763107, 0.02623835951089859, 0.008191002532839775, 0.019966259598731995, -0.01905233971774578, 0.042355217039585114, -0.05362154170870781, -0.026242855936288834, -0.07874545454978943, 0.03693153336644173, 0.05542764812707901, 0.05701358988881111, -0.01750357821583748, -0.010120018385350704, -0.056828465312719345, 0.07038315385580063, -0.1096944585442543, -0.025511423125863075, 0.06238090619444847, -0.03758889436721802, 0.0325828492641449, 0.029744483530521393, -5.319351004118289e-8, 0.09531063586473465, -0.072000652551651, -0.03741411492228508, 0.00797299388796091, -0.00037139622145332396, -0.01654168590903282, 0.058180071413517, -0.028799159452319145, -0.14186842739582062, 0.021692030131816864, 0.060357753187417984, -0.020456932485103607, -0.04472225904464722, -0.06693734973669052, 0.008302931673824787, 0.028092024847865105, -0.08447358757257462, 0.07530515640974045, 0.02356988564133644, -0.04924364387989044, -0.029669661074876785, 0.0019635630305856466, 0.029151706025004387, -0.026753028854727745, -0.07062999159097672, -0.014786587096750736, 0.058353524655103683, 0.011628619395196438, 0.0006274940096773207, 0.023998552933335304, 0.013352185487747192, -0.0043495045974850655, 0.030745400115847588, 0.0582573227584362, 0.0643342062830925, 0.03624437004327774, 0.004295897204428911, 0.17327836155891418, 0.09600725769996643, 0.01164317224174738, -0.01450049877166748, -0.0037684787530452013, 0.002544693648815155, 0.06050625070929527, -0.017183074727654457, 0.057307928800582886, -0.07567402720451355, -0.05756004527211189, -0.01619567722082138, -0.013487881049513817, 0.0020872524473816156, 0.008454027585685253, -0.013435174711048603, -0.007628385443240404, -0.036336250603199005, -0.09909499436616898, -0.08486989140510559, -0.03939570114016533, -0.0072998171672225, -0.0271135363727808, 0.07052171230316162, -0.12365179508924484, -0.007750469259917736, 0.004767983686178923 ]
0.103039
devices. ## Metal (Apple GPUs) Ollama supports GPU acceleration on Apple devices via the Metal API. ## Vulkan GPU Support > \*\*NOTE:\*\* > Vulkan is currently an Experimental feature. To enable, you must set OLLAMA\_VULKAN=1 for the Ollama server as described in the [FAQ](faq#how-do-i-configure-ollama-server) Additional GPU support on Windows and Linux is provided via [Vulkan](https://www.vulkan.org/). On Windows most GPU vendors drivers come bundled with Vulkan support and require no additional setup steps. Most Linux distributions require installing additional components, and you may have multiple options for Vulkan drivers between Mesa and GPU Vendor specific packages - Linux Intel GPU Instructions - https://dgpu-docs.intel.com/driver/client/overview.html - Linux AMD GPU Instructions - https://amdgpu-install.readthedocs.io/en/latest/install-script.html#specifying-a-vulkan-implementation For AMD GPUs on some Linux distributions, you may need to add the `ollama` user to the `render` group. The Ollama scheduler leverages available VRAM data reported by the GPU libraries to make optimal scheduling decisions. Vulkan requires additional capabilities or running as root to expose this available VRAM data. If neither root access or this capability are granted, Ollama will use approximate sizes of the models to make best effort scheduling decisions. ```bash sudo setcap cap\_perfmon+ep /usr/local/bin/ollama ``` ### GPU Selection To select specific Vulkan GPU(s), you can set the environment variable `GGML\_VK\_VISIBLE\_DEVICES` to one or more numeric IDs on the Ollama server as described in the [FAQ](faq#how-do-i-configure-ollama-server). If you encounter any problems with Vulkan based GPUs, you can disable all Vulkan GPUs by setting `GGML\_VK\_VISIBLE\_DEVICES=-1`
https://github.com/ollama/ollama/blob/main//docs/gpu.mdx
main
ollama
[ -0.024971840903162956, 0.0011717317393049598, -0.010328173637390137, 0.07082479447126389, -0.08436375111341476, -0.10711783915758133, -0.07612698525190353, 0.011942468583583832, -0.02788693644106388, -0.10660244524478912, -0.0026725654024630785, -0.04558572173118591, -0.0767219141125679, -0.004334167577326298, 0.03674165531992912, 0.05163996294140816, 0.08010467141866684, 0.009527495130896568, -0.006788919679820538, 0.018178848549723625, 0.04835280776023865, 0.0038232470396906137, 0.04082055017352104, -0.0006129536777734756, 0.0024705370888113976, 0.007443015463650227, 0.025260210037231445, 0.03356806933879852, 0.0112677700817585, 0.07104047387838364, 0.025798534974455833, -0.04880247637629509, -0.03449653089046478, 0.05953134968876839, -0.02070639654994011, -0.08052853494882584, 0.018913986161351204, -0.09838786721229553, -0.1464991271495819, -0.06171712279319763, -0.028230108320713043, 0.009785967878997326, -0.04853134974837303, 0.08588149398565292, 0.03700815886259079, -0.052693866193294525, 0.07885979115962982, -0.06833916157484055, -0.05038987100124359, 0.016868965700268745, -0.026845762506127357, -0.030049100518226624, 0.05379476770758629, 0.0033741246443241835, 0.002464096527546644, -0.08312033861875534, -0.04658497869968414, -0.05540405586361885, 0.09063340723514557, -0.014553450047969818, 0.07162313163280487, -0.042333610355854034, -0.019540805369615555, 0.05817466229200363, -0.04925667867064476, -0.025901276618242264, 0.019141187891364098, -0.05895203351974487, 0.05206455662846565, -0.0775095745921135, 0.03348395973443985, 0.005527297966182232, 0.04329311102628708, -0.04580166935920715, -0.025370920076966286, 0.018521249294281006, 0.08937061578035355, -0.0224296934902668, 0.021705081686377525, -0.024146350100636482, -0.01599191129207611, 0.0417976975440979, 0.052569832652807236, -0.023372363299131393, 0.04864624887704849, 0.025220079347491264, -0.021542610600590706, 0.13554570078849792, -0.036135561764240265, -0.007420855574309826, 0.07146676629781723, -0.002660370897501707, -0.06752979755401611, -0.07239843159914017, 0.10642591118812561, -0.07706932723522186, 0.035429760813713074, -0.07033106684684753, -0.021323353052139282, 0.07273292541503906, -0.07305007427930832, -0.02136787213385105, -0.0459212027490139, 0.17743483185768127, -0.06240276247262955, 0.07303676754236221, 0.025625204667448997, 0.07941184192895889, -0.14838743209838867, 0.07856015115976334, 0.09102754294872284, -0.02447599731385708, 0.026189548894762993, 0.0037492827977985144, 0.021102016791701317, 0.048270538449287415, -0.019390789791941643, 0.04824989661574364, 0.042539406567811966, 0.0013261561980471015, -0.09776319563388824, -0.027977541089057922, -0.00669874856248498, 0.011201836168766022, 0.022400086745619774, 0.05167927220463753, -0.0478835329413414, 4.4403737069075424e-33, 0.02865852601826191, 0.009617025032639503, -0.00008457624062430114, -0.06545648723840714, -0.08156884461641312, -0.06779950112104416, 0.0020524519495666027, -0.08667010813951492, 0.06849516183137894, 0.011992060579359531, 0.0006431670626625419, 0.04799159616231918, 0.018237126991152763, 0.0846935585141182, -0.025239240378141403, -0.04871527850627899, 0.03182639926671982, -0.025249477475881577, 0.029948512092232704, 0.019899742677807808, 0.024016981944441795, 0.018727581948041916, 0.012811098247766495, -0.029095439240336418, -0.10051772743463516, 0.08157959580421448, -0.022694900631904602, 0.006721313577145338, 0.011588470079004765, 0.02652524784207344, 0.04579085111618042, -0.033317383378744125, -0.07331379503011703, -0.0514843575656414, -0.011020636186003685, 0.04141692817211151, -0.06350915879011154, -0.039228521287441254, -0.008025046437978745, 0.013207877986133099, -0.08467098325490952, 0.03257736936211586, -0.004091635812073946, -0.015320130623877048, -0.004518604837357998, 0.03116724081337452, -0.08131960034370422, 0.03363101929426193, -0.028299374505877495, 0.010138158686459064, -0.07820430397987366, 0.0704973042011261, -0.05659104138612747, -0.041025467216968536, 0.061220232397317886, -0.027001451700925827, 0.0731780007481575, -0.0009646805701777339, 0.08236218243837357, 0.052174463868141174, -0.11068163067102432, -0.08920912444591522, -0.038375452160835266, -0.0031121051870286465, -0.11012616753578186, -0.032311685383319855, -0.002923240652307868, -0.0015155337750911713, -0.14164361357688904, 0.04629857838153839, -0.022938981652259827, 0.0823655053973198, 0.004170812200754881, -0.005403175950050354, -0.02887788787484169, 0.009201042354106903, 0.020169412717223167, -0.042428966611623764, -0.06684264540672302, 0.007808762602508068, -0.0596921443939209, 0.05823202058672905, 0.021192897111177444, -0.05760946124792099, 0.007860952988266945, -0.001240258920006454, -0.07178256660699844, -0.03492637723684311, 0.08606459200382233, 0.00015564655768685043, 0.001335831475444138, 0.012449412606656551, 0.032436635345220566, 0.03476545214653015, -0.0207651536911726, -5.213685522565446e-33, 0.020691145211458206, -0.02807530015707016, 0.0381392166018486, 0.016458265483379364, -0.016056038439273834, 0.05872126668691635, 0.01107772532850504, -0.023398345336318016, 0.029484646394848824, -0.11212880164384842, -0.024681193754076958, 0.07580717653036118, 0.06307290494441986, 0.05376086384057999, 0.020559612661600113, -0.014768370427191257, -0.04534998908638954, 0.012030581012368202, 0.029616665095090866, 0.012545906938612461, -0.02704268880188465, 0.038688935339450836, 0.05693976208567619, -0.04678359627723694, 0.04625866562128067, -0.030772678554058075, 0.012464229948818684, -0.027987105771899223, -0.019266532734036446, 0.01711641624569893, 0.04164036363363266, 0.01736319623887539, -0.018210746347904205, -0.040932394564151764, 0.0825999453663826, 0.08981313556432724, 0.03765435144305229, -0.06997201591730118, -0.05954211577773094, 0.08529526740312576, 0.02082940563559532, 0.033183202147483826, -0.032467424869537354, -0.0023926054127514362, -0.01965181902050972, 0.14080363512039185, -0.011284861713647842, 0.06726671755313873, 0.009479762986302376, -0.0820518359541893, 0.03446732088923454, 0.009989120066165924, -0.067770816385746, 0.04444286599755287, 0.09455623477697372, -0.02053619734942913, 0.05848544090986252, -0.005185503512620926, -0.08396885544061661, 0.005023116245865822, 0.02939385361969471, -0.020417897030711174, 0.05643494427204132, -0.09870465099811554, -0.05241503566503525, -0.008667705580592155, 0.009174843318760395, 0.007309887558221817, -0.0002231941616628319, -0.004846918862313032, -0.05709901079535484, -0.039048925042152405, 0.040162306278944016, 0.006780112627893686, 0.013305703178048134, 0.012698822654783726, 0.009351532906293869, -0.05615677684545517, 0.014885767363011837, 0.031994517892599106, 0.0139737818390131, 0.061265427619218826, 0.09543072432279587, 0.1043674573302269, 0.05134831368923187, 0.06467486172914505, 0.047975752502679825, -0.01904321275651455, 0.04598207771778107, -0.00177088868804276, 0.01678457483649254, -0.004619420040398836, 0.015548939816653728, 0.09084956347942352, -0.07401348650455475, -4.9163801918439276e-8, 0.01102051604539156, -0.03191301226615906, -0.017617201432585716, 0.012164715677499771, -0.09311425685882568, 0.010239510796964169, 0.059535328298807144, -0.031271062791347504, -0.04339144751429558, 0.02807062491774559, 0.06484422087669373, -0.011624847538769245, 0.010839974507689476, -0.019264573231339455, 0.02376658283174038, 0.06895793974399567, 0.0033005387522280216, 0.04366309195756912, 0.00540272006765008, -0.06437703222036362, -0.027624445036053658, 0.02185903489589691, 0.060800712555646896, -0.024849914014339447, -0.04441718012094498, 0.003795768367126584, -0.030759286135435104, 0.021968204528093338, -0.01300832349807024, -0.038419872522354126, -0.03131489083170891, -0.008181288838386536, 0.01006687805056572, 0.02477961778640747, 0.036446183919906616, -0.021823469549417496, 0.015596217475831509, 0.09747205674648285, 0.08629196882247925, -0.028465624898672104, -0.05794750526547432, -0.027659790590405464, -0.009548126719892025, -0.026535041630268097, 0.0252741277217865, 0.04766320064663887, -0.08479384332895279, 0.001245379913598299, -0.10173074901103973, 0.02519894391298294, 0.025899624451994896, -0.0378464013338089, 0.055223237723112106, 0.07081307470798492, -0.03130994364619255, -0.04901919886469841, -0.022767020389437675, -0.06483206152915955, -0.01327203493565321, -0.02937459386885166, 0.059640511870384216, -0.09058090299367905, 0.065434031188488, -0.049020957201719284 ]
0.137097
[Ollama](https://ollama.com) is the easiest way to get up and running with large language models such as gpt-oss, Gemma 3, DeepSeek-R1, Qwen3 and more. Get up and running with your first model or integrate Ollama with your favorite tools Download Ollama on macOS, Windows or Linux Ollama's cloud models offer larger models with better performance. View Ollama's API reference ## Libraries The official library for using Ollama with Python The official library for using Ollama with JavaScript or TypeScript. View a list of 20+ community-supported libraries for Ollama ## Community Join our Discord community Join our Reddit community
https://github.com/ollama/ollama/blob/main//docs/index.mdx
main
ollama
[ -0.09046205133199692, -0.10440309345722198, -0.013958445750176907, 0.008966258727014065, 0.0052662501111626625, -0.06417570263147354, -0.04893427714705467, 0.05227525904774666, -0.020333636552095413, -0.04459034651517868, -0.027149079367518425, 0.016569748520851135, -0.0753353163599968, 0.014077339321374893, 0.12136426568031311, 0.029138978570699692, 0.046995870769023895, 0.030054179951548576, -0.010136564262211323, -0.0863003060221672, 0.03601572662591934, 0.012451271526515484, 0.04301682859659195, -0.00020141889399383217, 0.0554715059697628, 0.00509284483268857, 0.041155558079481125, 0.005004755686968565, 0.011725053191184998, -0.03849262744188309, 0.013075962662696838, -0.053349029272794724, 0.00895294826477766, 0.016497209668159485, 0.0020537900272756815, 0.035260159522295, -0.0075325439684093, -0.1482899934053421, -0.06897943466901779, -0.0252597164362669, -0.026467854157090187, 0.035727594047784805, -0.006577740423381329, -0.02382638305425644, 0.07526448369026184, -0.10788577049970627, -0.04384796321392059, -0.0057470230385661125, 0.036031413823366165, -0.02252213843166828, -0.07463642209768295, -0.12133188545703888, -0.02768091857433319, 0.01663137599825859, 0.0032668409403413534, 0.0194916483014822, -0.02249126322567463, -0.07042238116264343, 0.007597633171826601, -0.016175920143723488, -0.03124738298356533, 0.0070039439015090466, -0.04628772288560867, 0.05689771845936775, -0.017427045851945877, 0.03674185648560524, 0.01981549710035324, 0.05458309128880501, 0.058619529008865356, -0.04186978191137314, -0.08166106045246124, 0.012369353324174881, 0.012740300968289375, 0.07097139209508896, -0.057479169219732285, -0.06979790329933167, 0.08587400615215302, -0.023948198184370995, 0.034108541905879974, 0.014359559863805771, -0.007216671947389841, -0.03057693876326084, -0.004850271623581648, 0.06801154464483261, 0.07623222470283508, -0.024506226181983948, 0.009237432852387428, 0.10052186995744705, 0.05782163888216019, -0.0008013448677957058, -0.014314237982034683, 0.026164626702666283, 0.06754855066537857, 0.011897098273038864, -0.034794341772794724, 0.02726311795413494, 0.0795828178524971, -0.06988376379013062, -0.06658416241407394, 0.10965049266815186, -0.04459080845117569, -0.043528951704502106, 0.04483896121382713, -0.011863711290061474, -0.07355888187885284, -0.003825349034741521, 0.08933810889720917, 0.03239051625132561, -0.014768548309803009, -0.018636934459209442, 0.010076791979372501, -0.07756685465574265, -0.014486772008240223, -0.04296945780515671, -0.02372816763818264, 0.03771737962961197, -0.014179317280650139, -0.03958908095955849, 0.0632309541106224, 0.08194658160209656, -0.024083437398076057, -0.012452429160475731, 0.013789882883429527, -0.021436402574181557, 0.04762246832251549, 0.07838042825460434, -0.05321797728538513, 7.29241871230004e-33, 0.07209007441997528, 0.07006855309009552, 0.0019030218245461583, 0.012728099711239338, 0.03402888402342796, 0.020262915641069412, 0.03745017945766449, -0.08337874710559845, -0.143416166305542, -0.05339435487985611, -0.024286914616823196, 0.11362016946077347, -0.12813033163547516, 0.04900415986776352, 0.05590325593948364, -0.05038614198565483, 0.0003011099179275334, 0.08133364468812943, 0.026347603648900986, 0.03602235019207001, 0.09427034854888916, 0.03557814657688141, 0.018505355343222618, 0.04071510210633278, -0.02672690339386463, 0.0442943274974823, 0.01741556078195572, -0.022078175097703934, -0.005325183738023043, 0.0537123866379261, 0.004797282163053751, -0.04072421416640282, -0.08709593117237091, -0.02104574628174305, 0.02276718243956566, -0.03523388132452965, -0.07034049928188324, -0.12012524157762527, 0.03864884376525879, -0.061880890280008316, -0.06633928418159485, 0.03345702961087227, 0.03492732718586922, -0.1004369854927063, -0.05674774572253227, 0.021392250433564186, -0.020560331642627716, 0.0268868375569582, 0.06917461007833481, -0.0016701017739251256, -0.038962531834840775, 0.02252350188791752, -0.07940115034580231, 0.07075750082731247, -0.019571684300899506, 0.01272090058773756, 0.048495303839445114, 0.02724207192659378, 0.12365048378705978, 0.03413241356611252, -0.018156517297029495, 0.010668528266251087, 0.033395830541849136, -0.05899230018258095, 0.02251574583351612, -0.05659985542297363, -0.07081705331802368, -0.014543495140969753, 0.005516204982995987, 0.034936800599098206, -0.024406030774116516, -0.021823955699801445, 0.04252989590167999, 0.09718871116638184, 0.02870180644094944, -0.03575997054576874, -0.007393446750938892, -0.08949198573827744, -0.04631558805704117, 0.030648382380604744, -0.03387695923447609, -0.005017062649130821, 0.016127804294228554, -0.0607788972556591, 0.07112547755241394, -0.0022311212960630655, 0.019298119470477104, 0.008159413002431393, 0.004469362553209066, 0.0056880624033510685, -0.04853920638561249, -0.029572825878858566, 0.05561181902885437, -0.022864822298288345, -0.028868000954389572, -7.184040337206133e-33, -0.0013044762890785933, -0.033265966922044754, 0.023475978523492813, 0.058655254542827606, -0.015854433178901672, -0.08145275712013245, -0.015377303585410118, 0.07155071198940277, 0.030366938561201096, -0.01348305307328701, 0.007462555542588234, -0.03888589143753052, 0.12074782699346542, -0.005823727231472731, 0.13260972499847412, -0.06422753632068634, -0.02871066704392433, -0.0861390009522438, 0.06785476952791214, 0.0130154425278306, -0.08618704229593277, 0.02433536760509014, -0.05153778940439224, -0.011959521099925041, 0.007364071439951658, -0.0025161374360322952, -0.06852038949728012, 0.0052197519689798355, -0.06265755742788315, -0.027257170528173447, -0.0714607834815979, 0.053255677223205566, -0.0310533307492733, -0.004071281757205725, -0.029992250725626945, 0.04832630604505539, 0.06472505629062653, -0.010507578030228615, -0.0063814157620072365, 0.04550798237323761, 0.10887078940868378, -0.05198902264237404, -0.015169471502304077, -0.055079229176044464, -0.021929750218987465, 0.07269161194562912, -0.12407989054918289, 0.08516643941402435, -0.026357438415288925, -0.05432949587702751, 0.009854734875261784, -0.028491977602243423, 0.015683451667428017, -0.05701848119497299, 0.027275003492832184, -0.0952635183930397, 0.005638372153043747, -0.037154387682676315, -0.06537823379039764, -0.004074450582265854, -0.05496478080749512, -0.058554235845804214, 0.06154493987560272, 0.004622182343155146, -0.016527490690350533, -0.07572654634714127, -0.08405113965272903, -0.03626001998782158, -0.022040173411369324, -0.005283507518470287, -0.08605150878429413, -0.014073196798563004, 0.026900725439190865, 0.06736895442008972, -0.009796584025025368, -0.0006467648781836033, -0.06000768393278122, 0.010636845603585243, 0.0658881887793541, -0.003983828239142895, 0.03959782421588898, 0.09021864086389542, 0.08798152208328247, -0.00301877548918128, 0.045470524579286575, 0.01065455749630928, 0.07959233224391937, 0.018441973254084587, 0.003828549524769187, 0.029928643256425858, -0.08011604845523834, 0.1147928237915039, 0.08292700350284576, 0.10624625533819199, 0.02042197808623314, -5.1395726785585794e-8, -0.056032583117485046, -0.023152457550168037, -0.014681806787848473, 0.009505310095846653, -0.04483848810195923, -0.008842624723911285, -0.0053649358451366425, 0.026814406737685204, 0.06897836178541183, 0.041745662689208984, 0.05586278811097145, -0.018896952271461487, -0.025097738951444626, -0.007661694660782814, -0.07058819383382797, 0.11320804059505463, 0.02548910677433014, 0.07428152114152908, -0.0031163457315415144, -0.0635148212313652, 0.03758525103330612, 0.0515199713408947, 0.047564394772052765, 0.04998655989766121, 0.0013320763828232884, 0.008953586220741272, -0.04309489578008652, 0.06110866740345955, 0.0150564881041646, -0.057082317769527435, -0.038121629506349564, -0.023480428382754326, 0.0204754751175642, -0.03182670474052429, 0.014358028769493103, 0.02460295334458351, -0.04107784107327461, 0.004870409611612558, 0.012327625416219234, -0.01460324041545391, 0.11324311047792435, 0.014752536080777645, -0.050142399966716766, -0.0613141730427742, 0.043096836656332016, 0.04422836750745773, -0.02490675263106823, -0.09120918810367584, -0.021530425176024437, -0.013760804198682308, -0.03259637951850891, -0.06277574598789215, -0.027460657060146332, 0.034666161984205246, -0.022951854392886162, 0.009195445105433464, -0.06754372268915176, -0.029413463547825813, 0.0022441174369305372, 0.03267741575837135, 0.04839327558875084, -0.017415545880794525, 0.04234547168016434, 0.07093282788991928 ]
0.1588
## CPU only ```shell docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama ``` ## Nvidia GPU Install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installation). ### Install with Apt 1. Configure the repository ```shell curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey \ | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg curl -fsSL https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list \ | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' \ | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list sudo apt-get update ``` 2. Install the NVIDIA Container Toolkit packages ```shell sudo apt-get install -y nvidia-container-toolkit ``` ### Install with Yum or Dnf 1. Configure the repository ```shell curl -fsSL https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo \ | sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo ``` 2. Install the NVIDIA Container Toolkit packages ```shell sudo yum install -y nvidia-container-toolkit ``` ### Configure Docker to use Nvidia driver ```shell sudo nvidia-ctk runtime configure --runtime=docker sudo systemctl restart docker ``` ### Start the container ```shell docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama ``` If you're running on an NVIDIA JetPack system, Ollama can't automatically discover the correct JetPack version. Pass the environment variable `JETSON\_JETPACK=5` or `JETSON\_JETPACK=6` to the container to select version 5 or 6. ## AMD GPU To run Ollama using Docker with AMD GPUs, use the `rocm` tag and the following command: ```shell docker run -d --device /dev/kfd --device /dev/dri -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama:rocm ``` ## Vulkan Support Vulkan is bundled into the `ollama/ollama` image. ```shell docker run -d --device /dev/kfd --device /dev/dri -v ollama:/root/.ollama -p 11434:11434 -e OLLAMA\_VULKAN=1 --name ollama ollama/ollama ``` ## Run model locally Now you can run a model: ```shell docker exec -it ollama ollama run llama3.2 ``` ## Try different models More models can be found on the [Ollama library](https://ollama.com/library).
https://github.com/ollama/ollama/blob/main//docs/docker.mdx
main
ollama
[ -0.018310999497771263, 0.04482314735651016, -0.034718479961156845, 0.021612994372844696, -0.013261478394269943, -0.10679537802934647, -0.055348314344882965, -0.03146573156118393, -0.020187778398394585, 0.0021899347193539143, -0.015735596418380737, -0.06658294796943665, -0.06430896371603012, -0.03545944392681122, 0.06159526854753494, 0.030078917741775513, 0.12723606824874878, -0.010114761069417, -0.02192753739655018, 0.03179223835468292, -0.03365302458405495, 0.04001959413290024, 0.01634327881038189, -0.008693687617778778, -0.0231158509850502, 0.0161740779876709, -0.06573226302862167, -0.0317419059574604, 0.010917364619672298, -0.029392268508672714, 0.05453455448150635, -0.008573200553655624, 0.025782862678170204, 0.052837684750556946, 0.1272391676902771, 0.026293981820344925, -0.009457654319703579, -0.08503667265176773, -0.062445446848869324, -0.049291085451841354, 0.04352250695228577, -0.038471270352602005, -0.03520797938108444, -0.012732736766338348, 0.04071910306811333, -0.043195053935050964, -0.023637788370251656, -0.040634311735630035, 0.010588548146188259, 0.008725864812731743, -0.04546574503183365, -0.057705480605363846, -0.0020780258346349, -0.008116083219647408, -0.006171626038849354, 0.08287961781024933, -0.013555653393268585, -0.001657244749367237, 0.05722281336784363, 0.04316411167383194, 0.08279456943273544, -0.01529865525662899, 0.002618572674691677, 0.012533685192465782, 0.013381666503846645, -0.014014730229973793, 0.0569438599050045, -0.07819026708602905, 0.024949712678790092, -0.00042868911987170577, 0.09550323337316513, 0.01779877580702305, -0.004553423263132572, -0.057722412049770355, -0.037852611392736435, -0.017323220148682594, -0.01768818125128746, -0.013921437785029411, -0.018191400915384293, 0.060466427356004715, -0.046724703162908554, 0.03015916422009468, 0.07882362604141235, 0.020328335464000702, -0.021385401487350464, 0.031186096370220184, 0.027443870902061462, 0.013277320191264153, 0.08266878128051758, -0.09568701684474945, 0.017923064529895782, 0.018922066316008568, -0.021978560835123062, -0.03130566328763962, 0.10044978559017181, -0.05722634866833687, -0.06665545701980591, 0.008116040378808975, -0.04400097206234932, 0.03667876496911049, -0.05457298085093498, -0.03927391394972801, 0.004620360676199198, 0.06452632695436478, -0.01129165105521679, 0.06472509354352951, 0.027596304193139076, 0.037790942937135696, -0.08881308883428574, 0.03615877032279968, 0.015228716656565666, -0.014931874349713326, 0.011282297782599926, 0.062341827899217606, -0.07923460751771927, 0.013205006718635559, -0.037185441702604294, -0.06518618017435074, -0.009448605589568615, -0.036272160708904266, 0.02289949357509613, -0.08652046322822571, 0.024433139711618423, -0.05190766230225563, -0.07416774332523346, 0.10044597834348679, -0.0631496012210846, 6.06627782003059e-33, 0.10924701392650604, -0.05699040740728378, 0.05771537870168686, -0.05039624497294426, 0.11190570890903473, 0.05133479833602905, 0.038643643260002136, -0.05278961360454559, -0.008566207252442837, 0.021702932193875313, -0.0946284607052803, 0.05510423332452774, -0.03626769408583641, 0.04532024636864662, -0.0374344140291214, -0.10544323921203613, -0.027258343994617462, 0.028893647715449333, 0.0372498519718647, 0.02523988112807274, 0.10178865492343903, 0.052123457193374634, -0.02162340097129345, -0.031884849071502686, -0.03770236298441887, 0.028238438069820404, -0.030788293108344078, -0.060462452471256256, 0.05063953623175621, 0.016526447609066963, 0.08651760965585709, -0.03961838036775589, 0.015252241864800453, 0.015590975061058998, 0.030624059960246086, -0.04042338579893112, 0.016692733392119408, 0.06149306520819664, -0.048441119492053986, 0.07158911228179932, 0.034207023680210114, 0.06563764810562134, -0.017123956233263016, -0.07103512436151505, -0.03332705795764923, 0.015764344483613968, -0.04414274916052818, -0.035823214799165726, 0.07167757302522659, 0.04497748240828514, 0.025300011038780212, -0.009043307043612003, -0.09438366442918777, -0.037804849445819855, 0.0040414296090602875, -0.052488308399915695, -0.035064198076725006, -0.004306098446249962, 0.1134522408246994, 0.0004523215757217258, -0.16317352652549744, -0.027215613052248955, 0.008466015569865704, -0.07846958935260773, 0.024906059727072716, -0.02977692522108555, -0.00024117268912959844, 0.09775061160326004, -0.029455889016389847, 0.007307155057787895, -0.0639793872833252, 0.005444664508104324, -0.006753083784133196, 0.05226432532072067, 0.09375712275505066, -0.025791874155402184, -0.03077838383615017, -0.02965833991765976, -0.0627167820930481, -0.04363519698381424, 0.017389237880706787, 0.0503203421831131, 0.03368657827377319, -0.002251989906653762, -0.03020264022052288, -0.057198479771614075, -0.0316099189221859, 0.0818379819393158, -0.01713208295404911, 0.04162055626511574, -0.014004905708134174, -0.011884583160281181, 0.019853854551911354, -0.016239076852798462, -0.05995313078165054, -6.184595367202684e-33, 0.058028873056173325, -0.07572806626558304, 0.003223774256184697, 0.09699924290180206, 0.04603634774684906, 0.019334988668560982, 0.00032398494658991694, -0.04852496460080147, 0.035924579948186874, -0.03662194684147835, 0.019828269258141518, 0.06932222843170166, 0.07522456347942352, 0.07896177470684052, -0.0034197589848190546, -0.02915586717426777, -0.08629489690065384, -0.0064736963249742985, -0.020065294578671455, -0.010251511819660664, -0.047177258878946304, -0.039190005511045456, -0.0010035046143457294, 0.0045163678005337715, -0.01090901717543602, 0.0006113203126005828, 0.08673500269651413, -0.06842639297246933, -0.002495120046660304, -0.048432037234306335, -0.05155635252594948, 0.0883306935429573, -0.02020658180117607, 0.08726236969232559, 0.009437727741897106, 0.04401315003633499, 0.011398649774491787, 0.0612931102514267, -0.08778534829616547, -0.02310619130730629, 0.040326498448848724, -0.03962060436606407, -0.00035252119414508343, -0.08415141701698303, -0.013555786572396755, 0.02082727663218975, 0.012573359534144402, -0.0006273947074078023, -0.08992448449134827, 0.022578243166208267, 0.02193736843764782, -0.012846015393733978, -0.0234646238386631, 0.06189925596117973, 0.061248160898685455, 0.032441407442092896, 0.11654241383075714, 0.019207680597901344, -0.060736533254384995, 0.008894090540707111, 0.10467087477445602, -0.06848950684070587, 0.029054909944534302, -0.008703864179551601, 0.016555000096559525, -0.028761137276887894, -0.03634243458509445, 0.07623095065355301, -0.06201127916574478, 0.05148231238126755, -0.07034910470247269, -0.019952520728111267, 0.04882459715008736, 0.015457551926374435, -0.05214637145400047, -0.01689159870147705, -0.08011409640312195, -0.09623457491397858, 0.11030638962984085, 0.006130358204245567, -0.01708776317536831, -0.04588504508137703, 0.08809519559144974, -0.06652100384235382, 0.03177950531244278, 0.053420692682266235, 0.1482546627521515, -0.0032942492980509996, 0.054464586079120636, 0.021510416641831398, -0.054405130445957184, -0.11436869204044342, -0.058730874210596085, 0.08354064077138901, 0.058053549379110336, -5.112067924528674e-8, 0.05131591856479645, -0.02681105211377144, -0.04084871709346771, 0.0796423926949501, 0.0278678797185421, 0.0050173550844192505, 0.021065443754196167, 0.0318293571472168, 0.0009498344734311104, -0.002783650765195489, 0.07370022684335709, -0.001728326897136867, -0.07287206500768661, -0.043024227023124695, -0.0025920914486050606, 0.052015550434589386, -0.020303592085838318, 0.034716688096523285, 0.04069935902953148, -0.06771289557218552, -0.07216831296682358, -0.010628570802509785, -0.015004368498921394, -0.04285582900047302, -0.04529804363846779, -0.03128750994801521, 0.04045579209923744, 0.0177141185849905, 0.025176670402288437, -0.06350527703762054, -0.06212257593870163, -0.013876398093998432, 0.01131496299058199, -0.07634826004505157, 0.015982050448656082, -0.04686826467514038, 0.00038929074071347713, 0.017094234004616737, 0.13002440333366394, -0.038251496851444244, 0.025813346728682518, 0.012003768235445023, 0.011819064617156982, -0.11771735548973083, 0.0025798112619668245, 0.050565529614686966, 0.04164745286107063, 0.04136640205979347, -0.10270961374044418, 0.07638909667730331, 0.0612357072532177, -0.0357392393052578, -0.007020245306193829, 0.06520124524831772, -0.01424458809196949, 0.040974538773298264, -0.10462937504053116, -0.020723970606923103, -0.06057916209101677, -0.036012180149555206, 0.04354507476091385, -0.013080855831503868, 0.03880917280912399, 0.013318811543285847 ]
-0.014173
## Table of Contents - [Importing a Safetensors adapter](#Importing-a-fine-tuned-adapter-from-Safetensors-weights) - [Importing a Safetensors model](#Importing-a-model-from-Safetensors-weights) - [Importing a GGUF file](#Importing-a-GGUF-based-model-or-adapter) - [Sharing models on ollama.com](#Sharing-your-model-on-ollamacom) ## Importing a fine tuned adapter from Safetensors weights First, create a `Modelfile` with a `FROM` command pointing at the base model you used for fine tuning, and an `ADAPTER` command which points to the directory with your Safetensors adapter: ```dockerfile FROM ADAPTER /path/to/safetensors/adapter/directory ``` Make sure that you use the same base model in the `FROM` command as you used to create the adapter otherwise you will get erratic results. Most frameworks use different quantization methods, so it's best to use non-quantized (i.e. non-QLoRA) adapters. If your adapter is in the same directory as your `Modelfile`, use `ADAPTER .` to specify the adapter path. Now run `ollama create` from the directory where the `Modelfile` was created: ```shell ollama create my-model ``` Lastly, test the model: ```shell ollama run my-model ``` Ollama supports importing adapters based on several different model architectures including: - Llama (including Llama 2, Llama 3, Llama 3.1, and Llama 3.2); - Mistral (including Mistral 1, Mistral 2, and Mixtral); and - Gemma (including Gemma 1 and Gemma 2) You can create the adapter using a fine tuning framework or tool which can output adapters in the Safetensors format, such as: - Hugging Face [fine tuning framework](https://huggingface.co/docs/transformers/en/training) - [Unsloth](https://github.com/unslothai/unsloth) - [MLX](https://github.com/ml-explore/mlx) ## Importing a model from Safetensors weights First, create a `Modelfile` with a `FROM` command which points to the directory containing your Safetensors weights: ```dockerfile FROM /path/to/safetensors/directory ``` If you create the Modelfile in the same directory as the weights, you can use the command `FROM .`. Now run the `ollama create` command from the directory where you created the `Modelfile`: ```shell ollama create my-model ``` Lastly, test the model: ```shell ollama run my-model ``` Ollama supports importing models for several different architectures including: - Llama (including Llama 2, Llama 3, Llama 3.1, and Llama 3.2); - Mistral (including Mistral 1, Mistral 2, and Mixtral); - Gemma (including Gemma 1 and Gemma 2); and - Phi3 This includes importing foundation models as well as any fine tuned models which have been \_fused\_ with a foundation model. ## Importing a GGUF based model or adapter If you have a GGUF based model or adapter it is possible to import it into Ollama. You can obtain a GGUF model or adapter by: - converting a Safetensors model with the `convert\_hf\_to\_gguf.py` from Llama.cpp; - converting a Safetensors adapter with the `convert\_lora\_to\_gguf.py` from Llama.cpp; or - downloading a model or adapter from a place such as HuggingFace To import a GGUF model, create a `Modelfile` containing: ```dockerfile FROM /path/to/file.gguf ``` For a GGUF adapter, create the `Modelfile` with: ```dockerfile FROM ADAPTER /path/to/file.gguf ``` When importing a GGUF adapter, it's important to use the same base model as the base model that the adapter was created with. You can use: - a model from Ollama - a GGUF file - a Safetensors based model Once you have created your `Modelfile`, use the `ollama create` command to build the model. ```shell ollama create my-model ``` ## Quantizing a Model Quantizing a model allows you to run models faster and with less memory consumption but at reduced accuracy. This allows you to run a model on more modest hardware. Ollama can quantize FP16 and FP32 based models into different quantization levels using the `-q/--quantize` flag with the `ollama create` command. First, create a Modelfile with the FP16 or FP32 based model you wish to quantize. ```dockerfile FROM /path/to/my/gemma/f16/model ``` Use `ollama create` to then create the quantized model. ```shell
https://github.com/ollama/ollama/blob/main//docs/import.mdx
main
ollama
[ -0.051124345511198044, -0.039602912962436676, -0.10002903640270233, 0.0024622101336717606, 0.02015787921845913, -0.11493401229381561, 0.006706262938678265, 0.07728482037782669, -0.10038064420223236, -0.0363725870847702, 0.04753691330552101, -0.0745464563369751, 0.025602364912629128, -0.0166368018835783, -0.010737759992480278, 0.004312917124480009, 0.03810679167509079, 0.0726405456662178, -0.11005251109600067, 0.08742227405309677, 0.02242501638829708, 0.06390582025051117, 0.05179598927497864, 0.02308814413845539, -0.08894173800945282, -0.03882783278822899, -0.009705095551908016, 0.04067132622003555, 0.005183067638427019, -0.08503314107656479, 0.0465274304151535, 0.01748250052332878, -0.06400946527719498, -0.014999449253082275, 0.07367248833179474, 0.03974121809005737, -0.032838452607393265, -0.1695721596479416, -0.08608679473400116, -0.035982243716716766, 0.06140073388814926, 0.020145850256085396, -0.024099741131067276, -0.0029468247666954994, -0.05398188531398773, -0.10373476147651672, 0.007912464439868927, -0.06524936109781265, 0.019702116027474403, -0.015423459000885487, -0.05508526787161827, -0.054166994988918304, -0.055250536650419235, 0.02152440883219242, -0.006680058781057596, 0.0838213711977005, 0.024803774431347847, -0.06903806328773499, -0.06417860835790634, 0.016898423433303833, -0.0008740390185266733, 0.08217668533325195, -0.0214291512966156, 0.008006595075130463, -0.012259948067367077, -0.015098540112376213, 0.019683850929141045, 0.0479588620364666, 0.02908284403383732, 0.028900830075144768, -0.021745245903730392, -0.016685964539647102, 0.0030771868769079447, -0.004550369456410408, 0.0024855132214725018, 0.04357331246137619, 0.04401297867298126, 0.03923926129937172, 0.022595858201384544, 0.004496667068451643, 0.019886907190084457, -0.01143660582602024, 0.04718540236353874, -0.03007110022008419, 0.058135125786066055, 0.036250028759241104, -0.014979138970375061, -0.000770171987824142, 0.10623057186603546, -0.05683613568544388, 0.03406484052538872, -0.009685280732810497, -0.004995770752429962, 0.0006484875921159983, 0.027494236826896667, -0.031499315053224564, 0.0021682956721633673, 0.024312548339366913, -0.025915782898664474, 0.08205752074718475, -0.06432089954614639, -0.025208353996276855, 0.07266134768724442, 0.11606108397245407, 0.009825576096773148, 0.023332156240940094, 0.010022331960499287, 0.08745566755533218, -0.09505155682563782, 0.0196792334318161, 0.046395983546972275, -0.01772126369178295, 0.07024040818214417, -0.04175872355699539, 0.04678013175725937, 0.023503340780735016, -0.04019579663872719, -0.0647110641002655, -0.03521038219332695, 0.04283398762345314, -0.03609880432486534, -0.06656589359045029, 0.11677446961402893, 0.02837868221104145, -0.02729964442551136, 0.09254860132932663, -0.11286380887031555, 2.740999176477186e-33, 0.03447847440838814, -0.039503369480371475, 0.04275168478488922, 0.04290654510259628, 0.03949162736535072, 0.038201943039894104, 0.04824052378535271, -0.004411126021295786, -0.04582269862294197, 0.000995282898657024, -0.053749337792396545, 0.07334156334400177, -0.06507007032632828, 0.10076816380023956, 0.039611753076314926, -0.04059498757123947, -0.05028771609067917, 0.06251635402441025, 0.025580115616321564, -0.016986295580863953, 0.08474200963973999, -0.03990453854203224, -0.04136797413229942, -0.03001636639237404, 0.029002247378230095, 0.07110346853733063, -0.048618536442518234, -0.04707450792193413, -0.028482401743531227, 0.0335102453827858, 0.07979463040828705, -0.031259261071681976, -0.022659726440906525, -0.03855155035853386, -0.02056632936000824, -0.028381211683154106, -0.07278524339199066, -0.015419266186654568, -0.09574807435274124, -0.07314300537109375, 0.012117494828999043, 0.013303257524967194, 0.04600071161985397, -0.011113661341369152, 0.04884288087487221, 0.007792932912707329, 0.00574031937867403, 0.031199069693684578, 0.03803250938653946, -0.03214004635810852, 0.0256146639585495, -0.036862581968307495, -0.050093453377485275, 0.03494301438331604, -0.050607599318027496, 0.010988390073180199, 0.013446245342493057, -0.0025986083783209324, 0.12767690420150757, 0.02550484612584114, -0.11116348952054977, 0.050322696566581726, -0.020944122225046158, -0.008752194233238697, 0.06733506172895432, 0.0462062768638134, -0.005899158772081137, -0.06937668472528458, -0.012256214395165443, 0.023338310420513153, -0.07532560080289841, -0.012442500330507755, -0.061510469764471054, 0.09929124265909195, 0.008243080228567123, -0.029726888984441757, -0.00775524415075779, -0.020131314173340797, -0.07727748155593872, -0.06730664521455765, 0.002897787606343627, 0.0990353375673294, 0.02040693163871765, 0.027478180825710297, -0.038471147418022156, -0.12577582895755768, 0.019843708723783493, -0.0018346338765695691, -0.03357547149062157, 0.0652819499373436, 0.07487938553094864, 0.006470658350735903, 0.0010117320343852043, -0.06954310089349747, -0.043340228497982025, -2.594905065137146e-33, 0.05206291750073433, -0.0026159118860960007, -0.007118913810700178, 0.04736515134572983, 0.01651618257164955, -0.028414735570549965, 0.02099558897316456, 0.04443875327706337, 0.025962473824620247, -0.03232721984386444, -0.062438301742076874, 0.01475838664919138, 0.10492906719446182, -0.010054446756839752, 0.08272023499011993, -0.05230758711695671, -0.10319191962480545, -0.02373459003865719, -0.0027179268654435873, 0.039265770465135574, 0.012037524953484535, 0.018497025594115257, -0.005456449463963509, 0.020960019901394844, 0.016012562438845634, 0.0040339576080441475, -0.08842238783836365, -0.04379976540803909, -0.00345489289611578, 0.04119635745882988, -0.03668572008609772, 0.08035145699977875, -0.012958213686943054, 0.03219618275761604, -0.03294135630130768, 0.08731630444526672, 0.001318482798524201, 0.03913746774196625, 0.02505134791135788, 0.019845589995384216, 0.015176484361290932, 0.029993325471878052, -0.07196904718875885, -0.08682119101285934, -0.11259271204471588, -0.021977180615067482, -0.0004757834831252694, -0.039245180785655975, -0.06438843905925751, -0.05562213063240051, -0.025789031758904457, -0.01821781136095524, -0.021023377776145935, 0.02931642159819603, 0.036023128777742386, -0.012256024405360222, 0.13328394293785095, -0.08965117484331131, -0.04956689476966858, -0.005493265576660633, 0.08301945775747299, -0.07319571822881699, -0.007669056300073862, -0.09031160175800323, -0.03056088089942932, -0.02912050671875477, -0.012164740823209286, -0.04672197997570038, -0.0108748534694314, 0.007861136458814144, -0.014535187743604183, -0.013218977488577366, 0.09355780482292175, 0.05255571007728577, 0.05891195312142372, -0.06173489987850189, -0.07083433866500854, 0.014006164856255054, 0.08050234615802765, 0.005677826702594757, -0.036068934947252274, 0.008418320678174496, 0.11417252570390701, 0.03653724491596222, 0.03992041200399399, 0.007282660808414221, 0.12270848453044891, 0.02247369848191738, 0.04268835484981537, -0.0028520887717604637, -0.0579313300549984, -0.01111308392137289, 0.03610385209321976, 0.10680732876062393, 0.026196569204330444, -4.804273245895274e-8, -0.030477486550807953, -0.0010765823535621166, -0.026633618399500847, 0.08655229955911636, -0.053341981023550034, -0.008577108383178711, -0.02672930620610714, -0.0027768586296588182, 0.005737770814448595, 0.04843032360076904, 0.028456339612603188, 0.06986115127801895, -0.04584716632962227, 0.03428728133440018, -0.0541204996407032, 0.050134703516960144, 0.04804546386003494, 0.028385210782289505, -0.06503887474536896, -0.05119764804840088, -0.02287875860929489, 0.06585932523012161, 0.045679446309804916, 0.01411796547472477, 0.07476622611284256, -0.01835944876074791, -0.01621914468705654, 0.02021758072078228, 0.05005253106355667, 0.029200565069913864, 0.0035007826518267393, -0.05504106730222702, -0.05451046675443649, 0.06663483381271362, -0.05161188542842865, 0.033951014280319214, -0.022542791441082954, 0.018155308440327644, -0.02035469003021717, -0.0037379928398877382, 0.00038609097828157246, 0.018885785713791847, -0.04661953076720238, -0.03876745328307152, 0.11828230321407318, 0.03617053106427193, -0.039975158870220184, -0.06161271780729294, -0.06920215487480164, 0.07785230875015259, 0.00041944978875108063, -0.01533740758895874, -0.024746114388108253, 0.06851601600646973, -0.0669272169470787, -0.08969129621982574, -0.04155997931957245, 0.024438895285129547, 0.014730279333889484, -0.03617212548851967, -0.007254977710545063, 0.0010946420952677727, 0.08500517159700394, 0.007888504303991795 ]
0.067607
Ollama can quantize FP16 and FP32 based models into different quantization levels using the `-q/--quantize` flag with the `ollama create` command. First, create a Modelfile with the FP16 or FP32 based model you wish to quantize. ```dockerfile FROM /path/to/my/gemma/f16/model ``` Use `ollama create` to then create the quantized model. ```shell $ ollama create --quantize q4\_K\_M mymodel transferring model data quantizing F16 model to Q4\_K\_M creating new layer sha256:735e246cc1abfd06e9cdcf95504d6789a6cd1ad7577108a70d9902fef503c1bd creating new layer sha256:0853f0ad24e5865173bbf9ffcc7b0f5d56b66fd690ab1009867e45e7d2c4db0f writing manifest success ``` ### Supported Quantizations - `q8\_0` #### K-means Quantizations - `q4\_K\_S` - `q4\_K\_M` ## Sharing your model on ollama.com You can share any model you have created by pushing it to [ollama.com](https://ollama.com) so that other users can try it out. First, use your browser to go to the [Ollama Sign-Up](https://ollama.com/signup) page. If you already have an account, you can skip this step. The `Username` field will be used as part of your model's name (e.g. `jmorganca/mymodel`), so make sure you are comfortable with the username that you have selected. Now that you have created an account and are signed-in, go to the [Ollama Keys Settings](https://ollama.com/settings/keys) page. Follow the directions on the page to determine where your Ollama Public Key is located. Click on the `Add Ollama Public Key` button, and copy and paste the contents of your Ollama Public Key into the text field. To push a model to [ollama.com](https://ollama.com), first make sure that it is named correctly with your username. You may have to use the `ollama cp` command to copy your model to give it the correct name. Once you're happy with your model's name, use the `ollama push` command to push it to [ollama.com](https://ollama.com). ```shell ollama cp mymodel myuser/mymodel ollama push myuser/mymodel ``` Once your model has been pushed, other users can pull and run it by using the command: ```shell ollama run myuser/mymodel ```
https://github.com/ollama/ollama/blob/main//docs/import.mdx
main
ollama
[ 0.041918907314538956, 0.01614234410226345, -0.031969111412763596, -0.02077670395374298, -0.04269033297896385, -0.042631663382053375, -0.05411089211702347, 0.02885478176176548, 0.00807163305580616, -0.02623891644179821, 0.06908523291349411, -0.10996318608522415, -0.04880409315228462, 0.04833241552114487, 0.037157390266656876, 0.018569184467196465, -0.040720704942941666, 0.04917754605412483, -0.10466007888317108, 0.04599767550826073, 0.06183837354183197, -0.018432283774018288, -0.014127238653600216, 0.000799214409198612, -0.026683088392019272, -0.0033279904164373875, 0.029074620455503464, 0.07721379399299622, 0.02890636771917343, -0.05320245772600174, 0.07678063958883286, 0.10700751096010208, 0.009737410582602024, -0.02844507247209549, 0.12052816152572632, 0.02871951274573803, -0.00841618049889803, -0.11341884732246399, 0.00039980278233997524, -0.08079797774553299, -0.015495401807129383, -0.040704645216464996, -0.03260447457432747, -0.0806812271475792, 0.05134052038192749, -0.07731582969427109, 0.034199222922325134, 0.04465917870402336, 0.0358896441757679, -0.03713354840874672, -0.006618155166506767, 0.005359698086977005, -0.04277203232049942, 0.05104069784283638, 0.0283066276460886, 0.003885242622345686, -0.015613539144396782, -0.045280709862709045, -0.07687826454639435, -0.0030238344334065914, -0.06840763241052628, 0.05690110847353935, -0.015730956569314003, 0.03188527002930641, 0.028734363615512848, 0.03595895320177078, -0.07345760613679886, 0.013526750728487968, 0.04989195987582207, 0.03596946597099304, -0.006858815439045429, -0.02584361843764782, -0.048087816685438156, -0.012098162434995174, 0.022721437737345695, 0.05724339187145233, 0.0418226532638073, 0.05850183218717575, 0.0005740287597291172, 0.015168276615440845, -0.039481837302446365, -0.023907728493213654, -0.00758571270853281, -0.05709404870867729, 0.025195129215717316, -0.007539984304457903, -0.06915004551410675, 0.003417458152398467, 0.013531367294490337, -0.06408089399337769, -0.012617901898920536, 0.06943940371274948, -0.07973287254571915, -0.03366314619779587, 0.07826661318540573, -0.06954719126224518, 0.041860181838274, 0.008544418029487133, 0.07033497095108032, 0.05117515102028847, -0.017850622534751892, 0.02494751289486885, -0.0440993569791317, 0.038906991481781006, 0.0195444468408823, 0.005127170588821173, 0.05806594341993332, 0.04383920133113861, -0.15454156696796417, -0.012594858184456825, 0.020765090361237526, -0.07770324498414993, 0.024604426696896553, -0.10198608040809631, 0.08957310765981674, 0.06552695482969284, -0.0058302623219788074, -0.0010791860986500978, -0.020356779918074608, -0.006192083470523357, 0.016761695966124535, -0.04249633103609085, 0.062494829297065735, 0.10476178675889969, 0.022525200620293617, 0.010301838628947735, -0.16585773229599, 2.388372544407593e-33, 0.06255949288606644, 0.0051116943359375, 0.06611457467079163, 0.016588648781180382, 0.09349212050437927, 0.07914108783006668, 0.09428920596837997, -0.07620163261890411, -0.03229624032974243, 0.021221302449703217, -0.0709715187549591, 0.023335684090852737, -0.07602053880691528, -0.07240497320890427, 0.08425847440958023, -0.04553486779332161, -0.09514590352773666, 0.013926936313509941, -0.027263734489679337, -0.013599283993244171, 0.12385024130344391, -0.023882273584604263, -0.03360975161194801, 0.008337229490280151, 0.01978856511414051, 0.04657822102308273, 0.002270495519042015, -0.004058655351400375, -0.11123132705688477, 0.024998338893055916, 0.025607841089367867, -0.04509500414133072, -0.011997838504612446, -0.07183699309825897, -0.015546656213700771, -0.009330573491752148, -0.010449200868606567, -0.03390755131840706, -0.048391103744506836, -0.06309480965137482, -0.00784473679959774, -0.006236307322978973, 0.09139812737703323, -0.01725051738321781, -0.0655999705195427, 0.007455870509147644, -0.08195891976356506, -0.041908301413059235, 0.01571039855480194, 0.016237208619713783, 0.1010412871837616, -0.04731709882616997, -0.027738910168409348, -0.045602478086948395, 0.0008591606747359037, -0.0734267458319664, 0.007172123529016972, -0.03835004195570946, 0.014190523885190487, 0.05089971423149109, -0.07233642041683197, -0.032245881855487823, -0.07452918589115143, 0.025761635974049568, 0.04494621604681015, 0.005467954557389021, 0.0554577112197876, -0.004266852047294378, -0.035350434482097626, 0.14249287545681, -0.0720575600862503, 0.022076301276683807, 0.013354983180761337, 0.019864404574036598, 0.07529941201210022, -0.08061600476503372, -0.0046460265293717384, -0.06609418243169785, -0.039295658469200134, -0.03414691612124443, 0.021921340376138687, 0.08161851018667221, -0.042079947888851166, -0.013401751406490803, 0.0003208599518984556, -0.09273918718099594, 0.005303121637552977, 0.03136453777551651, -0.012478118762373924, 0.00048008820158429444, 0.013265576213598251, -0.004104027524590492, 0.03627876192331314, -0.049671076238155365, -0.07454873621463776, -4.586680876598669e-33, 0.012206096202135086, 0.06031867489218712, 0.03662357106804848, 0.013967815786600113, -0.04242461547255516, -0.02278316579759121, 0.04409455880522728, 0.04990208521485329, 0.0513635128736496, -0.027416106313467026, 0.020195601508021355, -0.025624742731451988, 0.04203828051686287, 0.018391432240605354, -0.018841633573174477, 0.01752360537648201, -0.07639529556035995, -0.08196722716093063, 0.026678433641791344, 0.07585401833057404, -0.043992120772600174, 0.01711062528192997, -0.017377402633428574, 0.010414697229862213, -0.00056530034635216, -0.03049924410879612, -0.02378097176551819, 0.006001096684485674, 0.03541647642850876, -0.020830325782299042, -0.059155941009521484, -0.03938845545053482, -0.04312808811664581, -0.05790805071592331, -0.055505428463220596, -0.05331410840153694, 0.007248579524457455, 0.06988599896430969, 0.01001056469976902, 0.022388463839888573, 0.01622450351715088, -0.026397548615932465, -0.12135662138462067, -0.02628660388290882, -0.06304813176393509, 0.01503086183220148, 0.025581656023859978, -0.02052145265042782, -0.03673141822218895, -0.05209372565150261, 0.005547842476516962, 0.0451483391225338, 0.010115946643054485, 0.08916307985782623, 0.03145373612642288, 0.00723471213132143, 0.008293349295854568, -0.04131278768181801, -0.1167149543762207, 0.02583959326148033, 0.07198988646268845, -0.1352662742137909, 0.0640864223241806, -0.06616664677858353, 0.0339389331638813, -0.04644211009144783, -0.04201158508658409, -0.028675271198153496, -0.06810101866722107, 0.06649018079042435, -0.04496237263083458, -0.06593955308198929, 0.009991821832954884, 0.08953388780355453, 0.0427151620388031, -0.05876658484339714, -0.09009752422571182, 0.026958471164107323, 0.10970521718263626, 0.08847639709711075, -0.04950524494051933, 0.029658393934369087, 0.04887194186449051, 0.004368975758552551, 0.05120786279439926, -0.023599978536367416, 0.05866888910531998, 0.1027495488524437, 0.04166799783706665, 0.000026015370167442597, -0.03808360919356346, 0.02031823620200157, 0.04315920174121857, 0.07252101600170135, -0.015863055363297462, -4.6984638402136625e-8, -0.03959066420793533, 0.013354086317121983, -0.0036326663102954626, -0.015127374790608883, -0.016378168016672134, 0.005868313368409872, -0.035997580736875534, 0.007615360897034407, 0.03529859334230423, -0.04555058106780052, 0.011446499265730381, 0.1093580573797226, -0.06736619025468826, -0.0497957244515419, -0.041020601987838745, 0.046643782407045364, 0.017450083047151566, -0.019652318209409714, 0.018028922379016876, -0.08450927585363388, -0.0014367572730407119, 0.09573372453451157, -0.03478290140628815, 0.03259008750319481, 0.00014781822392251343, -0.023708397522568703, -0.01630755141377449, 0.0431092232465744, 0.042357493191957474, 0.024403098970651627, 0.024519057944417, -0.03365330770611763, 0.0542270764708519, 0.056438084691762924, -0.07059537619352341, 0.0016289533814415336, -0.06676572561264038, 0.00899086520075798, -0.0416262187063694, -0.04191134497523308, 0.002912624040618539, -0.051680829375982285, -0.10823173075914383, -0.027967901900410652, 0.10106506198644638, 0.06508515775203705, 0.04268420860171318, -0.048691850155591965, -0.020488198846578598, 0.07284004241228104, -0.014656990766525269, 0.04765456169843674, 0.03524387255311012, -0.01372575294226408, -0.04298415780067444, 0.027324488386511803, -0.016686879098415375, 0.018824446946382523, 0.004741928074508905, -0.0695313885807991, 0.01772172749042511, -0.0706271231174469, 0.0729268342256546, 0.03082895837724209 ]
0.035231
Context length is the maximum number of tokens that the model has access to in memory. The default context length in Ollama is 4096 tokens. Tasks which require large context like web search, agents, and coding tools should be set to at least 64000 tokens. ## Setting context length Setting a larger context length will increase the amount of memory required to run a model. Ensure you have enough VRAM available to increase the context length. Cloud models are set to their maximum context length by default. ### App Change the slider in the Ollama app under settings to your desired context length. ![Context length in Ollama app](./images/ollama-settings.png) ### CLI If editing the context length for Ollama is not possible, the context length can also be updated when serving Ollama. ``` OLLAMA\_CONTEXT\_LENGTH=64000 ollama serve ``` ### Check allocated context length and model offloading For best performance, use the maximum context length for a model, and avoid offloading the model to CPU. Verify the split under `PROCESSOR` using `ollama ps`. ``` ollama ps ``` ``` NAME ID SIZE PROCESSOR CONTEXT UNTIL gemma3:latest a2af6cc3eb7f 6.6 GB 100% GPU 65536 2 minutes from now ```
https://github.com/ollama/ollama/blob/main//docs/context-length.mdx
main
ollama
[ -0.018829090520739555, -0.009186171926558018, -0.03449561074376106, 0.015096412971615791, -0.041456256061792374, -0.07671239227056503, -0.03709457814693451, 0.05911104008555412, 0.028199484571814537, -0.04018641635775566, 0.02075212076306343, -0.009222205728292465, -0.01228370051831007, -0.05267705023288727, 0.1071544960141182, 0.06301277875900269, 0.1145135909318924, -0.03885617479681969, -0.16283562779426575, 0.026404468342661858, 0.14079129695892334, 0.023856936022639275, 0.0062739611603319645, -0.006369028240442276, -0.07035090774297714, 0.02262391336262226, -0.05644180253148079, -0.03450140357017517, 0.07036229968070984, 0.006766843609511852, 0.07116986066102982, 0.010699806734919548, -0.009668903425335884, 0.06594033539295197, 0.10261083394289017, 0.05371110513806343, -0.0866166353225708, -0.11839021742343903, -0.026858868077397346, -0.01861574500799179, 0.06741205602884293, 0.02842569537460804, -0.06637652963399887, 0.01471039094030857, 0.022409772500395775, -0.027065685018897057, 0.0256861113011837, -0.05158167704939842, 0.04202699661254883, -0.01683877594769001, -0.10065501928329468, -0.03504639118909836, -0.024767449125647545, 0.003940759226679802, -0.0023177629336714745, -0.005051644053310156, 0.013128803111612797, -0.011861531063914299, 0.00205930694937706, 0.07025525718927383, -0.03467196598649025, -0.026198092848062515, -0.033469002693891525, 0.019265014678239822, 0.026875607669353485, -0.012442361563444138, 0.02220987156033516, -0.07324495166540146, -0.021500853821635246, 0.0022868968080729246, 0.00994088128209114, 0.06584548205137253, -0.04521181806921959, 0.0760529637336731, -0.007174643222242594, -0.04892520606517792, 0.05434729531407356, 0.02835110016167164, 0.034448739141225815, -0.08164091408252716, 0.051317404955625534, -0.037338510155677795, 0.03148356452584267, 0.007086075376719236, 0.02828957512974739, -0.026977991685271263, 0.021537477150559425, 0.006116147618740797, 0.10358192026615143, -0.0030134287662804127, 0.02960616908967495, -0.09433449804782867, 0.015151613391935825, -0.002523397095501423, 0.05317593365907669, -0.07357920706272125, -0.0037040633615106344, -0.02954401634633541, -0.05161996930837631, 0.06868769228458405, -0.012205548584461212, -0.05261506885290146, 0.04504283145070076, 0.09708183258771896, -0.0800224021077156, 0.039388954639434814, 0.03475265949964523, 0.1407022625207901, -0.060129858553409576, 0.03884752094745636, 0.06629864126443863, -0.014076923951506615, 0.02756533771753311, -0.012371417135000229, 0.040324997156858444, -0.0023208402562886477, -0.02766488492488861, -0.049653615802526474, 0.0012044594623148441, 0.1020415723323822, 0.05714896693825722, -0.05397958680987358, -0.004813246428966522, -0.031129218637943268, -0.07859150320291519, 0.02406281791627407, -0.025051144883036613, 5.8751791727853494e-33, 0.043463800102472305, 0.00570777989923954, -0.0028090286068618298, -0.024646930396556854, 0.06887347996234894, 0.0847904309630394, -0.001966240582987666, -0.005379184149205685, -0.08503720909357071, -0.007105838041752577, -0.0070024882443249226, 0.07136138528585434, -0.05587771534919739, 0.07459235936403275, 0.09767863899469376, -0.02158462628722191, 0.04414117708802223, 0.09582638740539551, 0.05765615031123161, 0.0024260501377284527, 0.06084177643060684, -0.10658867657184601, -0.014000831171870232, 0.007332104258239269, -0.01409825123846531, 0.03553072363138199, -0.026577705517411232, -0.029948735609650612, -0.04652446135878563, 0.018347347155213356, 0.05333934724330902, 0.024380987510085106, -0.033896978944540024, 0.008737904950976372, 0.04293984919786453, -0.012708253227174282, -0.05031925067305565, -0.04142264649271965, -0.03462614119052887, -0.09401262551546097, 0.0005686322692781687, 0.06883689761161804, 0.016863400116562843, -0.005293866153806448, -0.13147945702075958, -0.06318479031324387, -0.007492394186556339, -0.011043624952435493, -0.011848209425807, 0.06329381465911865, 0.04657687991857529, 0.04710149019956589, -0.029689425602555275, -0.018124159425497055, 0.02826589159667492, -0.045764531940221786, 0.03919043019413948, -0.04666193574666977, 0.12368515878915787, 0.03784465044736862, -0.04428556561470032, -0.07442514598369598, 0.021347684785723686, 0.058630865067243576, 0.05731926113367081, 0.0206009428948164, -0.027123229578137398, 0.04077599197626114, 0.01894504204392433, -0.005136449355632067, -0.06546017527580261, -0.03768635913729668, 0.030643923208117485, 0.07688068598508835, -0.020162874832749367, -0.1276479959487915, 0.005292207468301058, -0.026784710586071014, -0.15352384746074677, 0.02815289981663227, 0.021216977387666702, 0.02858944609761238, 0.02941976860165596, -0.039067644625902176, -0.04989219084382057, -0.030836937949061394, -0.023132899776101112, -0.008009742014110088, -0.0901184156537056, -0.0015273106982931495, 0.0200794767588377, -0.02523227594792843, 0.004230759106576443, 0.020741116255521774, -0.060647230595350266, -5.20842151192567e-33, 0.004129001405090094, -0.05040056258440018, -0.03453899547457695, 0.00932245422154665, 0.060546908527612686, -0.07197881489992142, 0.02749510668218136, 0.12493970990180969, -0.07481318712234497, -0.04116832837462425, 0.011977196671068668, -0.016148027032613754, 0.07077225297689438, 0.015733938664197922, 0.02427380345761776, -0.015058675780892372, -0.024626856669783592, -0.06502829492092133, 0.03375963866710663, 0.007776711601763964, -0.010712900198996067, 0.00499655120074749, -0.023756923153996468, 0.0020391992293298244, 0.03369904309511185, 0.020067773759365082, -0.0896734669804573, -0.03169762343168259, 0.0018287441926077008, -0.011035080999135971, -0.057001519948244095, 0.040398865938186646, -0.056511297821998596, 0.0016659446991980076, -0.04290780797600746, 0.014873075298964977, 0.0010312923695892096, 0.00458553247153759, 0.010937417857348919, 0.05841132625937462, 0.1125185415148735, 0.004274364095181227, 0.01235282327979803, -0.03495068475604057, -0.03805699199438095, 0.06607166677713394, 0.0019964100793004036, -0.042471930384635925, -0.04142565652728081, -0.031764961779117584, 0.0029910460580140352, 0.01308872178196907, -0.025991538539528847, 0.0027049914933741093, 0.04980536922812462, -0.07146359980106354, -0.0015209673438221216, -0.0862760841846466, 0.014785238541662693, -0.13155072927474976, 0.10236980020999908, -0.03349018096923828, 0.0015433923108503222, -0.011793386191129684, 0.02188984304666519, -0.007068672217428684, -0.021544191986322403, 0.02349700592458248, -0.025056110695004463, -0.027254581451416016, -0.13077963888645172, -0.030851470306515694, -0.008569558151066303, 0.05076172202825546, -0.054548539221286774, 0.017197908833622932, -0.11599437892436981, -0.07348231226205826, 0.08319734781980515, 0.029838567599654198, -0.09138469398021698, 0.04195161536335945, 0.005677448119968176, 0.01551123894751072, 0.007643275894224644, 0.04729115590453148, 0.06587602198123932, 0.10082586109638214, -0.023028908297419548, 0.0631750300526619, -0.040506936609745026, -0.028040820732712746, 0.051530275493860245, 0.13505366444587708, -0.017806490883231163, -4.740626025068195e-8, -0.03124118037521839, 0.02420365810394287, 0.015375865623354912, 0.002455777721479535, 0.015441029332578182, -0.016482550650835037, 0.033086519688367844, 0.08723094314336777, 0.05638283118605614, 0.04483494535088539, 0.06586591899394989, 0.04814400151371956, -0.03788777068257332, 0.03221731260418892, -0.017009370028972626, 0.01891433447599411, 0.0006577713065780699, -0.020822685211896896, 0.014668532647192478, -0.052728574723005295, 0.06035738065838814, -0.009255604818463326, 0.02261682040989399, 0.026060838252305984, 0.0318789929151535, -0.06218656525015831, -0.015903400257229805, 0.14153291285037994, -0.06750674545764923, -0.09127122908830643, -0.03495708107948303, -0.0019367084605619311, -0.014029367826879025, -0.05789022147655487, -0.09741269797086716, 0.002468859776854515, -0.02164517156779766, -0.03236183524131775, -0.017002148553729057, -0.006897422485053539, 0.06890001893043518, -0.022745512425899506, 0.03311173617839813, -0.03705626353621483, 0.07377298176288605, 0.09335111081600189, 0.05672367662191391, -0.021078109741210938, -0.041023749858140945, 0.023933501914143562, -0.016048923134803772, -0.027655627578496933, -0.03817597031593323, 0.08360908925533295, 0.0003128575044684112, -0.09025614708662033, 0.005243539344519377, -0.01775001734495163, -0.004034459125250578, 0.031088195741176605, -0.0027201620396226645, -0.0019668135792016983, -0.010654698126018047, -0.011754857376217842 ]
0.127803
Ollama provides a powerful templating engine backed by Go's built-in templating engine to construct prompts for your large language model. This feature is a valuable tool to get the most out of your models. ## Basic Template Structure A basic Go template consists of three main parts: - \*\*Layout\*\*: The overall structure of the template. - \*\*Variables\*\*: Placeholders for dynamic data that will be replaced with actual values when the template is rendered. - \*\*Functions\*\*: Custom functions or logic that can be used to manipulate the template's content. Here's an example of a simple chat template: ```gotmpl {{- range .Messages }} {{ .Role }}: {{ .Content }} {{- end }} ``` In this example, we have: - A basic messages structure (layout) - Three variables: `Messages`, `Role`, and `Content` (variables) - A custom function (action) that iterates over an array of items (`range .Messages`) and displays each item ## Adding templates to your model By default, models imported into Ollama have a default template of `{{ .Prompt }}`, i.e. user inputs are sent verbatim to the LLM. This is appropriate for text or code completion models but lacks essential markers for chat or instruction models. Omitting a template in these models puts the responsibility of correctly templating input onto the user. Adding a template allows users to easily get the best results from the model. To add templates in your model, you'll need to add a `TEMPLATE` command to the Modelfile. Here's an example using Meta's Llama 3. ```dockerfile FROM llama3.2 TEMPLATE """{{- if .System }}<|start\_header\_id|>system<|end\_header\_id|> {{ .System }}<|eot\_id|> {{- end }} {{- range .Messages }}<|start\_header\_id|>{{ .Role }}<|end\_header\_id|> {{ .Content }}<|eot\_id|> {{- end }}<|start\_header\_id|>assistant<|end\_header\_id|> """ ``` ## Variables `System` (string): system prompt `Prompt` (string): user prompt `Response` (string): assistant response `Suffix` (string): text inserted after the assistant's response `Messages` (list): list of messages `Messages[].Role` (string): role which can be one of `system`, `user`, `assistant`, or `tool` `Messages[].Content` (string): message content `Messages[].ToolCalls` (list): list of tools the model wants to call `Messages[].ToolCalls[].Function` (object): function to call `Messages[].ToolCalls[].Function.Name` (string): function name `Messages[].ToolCalls[].Function.Arguments` (map): mapping of argument name to argument value `Tools` (list): list of tools the model can access `Tools[].Type` (string): schema type. `type` is always `function` `Tools[].Function` (object): function definition `Tools[].Function.Name` (string): function name `Tools[].Function.Description` (string): function description `Tools[].Function.Parameters` (object): function parameters `Tools[].Function.Parameters.Type` (string): schema type. `type` is always `object` `Tools[].Function.Parameters.Required` (list): list of required properties `Tools[].Function.Parameters.Properties` (map): mapping of property name to property definition `Tools[].Function.Parameters.Properties[].Type` (string): property type `Tools[].Function.Parameters.Properties[].Description` (string): property description `Tools[].Function.Parameters.Properties[].Enum` (list): list of valid values ## Tips and Best Practices Keep the following tips and best practices in mind when working with Go templates: - \*\*Be mindful of dot\*\*: Control flow structures like `range` and `with` changes the value `.` - \*\*Out-of-scope variables\*\*: Use `$.` to reference variables not currently in scope, starting from the root - \*\*Whitespace control\*\*: Use `-` to trim leading (`{{-`) and trailing (`-}}`) whitespace ## Examples ### Example Messages #### ChatML ChatML is a popular template format. It can be used for models such as Databrick's DBRX, Intel's Neural Chat, and Microsoft's Orca 2. ```go {{- range .Messages }}<|im\_start|>{{ .Role }} {{ .Content }}<|im\_end|> {{ end }}<|im\_start|>assistant ``` ### Example Tools Tools support can be added to a model by adding a `{{ .Tools }}` node to the template. This feature is useful for models trained to call external tools and can a powerful tool for retrieving real-time data or performing complex tasks. #### Mistral Mistral v0.3 and Mixtral 8x22B supports tool calling. ```go {{- range $index, $\_ := .Messages }} {{- if eq .Role "user" }} {{- if and (le (len
https://github.com/ollama/ollama/blob/main//docs/template.mdx
main
ollama
[ -0.003434383776038885, 0.059265945106744766, 0.019653258845210075, 0.04601706191897392, -0.007986130192875862, 0.024331847205758095, 0.018331807106733322, 0.008220558054745197, 0.03514811396598816, -0.06604050099849701, -0.03548954799771309, -0.02116565965116024, -0.06656163185834885, 0.08232580870389938, 0.10761696845293045, -0.0025722028221935034, 0.06470608711242676, -0.005227404646575451, -0.030277524143457413, -0.04793952777981758, 0.04727637395262718, 0.07387009263038635, 0.059671249240636826, 0.05072041600942612, -0.0025390428490936756, 0.045739155262708664, 0.013723716139793396, -0.01588178053498268, 0.080403633415699, -0.013490023091435432, 0.021351980045437813, -0.003850845154374838, 0.05499354377388954, 0.06392238289117813, -0.02355264499783516, 0.03779344633221626, 0.016134100034832954, -0.06939335912466049, -0.0028160284273326397, -0.03454288840293884, -0.06543538719415665, 0.03780466690659523, -0.07372124493122101, -0.04057876765727997, 0.07821924239397049, -0.09365212172269821, -0.02777491882443428, -0.010227019898593426, -0.04220433533191681, 0.02473611757159233, -0.08656801283359528, -0.09118404984474182, 0.0038085803389549255, 0.011759037151932716, 0.042409855872392654, 0.05268154293298721, 0.017449017614126205, -0.05063040554523468, -0.01594606228172779, -0.001173160271719098, -0.07411255687475204, 0.010796952061355114, -0.01221227552741766, 0.020406365394592285, -0.004160523880273104, 0.04035433754324913, -0.01266926247626543, 0.06791536509990692, -0.012348109856247902, 0.049266573041677475, -0.05444706603884697, -0.009242882020771503, 0.0584561713039875, 0.041193410754203796, -0.02548000030219555, 0.015412532724440098, 0.002690761350095272, -0.014117888174951077, -0.016685726121068, -0.004616956226527691, 0.015524135902523994, 0.01057632640004158, 0.006521145347505808, 0.010712278075516224, 0.03565448895096779, -0.02920735813677311, -0.009414535015821457, 0.08352309465408325, 0.09232731908559799, -0.015042167156934738, 0.009216057136654854, -0.06838099658489227, 0.06362708657979965, 0.01898748241364956, -0.007755481172353029, 0.05509672313928604, 0.026081467047333717, -0.0843198373913765, 0.052931804209947586, 0.05459900572896004, -0.007733088452368975, -0.05726687237620354, 0.10111537575721741, -0.08467373251914978, -0.0418899841606617, -0.013259729370474815, 0.042830802500247955, 0.03836778551340103, -0.04016132280230522, -0.00760235171765089, -0.044219616800546646, 0.003999308682978153, 0.0018063377356156707, -0.03308805078268051, -0.00044101907406002283, -0.08609940856695175, 0.06560533493757248, -0.08004796504974365, 0.009064850397408009, 0.05439356714487076, 0.10337468236684799, -0.02501721680164337, 0.013782634399831295, 0.09314929693937302, 0.05697200074791908, 0.020459672436118126, -0.04852619394659996, 6.525590850012875e-33, 0.14085307717323303, 0.05349486321210861, -0.056600604206323624, 0.1633509397506714, 0.0706213191151619, 0.07690159231424332, 0.0351187102496624, -0.040167395025491714, -0.047680459916591644, 0.01399679109454155, 0.0004566686984617263, 0.04609011858701706, -0.025380916893482208, 0.06286615133285522, -0.020691566169261932, -0.02701699174940586, -0.03381509333848953, 0.08309251070022583, 0.07172421365976334, -0.00797556433826685, 0.026358939707279205, -0.01909555494785309, 0.02190322056412697, 0.0373850092291832, 0.09440140426158905, 0.1430625319480896, -0.009253761731088161, -0.0727057158946991, -0.11211920529603958, -0.02436036430299282, 0.07581707835197449, -0.08466064929962158, -0.029802048578858376, 0.021024910733103752, 0.06839817762374878, -0.011836393736302853, -0.06530214101076126, -0.05977737158536911, -0.010328925214707851, -0.0075339325703680515, 0.01916339062154293, -0.04224090650677681, -0.012550479732453823, 0.02361057512462139, -0.07538995891809464, -0.025289027020335197, -0.03532415255904198, 0.03052162379026413, -0.020078744739294052, -0.052415359765291214, -0.021431125700473785, -0.008910301141440868, -0.0687294751405716, 0.03942437469959259, 0.023121478036046028, -0.06296616047620773, -0.006857298314571381, 0.026968330144882202, 0.10485417395830154, 0.016589490696787834, -0.03654151409864426, 0.02596343494951725, 0.009693647734820843, -0.03465714305639267, 0.08837543427944183, -0.018437087535858154, -0.06299251317977905, -0.021226102486252785, 0.06375174224376678, -0.032124124467372894, -0.0371757335960865, -0.00755680026486516, 0.010298773646354675, 0.0602872334420681, -0.09803032130002975, -0.03925521671772003, -0.05375930666923523, -0.0655038133263588, 0.03693128377199173, 0.012228744104504585, -0.03735429421067238, -0.04548777639865875, 0.023729883134365082, -0.024057552218437195, 0.04146914556622505, -0.04433838650584221, 0.06965292990207672, -0.05378079041838646, -0.02223498560488224, -0.035552117973566055, -0.03294987976551056, -0.04115802422165871, -0.0008884423295967281, -0.07512007653713226, 0.030853983014822006, -6.286194078628224e-33, 0.028172221034765244, -0.018085412681102753, -0.03136638551950455, 0.013121777214109898, 0.008651630952954292, -0.06218583509325981, 0.05330400913953781, 0.07483592629432678, -0.007649121340364218, -0.014217942953109741, -0.07276787608861923, -0.06867367774248123, 0.0829913318157196, 0.010389734990894794, 0.0660119354724884, -0.009998873807489872, -0.04529181495308876, -0.07260606437921524, 0.0794578492641449, 0.0002843437541741878, -0.0700751468539238, -0.019737347960472107, -0.09434689581394196, 0.02950918674468994, 0.03289281949400902, 0.03159226477146149, -0.01782449521124363, -0.05662745609879494, -0.022398600354790688, 0.022017648443579674, -0.042701151221990585, -0.027527472004294395, -0.039755742996931076, -0.007687813136726618, -0.020861882716417313, 0.03661728650331497, -0.001220886129885912, 0.03227927163243294, 0.005007136147469282, 0.07009533792734146, 0.08284410089254379, -0.07061495631933212, -0.05825559049844742, -0.03885882347822189, -0.1003209576010704, 0.10598742961883545, -0.1057371273636818, 0.023879798129200935, -0.039636120200157166, -0.06268550455570221, 0.010234290733933449, -0.026943758130073547, -0.05236685276031494, -0.068844735622406, -0.003624493256211281, -0.0879124328494072, 0.006001986097544432, -0.13954955339431763, -0.017481457442045212, -0.03803202509880066, -0.01611153781414032, -0.049393124878406525, 0.06421216577291489, -0.061426252126693726, 0.03160874545574188, -0.10746877640485764, -0.017723750323057175, -0.039270732551813126, -0.0030524227768182755, -0.04768279194831848, 0.023080049082636833, -0.1212158203125, -0.03518124669790268, 0.06257354468107224, 0.054500382393598557, -0.004074483178555965, -0.04437233507633209, -0.034875545650720596, 0.04374012351036072, -0.0028270119801163673, 0.02721334621310234, -0.025174040347337723, 0.04961111396551132, 0.03898843377828598, 0.06078268960118294, 0.025693150237202644, -0.015812208876013756, 0.12965649366378784, -0.004140789154917002, 0.053952306509017944, -0.03339560702443123, 0.04526994749903679, 0.01603827066719532, 0.15067768096923828, 0.02816234901547432, -6.094149540558647e-8, -0.11723984777927399, -0.04499175772070885, 0.01875847578048706, 0.027955427765846252, -0.010247153230011463, 0.009543863125145435, 0.055758919566869736, 0.017535177990794182, 0.019889891147613525, 0.023304644972085953, -0.02019946277141571, -0.004991687834262848, -0.023776035755872726, -0.07203035056591034, -0.004818780813366175, 0.07442982494831085, -0.06616363674402237, 0.030100148171186447, -0.012725397013127804, -0.07457595318555832, 0.09101876616477966, 0.05085163936018944, -0.04384031146764755, 0.035917237401008606, 0.04194410517811775, 0.013096521608531475, -0.06919388473033905, 0.08454126864671707, -0.022675566375255585, -0.04450423642992973, 0.02360895276069641, -0.03474370017647743, -0.009597000665962696, 0.07715919613838196, 0.008583691902458668, 0.007218807470053434, -0.006860942579805851, -0.05238312855362892, -0.0071297562681138515, 0.02545139379799366, 0.07401315867900848, 0.009118217043578625, -0.09606672078371048, -0.032435011118650436, 0.017773685976862907, 0.022894619032740593, -0.013163020834326744, -0.13153545558452606, 0.02561471424996853, -0.02299269661307335, -0.0060410285368561745, -0.014926406554877758, -0.06999827176332474, 0.07648047804832458, -0.061892252415418625, -0.035909708589315414, 0.011191354133188725, 0.037287481129169464, 0.04208701103925705, 0.036691371351480484, -0.029628712683916092, 0.028934653848409653, 0.039460569620132446, -0.04262193292379379 ]
0.13127
useful for models trained to call external tools and can a powerful tool for retrieving real-time data or performing complex tasks. #### Mistral Mistral v0.3 and Mixtral 8x22B supports tool calling. ```go {{- range $index, $\_ := .Messages }} {{- if eq .Role "user" }} {{- if and (le (len (slice $.Messages $index)) 2) $.Tools }}[AVAILABLE\_TOOLS] {{ json $.Tools }}[/AVAILABLE\_TOOLS] {{- end }}[INST] {{ if and (eq (len (slice $.Messages $index)) 1) $.System }}{{ $.System }} {{ end }}{{ .Content }}[/INST] {{- else if eq .Role "assistant" }} {{- if .Content }} {{ .Content }} {{- else if .ToolCalls }}[TOOL\_CALLS] [ {{- range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ json .Function.Arguments }}} {{- end }}] {{- end }} {{- else if eq .Role "tool" }}[TOOL\_RESULTS] {"content": {{ .Content }}}[/TOOL\_RESULTS] {{- end }} {{- end }} ``` ### Example Fill-in-Middle Fill-in-middle support can be added to a model by adding a `{{ .Suffix }}` node to the template. This feature is useful for models that are trained to generate text in the middle of user input, such as code completion models. #### CodeLlama CodeLlama [7B](https://ollama.com/library/codellama:7b-code) and [13B](https://ollama.com/library/codellama:13b-code) code completion models support fill-in-middle. ```go ``` {{ .Prompt }} {{ .Suffix }} ``` CodeLlama 34B and 70B code completion and all instruct and Python fine-tuned models do not support fill-in-middle. #### Codestral Codestral [22B](https://ollama.com/library/codestral:22b) supports fill-in-middle. ```gotmpl [SUFFIX]{{ .Suffix }}[PREFIX] {{ .Prompt }} ``` ```
https://github.com/ollama/ollama/blob/main//docs/template.mdx
main
ollama
[ -0.06856029480695724, 0.052831538021564484, 0.01850089244544506, 0.06856746226549149, 0.055745068937540054, -0.049720730632543564, 0.09846999496221542, 0.0014336345484480262, 0.050857383757829666, -0.09451466798782349, 0.04247032850980759, -0.043739739805459976, -0.03941496089100838, 0.04344252496957779, 0.06974002718925476, 0.04269292578101158, 0.0023784353397786617, -0.032135337591171265, -0.0379265658557415, -0.08909862488508224, 0.022534051910042763, 0.08113038539886475, -0.05965770408511162, -0.014870022423565388, -0.07992741465568542, 0.0439874492585659, -0.046927470713853836, -0.06892373412847519, 0.024092916399240494, -0.06426209956407547, 0.06868599355220795, 0.05631426349282265, -0.030865956097841263, 0.03720396012067795, 0.016563184559345245, 0.0979316309094429, 0.035553138703107834, -0.04776228964328766, 0.019202809780836105, -0.06044340506196022, 0.07193246483802795, 0.027881674468517303, -0.014104501344263554, -0.12001556158065796, 0.007383269723504782, -0.034994885325431824, -0.008919140323996544, -0.040221985429525375, -0.01961882784962654, 0.026072902604937553, -0.030387014150619507, -0.05401316285133362, 0.007399697322398424, 0.07591026276350021, 0.014867068268358707, -0.00045830043382011354, -0.03593163937330246, -0.01190962828695774, -0.06940170377492905, -0.04127960279583931, -0.018252814188599586, 0.012329824268817902, -0.09676313400268555, -0.042954254895448685, -0.04222416877746582, -0.009486767463386059, -0.06958486884832382, 0.06235174834728241, 0.003289156826213002, -0.01128052081912756, 0.010198293253779411, -0.009037348441779613, -0.06460244953632355, 0.015438612550497055, 0.05155550315976143, 0.008580563589930534, 0.028401492163538933, -0.022349722683429718, 0.004218332935124636, -0.07618172466754913, -0.0028333934023976326, 0.006257425528019667, -0.006610521115362644, 0.04564468190073967, 0.000702181423548609, 0.03490593284368515, -0.04308031499385834, 0.03331980109214783, 0.10036849230527878, -0.03774441406130791, 0.0028948558028787374, -0.038525644689798355, 0.029750529676675797, 0.035305123776197433, 0.06372040510177612, 0.09754189848899841, -0.008455499075353146, -0.02032439410686493, -0.05819616839289665, 0.11400122195482254, -0.04167485609650612, -0.02101876400411129, 0.04894212260842323, -0.041009463369846344, 0.019046442583203316, 0.04371274635195732, 0.002082488965243101, -0.0251909326761961, -0.03323359414935112, 0.016427166759967804, -0.03140316903591156, 0.05668151006102562, -0.04586964473128319, -0.03876105323433876, 0.05431239306926727, -0.046012893319129944, 0.014037786982953548, -0.014608783647418022, -0.027008939534425735, 0.020860517397522926, 0.13651958107948303, 0.023617397993803024, 0.024075794965028763, 0.0967569425702095, 0.13307639956474304, 0.01917095296084881, -0.0030122254975140095, 4.02415172843251e-33, 0.0677141398191452, 0.0031846764031797647, 0.013801032677292824, 0.05564750358462334, 0.05990096181631088, 0.02700807712972164, 0.08360426127910614, -0.009895047172904015, -0.04170706495642662, 0.07788959890604019, -0.07479611784219742, 0.08383121341466904, -0.06942574679851532, -0.018348831683397293, -0.017739951610565186, -0.021770095452666283, -0.004357736092060804, 0.05566222965717316, 0.022088881582021713, 0.029864847660064697, 0.01074209064245224, -0.03656231611967087, -0.08657190948724747, 0.07380040735006332, 0.04202757403254509, 0.005530002061277628, 0.03968784585595131, 0.0026938451919704676, -0.014359560795128345, -0.005383454728871584, 0.0074170841835439205, 0.010975276120007038, 0.054704755544662476, 0.03434194624423981, 0.026626283302903175, 0.0482274629175663, -0.04117003455758095, -0.019844628870487213, 0.0027322256937623024, 0.004995296709239483, 0.07100336998701096, -0.009102458134293556, -0.031628865748643875, -0.06475508958101273, -0.12335638701915741, -0.12477648258209229, -0.059947654604911804, -0.006048374343663454, 0.040940556675195694, -0.00942393857985735, -0.04398910701274872, 0.04089197888970375, 0.03148013725876808, 0.023626208305358887, 0.04205825552344322, -0.04230888560414314, 0.011731784790754318, 0.16145679354667664, 0.05824945122003555, -0.04213649034500122, 0.01898941770195961, -0.0026819065678864717, -0.005004501435905695, 0.062317684292793274, 0.08071892708539963, -0.046699266880750656, -0.029476556926965714, 0.019086288288235664, 0.07977863401174545, -0.008712836541235447, -0.09126604348421097, -0.01442001573741436, 0.03269738331437111, -0.021887877956032753, 0.04692286252975464, -0.14660345017910004, -0.016593871638178825, -0.027597051113843918, 0.05633275583386421, 0.06377675384283066, -0.03474785387516022, 0.006027836352586746, 0.01982586830854416, 0.05983379855751991, -0.012382926419377327, -0.022652611136436462, -0.01736382581293583, -0.039105478674173355, -0.060655172914266586, -0.016127927228808403, -0.07747223973274231, 0.0021213237196207047, 0.005435182247310877, 0.005972659680992365, -0.034681931138038635, -4.292336723810784e-33, 0.06583868712186813, -0.03926315903663635, 0.023442581295967102, 0.019735803827643394, 0.030124375596642494, -0.05509055405855179, 0.07136330753564835, 0.011038370430469513, -0.0069902315735816956, 0.005731130950152874, -0.02579813078045845, 0.028991062194108963, 0.008955685421824455, -0.055020276457071304, 0.06274238973855972, 0.0809117928147316, -0.08324366062879562, -0.13100214302539825, 0.10072597861289978, 0.011043673381209373, -0.050843242555856705, 0.05297831818461418, 0.013477525673806667, 0.027908416464924812, -0.09812896698713303, -0.06757739186286926, 0.04104083776473999, -0.006102286744862795, -0.038586392998695374, -0.014389503747224808, -0.007951402105391026, -0.02019309066236019, -0.011788236908614635, -0.009957856498658657, -0.04093566909432411, -0.06588121503591537, -0.007199976593255997, 0.063068687915802, -0.040736280381679535, 0.05609762296080589, 0.08338085561990738, 0.00021814042702317238, -0.09239301085472107, -0.04735659435391426, -0.03641372174024582, 0.055319610983133316, 0.0005120331770740449, -0.023380707949399948, -0.043705690652132034, -0.06845179945230484, 0.054250169545412064, -0.008055873215198517, -0.047083716839551926, 0.05408582463860512, -0.022071829065680504, -0.06182563304901123, 0.022067109122872353, -0.1357368528842926, -0.014261693693697453, 0.009938078001141548, -0.03227078542113304, -0.06080368906259537, 0.0004093949683010578, -0.07677280902862549, 0.025215083733201027, -0.029970305040478706, -0.0680481567978859, -0.015076487325131893, -0.008145780302584171, -0.011771232821047306, 0.07490110397338867, -0.08754909038543701, 0.04863228648900986, -0.018861575052142143, 0.035008061677217484, -0.04984502121806145, -0.05412750318646431, -0.08673043549060822, 0.0361628457903862, -0.005732490681111813, -0.05519850179553032, -0.0449836328625679, -0.015156881883740425, 0.040186792612075806, -0.005180405452847481, 0.058860715478658676, -0.022764848545193672, 0.12546150386333466, -0.024096636101603508, 0.06850413233041763, -0.039653073996305466, -0.03675394132733345, 0.05192200094461441, 0.11228111386299133, -0.005824591964483261, -5.681383541400464e-8, -0.0736892893910408, 0.012468241155147552, -0.04335853457450867, 0.018729111179709435, -0.09698234498500824, 0.04731116443872452, 0.017391061410307884, 0.027155673131346703, 0.017898591235280037, 0.05630241706967354, 0.05277916043996811, -0.05536407232284546, 0.03742456063628197, -0.03903447836637497, 0.07408025115728378, 0.010210132226347923, 0.0020222424063831568, 0.05839569494128227, -0.05825549364089966, -0.017119944095611572, 0.1641809344291687, 0.06389101594686508, 0.03132830560207367, -0.051652614027261734, 0.032296374440193176, 0.03700687363743782, -0.08601225912570953, 0.003166258567944169, -0.06256476789712906, 0.03084559738636017, -0.0021577426232397556, 0.011525610461831093, 0.010472633875906467, 0.08305726945400238, 0.05029922351241112, -0.024935780093073845, -0.03309877961874008, -0.045935697853565216, 0.013468299061059952, 0.029846446588635445, 0.0842391699552536, 0.09401173144578934, -0.1257983148097992, -0.005245482549071312, 0.028974393382668495, -0.04224451631307602, 0.02374020405113697, -0.060588594526052475, 0.03453380987048149, -0.006605905015021563, 0.004233284387737513, 0.009587278589606285, -0.03297899663448334, 0.056510817259550095, -0.003443443449214101, -0.03581030294299126, 0.07163494825363159, -0.017439723014831543, 0.0013598797377198935, 0.001262037199921906, 0.009776078164577484, -0.03885895386338234, -0.0358244962990284, -0.01861483044922352 ]
0.100516
Ollama runs as a native Windows application, including NVIDIA and AMD Radeon GPU support. After installing Ollama for Windows, Ollama will run in the background and the `ollama` command line is available in `cmd`, `powershell` or your favorite terminal application. As usual the Ollama [API](/api) will be served on `http://localhost:11434`. ## System Requirements - Windows 10 22H2 or newer, Home or Pro - NVIDIA 452.39 or newer Drivers if you have an NVIDIA card - AMD Radeon Driver https://www.amd.com/en/support if you have a Radeon card Ollama uses unicode characters for progress indication, which may render as unknown squares in some older terminal fonts in Windows 10. If you see this, try changing your terminal font settings. ## Filesystem Requirements The Ollama install does not require Administrator, and installs in your home directory by default. You'll need at least 4GB of space for the binary install. Once you've installed Ollama, you'll need additional space for storing the Large Language models, which can be tens to hundreds of GB in size. If your home directory doesn't have enough space, you can change where the binaries are installed, and where the models are stored. ### Changing Install Location To install the Ollama application in a location different than your home directory, start the installer with the following flag ```powershell OllamaSetup.exe /DIR="d:\some\location" ``` ### Changing Model Location To change where Ollama stores the downloaded models instead of using your home directory, set the environment variable `OLLAMA\_MODELS` in your user account. 1. Start the Settings (Windows 11) or Control Panel (Windows 10) application and search for \_environment variables\_. 2. Click on \_Edit environment variables for your account\_. 3. Edit or create a new variable for your user account for `OLLAMA\_MODELS` where you want the models stored 4. Click OK/Apply to save. If Ollama is already running, Quit the tray application and relaunch it from the Start menu, or a new terminal started after you saved the environment variables. ## API Access Here's a quick example showing API access from `powershell` ```powershell (Invoke-WebRequest -method POST -Body '{"model":"llama3.2", "prompt":"Why is the sky blue?", "stream": false}' -uri http://localhost:11434/api/generate ).Content | ConvertFrom-json ``` ## Troubleshooting Ollama on Windows stores files in a few different locations. You can view them in the explorer window by hitting `+R` and type in: - `explorer %LOCALAPPDATA%\Ollama` contains logs, and downloaded updates - \_app.log\_ contains most resent logs from the GUI application - \_server.log\_ contains the most recent server logs - \_upgrade.log\_ contains log output for upgrades - `explorer %LOCALAPPDATA%\Programs\Ollama` contains the binaries (The installer adds this to your user PATH) - `explorer %HOMEPATH%\.ollama` contains models and configuration - `explorer %TEMP%` contains temporary executable files in one or more `ollama\*` directories ## Uninstall The Ollama Windows installer registers an Uninstaller application. Under `Add or remove programs` in Windows Settings, you can uninstall Ollama. If you have [changed the OLLAMA\_MODELS location](#changing-model-location), the installer will not remove your downloaded models ## Standalone CLI The easiest way to install Ollama on Windows is to use the `OllamaSetup.exe` installer. It installs in your account without requiring Administrator rights. We update Ollama regularly to support the latest models, and this installer will help you keep up to date. If you'd like to install or integrate Ollama as a service, a standalone `ollama-windows-amd64.zip` zip file is available containing only the Ollama CLI and GPU library dependencies for Nvidia. If you have an AMD GPU, also download and extract the additional ROCm package `ollama-windows-amd64-rocm.zip` into the same directory. This allows for embedding Ollama in existing applications, or running it as a system service via `ollama serve` with tools such as [NSSM](https://nssm.cc/).
https://github.com/ollama/ollama/blob/main//docs/windows.mdx
main
ollama
[ -0.03704298287630081, 0.009693422354757786, -0.07612410932779312, 0.026360860094428062, -0.012943378649652004, -0.05005386099219322, -0.06873771548271179, 0.025499261915683746, -0.02805541455745697, -0.050722528249025345, 0.0050880927592515945, 0.023842962458729744, -0.0818113312125206, 0.04874975234270096, 0.03601803630590439, 0.11030758917331696, 0.06636884808540344, -0.08075248450040817, -0.059014227241277695, 0.04592297226190567, 0.049795109778642654, -0.02541400119662285, 0.008297586813569069, -0.007633274886757135, 0.040444500744342804, 0.026355678215622902, -0.01809014566242695, 0.010973204858601093, 0.02588466927409172, 0.04457937553524971, 0.03306029364466667, -0.04285481944680214, 0.05612998828291893, 0.04387345537543297, 0.024821165949106216, -0.03511684387922287, 0.024815350770950317, -0.11807223409414291, -0.09791933745145798, -0.060749322175979614, 0.07878339290618896, 0.039085645228624344, -0.032319117337465286, -0.022484654560685158, 0.033699847757816315, -0.08889079093933105, 0.05515250191092491, -0.028224458917975426, 0.012841282412409782, -0.04256322607398033, -0.006982119288295507, -0.028398048132658005, 0.05233198404312134, -0.055553607642650604, -0.0003342546406202018, 0.044009190052747726, -0.006591471843421459, -0.08061979711055756, -0.000536038598511368, 0.03917781263589859, 0.03296367824077606, 0.010458167642354965, -0.030594175681471825, 0.05248229205608368, -0.0019931145943701267, 0.010881137102842331, -0.02879904769361019, -0.04824991524219513, -0.0030786702409386635, -0.11185440421104431, 0.004905397072434425, 0.022466493770480156, -0.011706037446856499, -0.012041456997394562, -0.05643802508711815, -0.03819184750318527, 0.10703939199447632, -0.005782380234450102, -0.014331698417663574, 0.003911455627530813, -0.02541804127395153, -0.01627119444310665, 0.06287417560815811, -0.03385152295231819, 0.08156130462884903, 0.04843433201313019, 0.009998729452490807, 0.054842811077833176, -0.005025090184062719, -0.047566741704940796, -0.050027210265398026, -0.06990236788988113, 0.01941259391605854, -0.03639385849237442, 0.03587819263339043, -0.042914800345897675, 0.11809661984443665, -0.03365905582904816, -0.039165034890174866, 0.06323568522930145, -0.04545401781797409, -0.06839215755462646, 0.07106949388980865, 0.0815923810005188, -0.07837647944688797, 0.03667045012116432, 0.12471959739923477, 0.08312880992889404, -0.04245631396770477, 0.010744398459792137, 0.08343321830034256, -0.08229483664035797, -0.01254383847117424, -0.017421331256628036, -0.013300560414791107, 0.043387267738580704, -0.08596272021532059, -0.017925824970006943, -0.05064339190721512, -0.005646051838994026, -0.04066355898976326, -0.12409545481204987, -0.008104145526885986, -0.056220732629299164, 0.07412058115005493, 0.09638584405183792, 0.008730934001505375, 5.486809430927097e-33, 0.08687625080347061, -0.014590071514248848, -0.024441976100206375, 0.0036114961840212345, 0.007525150664150715, 0.08507538586854935, -0.016851186752319336, -0.05614950507879257, 0.021517526358366013, -0.05698227137327194, 0.018221266567707062, 0.032255735248327255, -0.026068655773997307, 0.1037258580327034, 0.037253137677907944, -0.02006613463163376, 0.024629270657896996, 0.015603243373334408, 0.021442143246531487, -0.01261400617659092, 0.0389220230281353, 0.03706304728984833, 0.020458413287997246, -0.012278052978217602, -0.08151091635227203, 0.02541821263730526, -0.08102460205554962, 0.043328750878572464, 0.029802989214658737, 0.04497067630290985, 0.10154008120298386, 0.06374236941337585, -0.07873687148094177, -0.048941612243652344, 0.0063442266546189785, 0.02217129059135914, -0.07277239859104156, -0.04379083216190338, 0.012649874202907085, 0.028100013732910156, -0.030601773411035538, 0.05208289995789528, 0.000024216198653448373, -0.031466979533433914, 0.02765059471130371, 0.021125176921486855, 0.031805213540792465, -0.044175345450639725, -0.024797532707452774, 0.03627747669816017, -0.1287994384765625, 0.10870975255966187, -0.0522332638502121, 0.0684613436460495, 0.055307745933532715, -0.039713095873594284, 0.05285917967557907, -0.022964468225836754, 0.10756795108318329, 0.01763218827545643, -0.03111741505563259, -0.05515480786561966, -0.047778405249118805, 0.01371761690825224, -0.020952507853507996, -0.0550653338432312, 0.03859603404998779, -0.00038355091237463057, -0.08374996483325958, 0.05859774723649025, -0.009659909643232822, -0.002344363834708929, -0.0012887343764305115, 0.08244957029819489, 0.04297477751970291, 0.010676383972167969, 0.06411802023649216, -0.011551902629435062, -0.05283784866333008, -0.02866780012845993, 0.021070191636681557, 0.04868599772453308, -0.008782430551946163, -0.09407956898212433, 0.049164820462465286, -0.03528904169797897, -0.024099571630358696, 0.009696641005575657, 0.035532694309949875, -0.01556150522083044, -0.0025759576819837093, 0.00902903638780117, 0.03318594768643379, 0.07638590782880783, -0.020927991718053818, -6.684083488018214e-33, 0.011193578131496906, -0.03396410867571831, -0.00030058168340474367, -0.0634985864162445, -0.0486600324511528, 0.06363711506128311, -0.01900382526218891, 0.004475183319300413, 0.05726933851838112, -0.11689213663339615, 0.0363246351480484, 0.10684672743082047, 0.0361831896007061, 0.042808737605810165, 0.08243738114833832, -0.02586941048502922, 0.01135962549597025, 0.07166404277086258, 0.00785234197974205, -0.021956555545330048, -0.030696926638484, 0.014797931537032127, -0.03542155772447586, -0.057807423174381256, 0.07046302407979965, -0.01143081858754158, 0.031485989689826965, -0.10852711647748947, -0.029205940663814545, -0.002875282894819975, -0.0052009462378919125, 0.0832032784819603, -0.04570005089044571, 0.001071553211659193, -0.014612729661166668, 0.014476411044597626, 0.04371406137943268, -0.1137320026755333, -0.079430490732193, 0.014823469333350658, 0.05605357140302658, 0.05662643536925316, 0.019874822348356247, -0.014291969127953053, -0.0449037104845047, 0.06513014435768127, -0.0876917690038681, -0.05065447837114334, -0.0457657091319561, -0.0033800031524151564, 0.07292935252189636, -0.05323538929224014, 0.029301457107067108, 0.02430099993944168, 0.039077699184417725, -0.09589820355176926, -0.010486912913620472, 0.05830036476254463, -0.09887590259313583, -0.06139755994081497, -0.0074413837864995, 0.009537258185446262, -0.020964302122592926, -0.10762958228588104, -0.037931982427835464, -0.01701909676194191, 0.020530983805656433, 0.039951879531145096, -0.0132265230640769, 0.00238606333732605, -0.12398555129766464, -0.05124836042523384, -0.006294607184827328, 0.04116417095065117, 0.0025330125354230404, 0.05018666014075279, -0.07221870869398117, -0.033407144248485565, 0.02063549868762493, 0.035911958664655685, 0.01460467278957367, -0.06856182962656021, 0.07134900987148285, -0.003982027061283588, 0.02338886260986328, -0.023985590785741806, 0.005045238416641951, -0.03516342118382454, 0.039640191942453384, -0.0423053503036499, -0.009326149709522724, 0.06618043035268784, 0.007893234491348267, 0.11978661268949509, 0.08177294582128525, -5.706124639459631e-8, -0.01522605400532484, -0.04711282625794411, -0.06281697750091553, 0.009280657395720482, -0.007482989225536585, -0.03663160651922226, -0.003299312898889184, -0.045604806393384933, -0.0707026794552803, 0.008048465475440025, 0.09197519719600677, 0.011039670556783676, -0.015331408008933067, -0.0955524668097496, -0.003927704878151417, 0.04399995133280754, -0.07565655559301376, 0.02295023202896118, 0.038636475801467896, -0.004313299432396889, -0.013043353334069252, 0.022163180634379387, 0.019832706078886986, 0.013069342821836472, -0.08120227605104446, -0.05321241915225983, 0.022297628223896027, 0.02767600305378437, -0.0718647912144661, -0.05129504203796387, 0.03539202734827995, -0.007088302634656429, 0.06687966734170914, -0.01654629595577717, -0.018309831619262695, -0.02434217371046543, 0.09011603146791458, 0.04032502323389053, 0.09232543408870697, -0.0430041067302227, 0.1119198426604271, -0.0010587753495201468, 0.04810590669512749, -0.05437184497714043, -0.000007566167369077448, 0.04147252067923546, 0.029752060770988464, -0.0166181568056345, -0.08674883842468262, -0.08522918820381165, -0.04017772153019905, -0.018351605162024498, -0.03343750536441803, 0.07457780838012695, -0.029446812346577644, -0.12210226058959961, -0.07792056351900101, 0.0028469127137213945, 0.005934733897447586, 0.009808010421693325, 0.08213703334331512, -0.00003908471262548119, 0.03011627309024334, 0.022610360756516457 ]
0.053301
Ollama CLI and GPU library dependencies for Nvidia. If you have an AMD GPU, also download and extract the additional ROCm package `ollama-windows-amd64-rocm.zip` into the same directory. This allows for embedding Ollama in existing applications, or running it as a system service via `ollama serve` with tools such as [NSSM](https://nssm.cc/). If you are upgrading from a prior version, you should remove the old directories first.
https://github.com/ollama/ollama/blob/main//docs/windows.mdx
main
ollama
[ -0.01743173599243164, -0.0636441707611084, -0.016434406861662865, 0.005545864347368479, 0.02821512520313263, -0.09617192298173904, -0.06157749891281128, -0.03421977162361145, -0.017404738813638687, -0.09948894381523132, 0.005472645629197359, 0.004461297765374184, -0.10825683176517487, 0.042937811464071274, 0.07931523025035858, 0.10369393974542618, 0.04078399017453194, -0.021359484642744064, -0.026540309190750122, 0.08438241481781006, 0.032475437968969345, 0.01679491251707077, -0.02231176383793354, 0.018995733931660652, -0.048484016209840775, 0.026731139048933983, -0.013393149711191654, 0.011586409993469715, 0.03917611017823219, -0.020017849281430244, 0.03584369271993637, 0.0152805270627141, 0.06347236037254333, -0.01234936062246561, 0.037171632051467896, -0.03451644256711006, 0.029954101890325546, -0.0936337560415268, -0.050299305468797684, -0.015030840411782265, 0.010963822714984417, 0.11616385728120804, -0.0025121208745986223, 0.0077341897413134575, 0.02208421193063259, -0.05750955268740654, 0.04962170496582985, -0.022380972281098366, 0.03963741660118103, -0.0010238649556413293, -0.006893084850162268, -0.06456535309553146, -0.03155241161584854, -0.028340714052319527, 0.05865471065044403, 0.057371024042367935, -0.03153208643198013, -0.1026432141661644, -0.005607514642179012, 0.057759497314691544, 0.06016397476196289, 0.028900710865855217, 0.03130796551704407, 0.041966356337070465, 0.016979621723294258, -0.05753219127655029, 0.033572908490896225, -0.021734047681093216, 0.025967247784137726, -0.016705622896552086, -0.0076607586815953255, 0.03550412505865097, 0.0000937157092266716, 0.00810903962701559, -0.025229433551430702, 0.020955495536327362, 0.0515439510345459, -0.00806389283388853, 0.005961240269243717, -0.04315197095274925, -0.02132285200059414, 0.0006316348444670439, 0.0871543139219284, 0.002752111991867423, 0.08301161229610443, -0.00978964101523161, 0.042340293526649475, 0.010349725373089314, 0.037007372826337814, -0.040471941232681274, -0.004781191702932119, -0.06905610114336014, 0.04201811924576759, -0.023645607754588127, 0.03270195797085762, -0.061006732285022736, 0.024678871035575867, -0.011356174014508724, -0.023999279364943504, 0.09422440081834793, -0.08918793499469757, -0.07534804195165634, 0.050747986882925034, 0.1127798780798912, -0.10936816036701202, 0.09129217267036438, 0.03212323412299156, 0.10334189981222153, -0.12689928710460663, 0.045739997178316116, 0.07334647327661514, -0.05185290426015854, 0.03980337455868721, -0.02211843617260456, 0.008075635880231857, 0.005631393752992153, -0.07983288913965225, 0.006489635910838842, -0.02595163881778717, 0.07244864106178284, -0.08280941843986511, -0.07601241767406464, 0.06489314883947372, 0.009501239284873009, -0.028318272903561592, 0.07038310170173645, -0.045189861208200455, 1.5120755768386524e-33, 0.052089087665081024, -0.00989869050681591, -0.019424505531787872, 0.01442403718829155, -0.011583331972360611, 0.0550350658595562, 0.05018415302038193, -0.020962411537766457, 0.007253110408782959, -0.03701724484562874, 0.025359628722071648, 0.12964312732219696, -0.0136545579880476, 0.08408541232347488, 0.027854755520820618, -0.022162118926644325, 0.015065339393913746, 0.046476397663354874, 0.040588583797216415, 0.043276768177747726, 0.06680305302143097, 0.1095474362373352, 0.016541380435228348, -0.02033986710011959, -0.05588251352310181, 0.060648780316114426, -0.03516070917248726, 0.02666802890598774, 0.0541364885866642, 0.010797926224768162, 0.1320623904466629, 0.00037569229607470334, -0.04638176038861275, -0.02674490213394165, 0.017209170386195183, 0.056324198842048645, -0.00823754258453846, -0.009006614796817303, -0.037330616265535355, 0.027627404779195786, 0.003788598347455263, 0.062347255647182465, 0.008546436205506325, -0.04487791657447815, -0.018879296258091927, 0.02490858919918537, -0.03592076152563095, -0.004775292240083218, 0.04278470575809479, -0.05427004024386406, -0.07166159898042679, 0.017633836716413498, -0.07608792930841446, 0.012302476912736893, -0.03219307214021683, -0.07914178818464279, -0.007489511277526617, -0.04124118760228157, 0.13509798049926758, -0.08324669301509857, -0.026024846360087395, -0.04023253172636032, -0.03155778348445892, -0.061804600059986115, 0.04291697219014168, -0.03479132056236267, -0.014725964516401291, -0.0021244557574391365, -0.06979595124721527, -0.03929392620921135, -0.057719290256500244, -0.025062108412384987, -0.04994078725576401, 0.11769138276576996, 0.049516692757606506, -0.00628690654411912, -0.025195244699716568, 0.005793880671262741, -0.05380760878324509, 0.018224267289042473, 0.038929905742406845, 0.019996801391243935, 0.03052656538784504, -0.04428204894065857, 0.03364793583750725, -0.05390837788581848, 0.0036911999341100454, 0.06629321724176407, -0.02050751820206642, 0.012115133926272392, 0.023121854290366173, -0.026872524991631508, 0.01829591393470764, 0.05824437364935875, 0.002375248121097684, -2.3795129904222394e-33, 0.0457654744386673, -0.052281443029642105, 0.06667561829090118, -0.03722333163022995, -0.017587097361683846, 0.07514186948537827, -0.09514948725700378, -0.02936389110982418, -0.017164774239063263, -0.06931522488594055, 0.008921141736209393, 0.04596363380551338, 0.14231951534748077, 0.07283984124660492, 0.051732152700424194, -0.048457831144332886, -0.07392555475234985, -0.004502503201365471, -0.06586015969514847, -0.05684809014201164, -0.019905079156160355, 0.005627645645290613, 0.00739764841273427, -0.04951397702097893, 0.007199792191386223, 0.042172227054834366, 0.025660278275609016, -0.09648896008729935, 0.015577753074467182, 0.005839725490659475, -0.05843358859419823, 0.0683213546872139, -0.0861184224486351, 0.0010831691324710846, -0.010820182971656322, 0.058379966765642166, 0.031575191766023636, -0.06737321615219116, -0.093704454600811, 0.011009184643626213, 0.03519297391176224, 0.04462292417883873, 0.05036435276269913, -0.0496341772377491, -0.020638883113861084, 0.04295462742447853, -0.03930889442563057, 0.013959495350718498, -0.01481633260846138, -0.039446860551834106, 0.0054103657603263855, -0.02979949861764908, -0.03025868348777294, -0.03466552495956421, 0.02248905785381794, 0.015031169168651104, 0.06474344432353973, 0.05668888986110687, 0.019955333322286606, -0.024909021332859993, 0.010759841650724411, 0.024191053584218025, -0.027203841134905815, -0.12291887402534485, -0.05885102599859238, -0.022343110293149948, -0.017221786081790924, 0.029884247109293938, -0.03463456779718399, -0.03448227047920227, -0.15770454704761505, 0.02214660868048668, 0.0010102223604917526, -0.02491486817598343, -0.010690336115658283, 0.008601189590990543, -0.07578478008508682, -0.008443720638751984, 0.08354352414608002, -0.03568209335207939, 0.009784541092813015, -0.10732320696115494, 0.09314370155334473, 0.04084349423646927, 0.08553384244441986, 0.02532035857439041, 0.12723408639431, -0.11707409471273422, 0.08072541654109955, -0.05328795313835144, -0.019393732771277428, 0.011014355346560478, 0.03681349381804466, 0.09216464310884476, 0.028861189261078835, -4.528216379640071e-8, 0.025180639699101448, -0.0058286357671022415, -0.031464047729969025, 0.055997610092163086, 0.03158979490399361, -0.0059061190113425255, -0.03276517987251282, 0.03228136897087097, -0.007245171349495649, -0.014036118984222412, 0.0635257288813591, 0.056387368589639664, 0.0003774737997446209, -0.007333649322390556, -0.07289581000804901, 0.0391978845000267, -0.03919365257024765, -0.03655221685767174, 0.04763256758451462, -0.0307101309299469, -0.023389039561152458, -0.01301739551126957, 0.05872582644224167, 0.04143499955534935, -0.004733099136501551, -0.09953374415636063, 0.050446461886167526, -0.0165569968521595, -0.013048731721937656, -0.07846692949533463, 0.001855070935562253, -0.004808254539966583, 0.06020496413111687, -0.0564575158059597, 0.039634887129068375, -0.019162463024258614, 0.03149963170289993, 0.030507516115903854, 0.04047593101859093, -0.006419505458325148, 0.05293620750308037, 0.007520833518356085, 0.0029190003406256437, -0.06326811015605927, 0.07136032730340958, 0.027297914028167725, 0.0032712521497160196, -0.04574742540717125, -0.1527603417634964, -0.02508862502872944, -0.015456639230251312, -0.006495935842394829, -0.0566500686109066, 0.06037748232483864, -0.06060265377163887, -0.08875153958797455, -0.08665576577186584, -0.01560844387859106, -0.03660392016172409, -0.015255852602422237, -0.010389772243797779, -0.08565380424261093, 0.07637986540794373, -0.03617141395807266 ]
0.026716
## How can I upgrade Ollama? Ollama on macOS and Windows will automatically download updates. Click on the taskbar or menubar item and then click "Restart to update" to apply the update. Updates can also be installed by downloading the latest version [manually](https://ollama.com/download/). On Linux, re-run the install script: ```shell curl -fsSL https://ollama.com/install.sh | sh ``` ## How can I view the logs? Review the [Troubleshooting](./troubleshooting) docs for more about using logs. ## Is my GPU compatible with Ollama? Please refer to the [GPU docs](./gpu). ## How can I specify the context window size? By default, Ollama uses a context window size of 4096 tokens. This can be overridden with the `OLLAMA\_CONTEXT\_LENGTH` environment variable. For example, to set the default context window to 8K, use: ```shell OLLAMA\_CONTEXT\_LENGTH=8192 ollama serve ``` To change this when using `ollama run`, use `/set parameter`: ```shell /set parameter num\_ctx 4096 ``` When using the API, specify the `num\_ctx` parameter: ```shell curl http://localhost:11434/api/generate -d '{ "model": "llama3.2", "prompt": "Why is the sky blue?", "options": { "num\_ctx": 4096 } }' ``` ## How can I tell if my model was loaded onto the GPU? Use the `ollama ps` command to see what models are currently loaded into memory. ```shell ollama ps ``` \*\*Output\*\*: ``` NAME ID SIZE PROCESSOR UNTIL llama3:70b bcfb190ca3a7 42 GB 100% GPU 4 minutes from now ``` The `Processor` column will show which memory the model was loaded in to: - `100% GPU` means the model was loaded entirely into the GPU - `100% CPU` means the model was loaded entirely in system memory - `48%/52% CPU/GPU` means the model was loaded partially onto both the GPU and into system memory ## How do I configure Ollama server? Ollama server can be configured with environment variables. ### Setting environment variables on Mac If Ollama is run as a macOS application, environment variables should be set using `launchctl`: 1. For each environment variable, call `launchctl setenv`. ```bash launchctl setenv OLLAMA\_HOST "0.0.0.0:11434" ``` 2. Restart Ollama application. ### Setting environment variables on Linux If Ollama is run as a systemd service, environment variables should be set using `systemctl`: 1. Edit the systemd service by calling `systemctl edit ollama.service`. This will open an editor. 2. For each environment variable, add a line `Environment` under section `[Service]`: ```ini [Service] Environment="OLLAMA\_HOST=0.0.0.0:11434" ``` 3. Save and exit. 4. Reload `systemd` and restart Ollama: ```shell systemctl daemon-reload systemctl restart ollama ``` ### Setting environment variables on Windows On Windows, Ollama inherits your user and system environment variables. 1. First Quit Ollama by clicking on it in the task bar. 2. Start the Settings (Windows 11) or Control Panel (Windows 10) application and search for \_environment variables\_. 3. Click on \_Edit environment variables for your account\_. 4. Edit or create a new variable for your user account for `OLLAMA\_HOST`, `OLLAMA\_MODELS`, etc. 5. Click OK/Apply to save. 6. Start the Ollama application from the Windows Start menu. ## How do I use Ollama behind a proxy? Ollama pulls models from the Internet and may require a proxy server to access the models. Use `HTTPS\_PROXY` to redirect outbound requests through the proxy. Ensure the proxy certificate is installed as a system certificate. Refer to the section above for how to use environment variables on your platform. Avoid setting `HTTP\_PROXY`. Ollama does not use HTTP for model pulls, only HTTPS. Setting `HTTP\_PROXY` may interrupt client connections to the server. ### How do I use Ollama behind a proxy in Docker? The Ollama Docker container image can be configured to use a proxy by passing `-e HTTPS\_PROXY=https://proxy.example.com` when starting the container. Alternatively, the Docker daemon can
https://github.com/ollama/ollama/blob/main//docs/faq.mdx
main
ollama
[ -0.012067528441548347, 0.02062218077480793, -0.04767351970076561, 0.02618696168065071, -0.013975866138935089, -0.14365261793136597, -0.01756652258336544, 0.04781964793801308, -0.04830445721745491, -0.016341740265488625, 0.003098277375102043, -0.0019881906919181347, -0.05778174474835396, -0.004637503065168858, 0.08753436803817749, 0.09864003956317902, 0.0387989766895771, -0.05390320345759392, -0.08806178718805313, 0.06413569301366806, 0.08202746510505676, 0.0038127063307911158, 0.02929018996655941, 0.0035899062640964985, 0.0028597929049283266, 0.011088117957115173, -0.002794208936393261, -0.023400120437145233, -0.002625426510348916, 0.03893287852406502, 0.04566507786512375, -0.004943527281284332, 0.01949387602508068, -0.043938059359788895, 0.1322985291481018, -0.0364631712436676, 0.01856563612818718, -0.08140446245670319, -0.10677726566791534, -0.0010906088864430785, 0.03366466984152794, 0.05126134678721428, -0.01740712672472, 0.02779392898082733, 0.005460247863084078, -0.06532236188650131, 0.004079119767993689, -0.02668953500688076, 0.005243985448032618, -0.009174001403152943, -0.05161736160516739, -0.04559480398893356, -0.0057191140949726105, -0.02291828580200672, 0.007251254748553038, 0.04119789972901344, 0.011047996580600739, -0.04358771815896034, 0.05580420047044754, 0.04898691549897194, 0.004176577087491751, -0.027658408507704735, -0.071244016289711, 0.054206911474466324, -0.011557173915207386, 0.0038653938099741936, 0.01371188648045063, -0.046770401298999786, -0.013088296167552471, -0.002011624164879322, -0.02682974562048912, 0.033947087824344635, -0.00025444492348469794, -0.043614912778139114, 0.01670433208346367, -0.012925347313284874, 0.06990331411361694, 0.01749960146844387, -0.012513925321400166, -0.0425708070397377, -0.001399126136675477, -0.020194174721837044, 0.036630913615226746, -0.018416710197925568, 0.09067057818174362, 0.010291002690792084, 0.01400964055210352, 0.03282926604151726, 0.09408950805664062, 0.038114093244075775, -0.01893528737127781, -0.0437500961124897, 0.003386725904420018, -0.01805565319955349, 0.11920592188835144, -0.06341096758842468, 0.006290813907980919, -0.012089245952665806, -0.061054639518260956, 0.08939193189144135, 0.006224648095667362, -0.04950689524412155, 0.03405917435884476, 0.11977889388799667, -0.09371735155582428, 0.09480739384889603, 0.05766322463750839, 0.15480221807956696, -0.06086786091327667, 0.041798900812864304, 0.07292237132787704, -0.05029916763305664, 0.05746769532561302, 0.000989805324934423, 0.03142724931240082, 0.032972391694784164, -0.013802670873701572, -0.030840827152132988, -0.04652675986289978, 0.052574627101421356, 0.053366128355264664, -0.04358961805701256, 0.00441721873357892, -0.02556910179555416, -0.02455330640077591, 0.10226534307003021, 0.03285730257630348, 2.7856380234366855e-33, 0.0738329067826271, 0.00927240215241909, -0.041103433817625046, 0.0049351598136126995, 0.03979058191180229, 0.09926319867372513, 0.01522612664848566, -0.04630367085337639, -0.008683949708938599, -0.008283632807433605, -0.055089663714170456, 0.12970498204231262, -0.062476832419633865, 0.03083588182926178, 0.05308494716882706, -0.053163595497608185, 0.001745611079968512, 0.13967789709568024, 0.02302362583577633, 0.040214356034994125, 0.0798163115978241, -0.010444394312798977, -0.013692326843738556, -0.039237748831510544, -0.024749333038926125, 0.060038648545742035, -0.010337678715586662, -0.02377277985215187, -0.01918676123023033, 0.05267329141497612, 0.027334017679095268, -0.021638372913002968, -0.058580636978149414, -0.04874688386917114, -0.011743305251002312, -0.012989820912480354, -0.08115602284669876, -0.031103773042559624, -0.028154151514172554, -0.07330787926912308, -0.025558777153491974, 0.03497698903083801, 0.021290861070156097, -0.010719354264438152, -0.012627623975276947, -0.030598962679505348, -0.09254224598407745, 0.026059618219733238, 0.045395296066999435, -0.02802034094929695, -0.02534499019384384, 0.04661913588643074, -0.0706329271197319, -0.04040816053748131, 0.003646764438599348, -0.0606897734105587, 0.043472617864608765, -0.033105310052633286, 0.1591923087835312, 0.012771869078278542, -0.02057957462966442, 0.008960679173469543, 0.013217339292168617, -0.013927911408245564, -0.02379908412694931, -0.016664663329720497, 0.006413069553673267, 0.018318122252821922, -0.09466897696256638, 0.023798245936632156, -0.05906938761472702, -0.00014505116268992424, 0.007011893671005964, 0.12571363151073456, 0.03673306852579117, -0.02716371975839138, -0.008353803306818008, 0.0043591707944869995, -0.1441735029220581, 0.05666062980890274, 0.08071547746658325, -0.025339704006910324, 0.03663099557161331, -0.05737507343292236, -0.010250059887766838, -0.03981909528374672, 0.02361203543841839, 0.04930943623185158, -0.08263543248176575, 0.002963887294754386, 0.012768140994012356, -0.025287967175245285, 0.021094955503940582, 0.019864680245518684, -0.04925640672445297, -3.490212072246287e-33, 0.020663507282733917, -0.015666615217924118, 0.06229709833860397, -0.00135601416695863, -0.007565851788967848, 0.03157828003168106, -0.010925696231424809, 0.0646742582321167, 0.00499639380723238, -0.04052978754043579, 0.018773404881358147, 0.031040772795677185, 0.03551730513572693, 0.03399436175823212, 0.06013691425323486, -0.01698937825858593, -0.10583141446113586, -0.00553730595856905, -0.022993089631199837, -0.00816382747143507, 0.0006485424237325788, 0.006267877295613289, -0.056195102632045746, 0.022617002949118614, 0.02495446614921093, -0.055970385670661926, 0.012804454192519188, -0.0263214148581028, -0.03585108369588852, -0.002536396263167262, -0.019922630861401558, 0.04445377737283707, -0.1373937726020813, 0.047049615532159805, 0.04519921541213989, 0.06080910935997963, 0.06413448601961136, -0.02107427455484867, -0.07012384384870529, 0.07661158591508865, 0.06917256861925125, 0.0030663383658975363, 0.028176741674542427, -0.05091839283704758, -0.02952604927122593, 0.08723373711109161, 0.012187098152935505, -0.028424467891454697, -0.07465720921754837, -0.046836864203214645, 0.02919415570795536, -0.005038794130086899, 0.02390410006046295, 0.027272380888462067, 0.05785532668232918, -0.06386224180459976, 0.06067115068435669, -0.009673072956502438, -0.10824696719646454, -0.04710875451564789, 0.04555613547563553, -0.020259609445929527, 0.045621536672115326, -0.07542625069618225, -0.018147509545087814, -0.03383508697152138, -0.010083511471748352, -0.001624764408916235, -0.04245574772357941, 0.013010114431381226, -0.0899258404970169, -0.08366645872592926, -0.017982957884669304, -0.015409117564558983, -0.0019493515137583017, 0.05919531360268593, -0.04591341316699982, -0.12726344168186188, 0.033742133527994156, 0.024238472804427147, -0.04386603832244873, -0.020864468067884445, 0.11383199691772461, 0.03432616591453552, 0.031225647777318954, 0.009458339773118496, 0.09147407859563828, 0.039836183190345764, 0.07637625187635422, 0.019838152453303337, -0.10232355445623398, -0.011640729382634163, -0.00036954248207621276, 0.06388940662145615, 0.0455428846180439, -4.625898242238691e-8, -0.06928619742393494, -0.02195604331791401, -0.038960572332143784, 0.08349352329969406, 0.04059617221355438, 0.0023508796002715826, -0.029179589822888374, 0.013369899243116379, -0.05278787761926651, -0.016569729894399643, 0.05885573476552963, 0.024922242388129234, -0.017437398433685303, -0.019701272249221802, -0.0652022510766983, 0.002435353584587574, -0.06383474171161652, 0.01838618330657482, 0.05584252253174782, -0.09210974723100662, 0.046021755784749985, 0.026124147698283195, 0.08957425504922867, -0.011430702172219753, -0.030632775276899338, -0.10204270482063293, -0.0008315583108924329, 0.11166296154260635, -0.03671524301171303, -0.11860214918851852, 0.007992804050445557, -0.01443568617105484, 0.002718981821089983, -0.04646437242627144, -0.0875934287905693, -0.028764944523572922, 0.020864520221948624, 0.07031834125518799, 0.022499972954392433, -0.07588938623666763, 0.021412499248981476, -0.017634384334087372, 0.03723566234111786, -0.046511635184288025, -0.0016373895341530442, 0.09934216737747192, -0.01763857714831829, 0.006206886377185583, -0.08348753303289413, -0.0016622201073914766, 0.011492310091853142, -0.009790073148906231, 0.028555892407894135, 0.07042250782251358, -0.01189480908215046, -0.14147023856639862, -0.09910919517278671, -0.0407320074737072, -0.012407107278704643, -0.03152189776301384, 0.048743173480033875, -0.01848454400897026, 0.018489230424165726, -0.0012832267675548792 ]
0.078577
for model pulls, only HTTPS. Setting `HTTP\_PROXY` may interrupt client connections to the server. ### How do I use Ollama behind a proxy in Docker? The Ollama Docker container image can be configured to use a proxy by passing `-e HTTPS\_PROXY=https://proxy.example.com` when starting the container. Alternatively, the Docker daemon can be configured to use a proxy. Instructions are available for Docker Desktop on [macOS](https://docs.docker.com/desktop/settings/mac/#proxies), [Windows](https://docs.docker.com/desktop/settings/windows/#proxies), and [Linux](https://docs.docker.com/desktop/settings/linux/#proxies), and Docker [daemon with systemd](https://docs.docker.com/config/daemon/systemd/#httphttps-proxy). Ensure the certificate is installed as a system certificate when using HTTPS. This may require a new Docker image when using a self-signed certificate. ```dockerfile FROM ollama/ollama COPY my-ca.pem /usr/local/share/ca-certificates/my-ca.crt RUN update-ca-certificates ``` Build and run this image: ```shell docker build -t ollama-with-ca . docker run -d -e HTTPS\_PROXY=https://my.proxy.example.com -p 11434:11434 ollama-with-ca ``` ## Does Ollama send my prompts and answers back to ollama.com? No. Ollama runs locally, and conversation data does not leave your machine. ## How can I expose Ollama on my network? Ollama binds 127.0.0.1 port 11434 by default. Change the bind address with the `OLLAMA\_HOST` environment variable. Refer to the section [above](#how-do-i-configure-ollama-server) for how to set environment variables on your platform. ## How can I use Ollama with a proxy server? Ollama runs an HTTP server and can be exposed using a proxy server such as Nginx. To do so, configure the proxy to forward requests and optionally set required headers (if not exposing Ollama on the network). For example, with Nginx: ```nginx server { listen 80; server\_name example.com; # Replace with your domain or IP location / { proxy\_pass http://localhost:11434; proxy\_set\_header Host localhost:11434; } } ``` ## How can I use Ollama with ngrok? Ollama can be accessed using a range of tools for tunneling tools. For example with Ngrok: ```shell ngrok http 11434 --host-header="localhost:11434" ``` ## How can I use Ollama with Cloudflare Tunnel? To use Ollama with Cloudflare Tunnel, use the `--url` and `--http-host-header` flags: ```shell cloudflared tunnel --url http://localhost:11434 --http-host-header="localhost:11434" ``` ## How can I allow additional web origins to access Ollama? Ollama allows cross-origin requests from `127.0.0.1` and `0.0.0.0` by default. Additional origins can be configured with `OLLAMA\_ORIGINS`. For browser extensions, you'll need to explicitly allow the extension's origin pattern. Set `OLLAMA\_ORIGINS` to include `chrome-extension://\*`, `moz-extension://\*`, and `safari-web-extension://\*` if you wish to allow all browser extensions access, or specific extensions as needed: ``` # Allow all Chrome, Firefox, and Safari extensions OLLAMA\_ORIGINS=chrome-extension://\*,moz-extension://\*,safari-web-extension://\* ollama serve ``` Refer to the section [above](#how-do-i-configure-ollama-server) for how to set environment variables on your platform. ## Where are models stored? - macOS: `~/.ollama/models` - Linux: `/usr/share/ollama/.ollama/models` - Windows: `C:\Users\%username%\.ollama\models` ### How do I set them to a different location? If a different directory needs to be used, set the environment variable `OLLAMA\_MODELS` to the chosen directory. On Linux using the standard installer, the `ollama` user needs read and write access to the specified directory. To assign the directory to the `ollama` user run `sudo chown -R ollama:ollama `. Refer to the section [above](#how-do-i-configure-ollama-server) for how to set environment variables on your platform. ## How can I use Ollama in Visual Studio Code? There is already a large collection of plugins available for VS Code as well as other editors that leverage Ollama. See the list of [extensions & plugins](https://github.com/ollama/ollama#extensions--plugins) at the bottom of the main repository readme. ## How do I use Ollama with GPU acceleration in Docker? The Ollama Docker container can be configured with GPU acceleration in Linux or Windows (with WSL2). This requires the [nvidia-container-toolkit](https://github.com/NVIDIA/nvidia-container-toolkit). See [ollama/ollama](https://hub.docker.com/r/ollama/ollama) for more details. GPU acceleration is not available for Docker Desktop in macOS due to the lack of GPU passthrough and emulation. ## Why is
https://github.com/ollama/ollama/blob/main//docs/faq.mdx
main
ollama
[ -0.06026848405599594, 0.07591983675956726, 0.0016742019215598702, -0.01695697195827961, -0.07622294872999191, -0.10744725167751312, -0.002263879869133234, 0.009165016934275627, 0.024429818615317345, 0.033972807228565216, -0.03463258594274521, 0.04529311880469322, -0.017183249816298485, 0.00670471228659153, 0.08617071807384491, 0.0008162311278283596, 0.10893422365188599, 0.06095882132649422, 0.01429498940706253, 0.01756148412823677, -0.03362826630473137, 0.008482171222567558, -0.007932009175419807, 0.03355322778224945, -0.12020868808031082, -0.035768840461969376, -0.020782768726348877, -0.022834835574030876, -0.01163501851260662, 0.0026050335727632046, 0.05457445979118347, -0.03863966092467308, -0.09785674512386322, -0.05829094722867012, 0.0007719398709014058, -0.006904777605086565, 0.07111060619354248, -0.012407161295413971, -0.08072176575660706, 0.021748913452029228, 0.14402489364147186, -0.05754272639751434, 0.012068353593349457, -0.019947754219174385, -0.012835714966058731, -0.06221684440970421, 0.019629912450909615, -0.07100813835859299, 0.014086173847317696, 0.022777432575821877, -0.06995468586683273, -0.04705427959561348, -0.007394529413431883, 0.07350019365549088, -0.020915638655424118, -0.010587244294583797, 0.049364928156137466, 0.0642993152141571, 0.036734689027071, 0.06185680627822876, -0.04694152995944023, 0.0021158887539058924, -0.05767152085900307, 0.03793146833777428, -0.009060006588697433, -0.006322623696178198, -0.012251499108970165, 0.05455203354358673, 0.04686390608549118, 0.010529783554375172, 0.055449146777391434, 0.006329874508082867, 0.014141527935862541, -0.10083535313606262, -0.01349141076207161, -0.006839899346232414, 0.01707555167376995, 0.02334747649729252, 0.0013467948883771896, -0.025340735912322998, 0.037010885775089264, -0.028563274070620537, 0.006686899811029434, -0.015500395558774471, -0.05302247405052185, 0.04271408170461655, -0.00048672143020667136, -0.00926197785884142, 0.16841301321983337, 0.025595679879188538, 0.03171010687947273, -0.023592256009578705, -0.06205103173851967, -0.043771568685770035, 0.08752451837062836, -0.03727826103568077, 0.0812523141503334, -0.025590697303414345, -0.02238794043660164, 0.019629914313554764, 0.011120859533548355, -0.018173446878790855, 0.0020034078042954206, 0.04884990677237511, 0.028808442875742912, 0.01637858897447586, 0.041442494839429855, 0.014678319916129112, -0.016276782378554344, 0.04146728292107582, 0.009532485157251358, -0.0842462033033371, 0.007044364232569933, -0.005374002270400524, -0.053527381271123886, 0.05844791233539581, 0.02577771618962288, -0.06418581306934357, 0.032346151769161224, -0.06600802391767502, 0.017642399296164513, -0.030556734651327133, 0.1678624302148819, 0.0498364232480526, 0.019579710438847542, 0.098471499979496, -0.02278316766023636, 1.5329418872626942e-33, 0.06457014381885529, -0.07139459252357483, 0.02846134640276432, 0.02805643156170845, 0.11788704246282578, -0.008235801942646503, 0.06160040199756622, -0.06290272623300552, 0.037564367055892944, -0.02960113435983658, -0.07183445245027542, 0.011589649133384228, -0.031996745616197586, 0.01718291826546192, 0.0616232194006443, -0.013704766519367695, -0.08085032552480698, -0.0031989843118935823, 0.09319115430116653, 0.08135251700878143, 0.06547294557094574, -0.06284049898386002, 0.008511757478117943, -0.03110639937222004, -0.011198014952242374, -0.03701627999544144, -0.06355307251214981, -0.017140228301286697, -0.05125050991773605, 0.029553625732660294, 0.1388198882341385, 0.013207361102104187, 0.03233084827661514, -0.027142895385622978, 0.025635311380028725, -0.06064455956220627, 0.045501016080379486, 0.0033755009062588215, -0.03977632895112038, -0.01478415448218584, -0.030205683782696724, -0.05227162316441536, 0.030818721279501915, 0.029133133590221405, 0.0035652145743370056, -0.15798319876194, -0.04670099914073944, -0.04621236398816109, 0.08555781841278076, 0.04888828098773956, 0.029364299029111862, -0.0346207320690155, -0.043569739907979965, -0.0705341175198555, 0.0032852960284799337, -0.02872990071773529, -0.04227955639362335, -0.015870485454797745, 0.003325357101857662, -0.02020977810025215, -0.11428964883089066, 0.002895527286455035, 0.03279246762394905, -0.04498174041509628, 0.031766775995492935, 0.06992378830909729, 0.015487384051084518, 0.0700245052576065, -0.06384150683879852, 0.06678537279367447, -0.060439933091402054, 0.017335793003439903, -0.025562895461916924, 0.015706509351730347, 0.02442280761897564, 0.014399534091353416, 0.027711573988199234, 0.04477179795503616, 0.03530845791101456, 0.0017290510004386306, 0.07308284193277359, 0.035150106996297836, 0.02093212865293026, 0.06224270164966583, -0.06009663641452789, 0.003769147675484419, 0.02791912481188774, 0.03912222757935524, -0.005411804188042879, 0.027275450527668, 0.0779464989900589, 0.08962365239858627, 0.03662900626659393, 0.03301435708999634, -0.06347908824682236, -2.728643077811113e-33, 0.021035516634583473, -0.01837421953678131, 0.05651847645640373, 0.010737814009189606, 0.032020412385463715, 0.01642347313463688, 0.08760558068752289, 0.02499443106353283, 0.01921480894088745, -0.008457480929791927, -0.050082042813301086, 0.008204767480492592, 0.06896702945232391, 0.05398945137858391, -0.058258138597011566, -0.058584064245224, -0.05237549543380737, -0.021146366372704506, -0.012647370807826519, -0.016742292791604996, -0.01915793865919113, -0.04209038242697716, 0.04514775425195694, 0.06488695740699768, -0.03253867104649544, -0.018379809334874153, -0.02241385728120804, -0.046513449400663376, -0.07013152539730072, -0.03267686814069748, -0.032381314784288406, 0.04121936857700348, 0.01705631986260414, 0.06700466573238373, -0.01691625267267227, 0.06328469514846802, -0.041449472308158875, 0.13451991975307465, -0.033637143671512604, -0.09978116303682327, 0.016836218535900116, -0.09539023041725159, -0.059651490300893784, 0.04737849533557892, -0.01626758463680744, -0.05292703956365585, -0.08855673670768738, 0.06355246156454086, -0.12790679931640625, 0.03640524670481682, -0.04574143514037132, 0.03279877454042435, 0.03877314552664757, 0.07234031707048416, 0.03207738324999809, -0.0314626470208168, 0.010568423196673393, -0.004251520615071058, -0.04790356382727623, 0.060611624270677567, 0.12477581202983856, -0.09791574627161026, -0.009553796611726284, 0.0015453580999746919, 0.03133524954319, -0.0030675556045025587, -0.10334040969610214, 0.009777872823178768, -0.0036683212965726852, 0.0325324609875679, -0.0015931660309433937, -0.0904463604092598, -0.03569517657160759, -0.011464538984000683, 0.051276177167892456, -0.06163955107331276, 0.0007993925828486681, -0.117315873503685, 0.025276776403188705, 0.06757434457540512, -0.04389744997024536, 0.059167612344026566, 0.0024840994738042355, -0.11008255183696747, -0.007144791539758444, 0.029660355299711227, 0.06816205382347107, 0.028769584372639656, 0.06599472463130951, -0.025183524936437607, -0.03987489268183708, -0.03952744975686073, -0.034011319279670715, 0.04200660437345505, 0.07878601551055908, -5.2052179455586156e-8, 0.008206531405448914, 0.019883085042238235, 0.03691599890589714, 0.046784479171037674, -0.08312887698411942, 0.017784466966986656, 0.012130177579820156, -0.04521840065717697, -0.05135224759578705, 0.04473854601383209, -0.0065393936820328236, 0.02387763373553753, -0.04414816200733185, 0.043162137269973755, -0.016484495252370834, 0.030480435118079185, 0.054964497685432434, 0.003730574855580926, -0.0120383994653821, -0.076521135866642, -0.037124067544937134, -0.03712289780378342, 0.010859145782887936, 0.0402546264231205, -0.10245706140995026, 0.024670125916600227, -0.002778854453936219, 0.0164369847625494, -0.006672745570540428, 0.023190250620245934, -0.03461084142327309, -0.08524133265018463, -0.05181502550840378, 0.061845023185014725, -0.06678476184606552, 0.05744777247309685, -0.08773376792669296, -0.059018950909376144, -0.04659368097782135, -0.007788500282913446, -0.02344425953924656, -0.007156022824347019, 0.011557972989976406, -0.06487692892551422, -0.0034308244939893484, 0.09011300653219223, 0.020554538816213608, 0.03378108888864517, -0.059941139072179794, 0.05197238177061081, 0.09071338921785355, -0.10108429938554764, 0.06419671326875687, -0.027107086032629013, -0.03302104026079178, -0.025442801415920258, 0.010116958990693092, -0.030554845929145813, 0.016046134755015373, 0.014228378422558308, 0.05284764990210533, -0.0453302301466465, 0.04300590232014656, 0.04049743711948395 ]
0.01189
acceleration in Docker? The Ollama Docker container can be configured with GPU acceleration in Linux or Windows (with WSL2). This requires the [nvidia-container-toolkit](https://github.com/NVIDIA/nvidia-container-toolkit). See [ollama/ollama](https://hub.docker.com/r/ollama/ollama) for more details. GPU acceleration is not available for Docker Desktop in macOS due to the lack of GPU passthrough and emulation. ## Why is networking slow in WSL2 on Windows 10? This can impact both installing Ollama, as well as downloading models. Open `Control Panel > Networking and Internet > View network status and tasks` and click on `Change adapter settings` on the left panel. Find the `vEthernel (WSL)` adapter, right click and select `Properties`. Click on `Configure` and open the `Advanced` tab. Search through each of the properties until you find `Large Send Offload Version 2 (IPv4)` and `Large Send Offload Version 2 (IPv6)`. \_Disable\_ both of these properties. ## How can I preload a model into Ollama to get faster response times? If you are using the API you can preload a model by sending the Ollama server an empty request. This works with both the `/api/generate` and `/api/chat` API endpoints. To preload the mistral model using the generate endpoint, use: ```shell curl http://localhost:11434/api/generate -d '{"model": "mistral"}' ``` To use the chat completions endpoint, use: ```shell curl http://localhost:11434/api/chat -d '{"model": "mistral"}' ``` To preload a model using the CLI, use the command: ```shell ollama run llama3.2 "" ``` ## How do I keep a model loaded in memory or make it unload immediately? By default models are kept in memory for 5 minutes before being unloaded. This allows for quicker response times if you're making numerous requests to the LLM. If you want to immediately unload a model from memory, use the `ollama stop` command: ```shell ollama stop llama3.2 ``` If you're using the API, use the `keep\_alive` parameter with the `/api/generate` and `/api/chat` endpoints to set the amount of time that a model stays in memory. The `keep\_alive` parameter can be set to: - a duration string (such as "10m" or "24h") - a number in seconds (such as 3600) - any negative number which will keep the model loaded in memory (e.g. -1 or "-1m") - '0' which will unload the model immediately after generating a response For example, to preload a model and leave it in memory use: ```shell curl http://localhost:11434/api/generate -d '{"model": "llama3.2", "keep\_alive": -1}' ``` To unload the model and free up memory use: ```shell curl http://localhost:11434/api/generate -d '{"model": "llama3.2", "keep\_alive": 0}' ``` Alternatively, you can change the amount of time all models are loaded into memory by setting the `OLLAMA\_KEEP\_ALIVE` environment variable when starting the Ollama server. The `OLLAMA\_KEEP\_ALIVE` variable uses the same parameter types as the `keep\_alive` parameter types mentioned above. Refer to the section explaining [how to configure the Ollama server](#how-do-i-configure-ollama-server) to correctly set the environment variable. The `keep\_alive` API parameter with the `/api/generate` and `/api/chat` API endpoints will override the `OLLAMA\_KEEP\_ALIVE` setting. ## How do I manage the maximum number of requests the Ollama server can queue? If too many requests are sent to the server, it will respond with a 503 error indicating the server is overloaded. You can adjust how many requests may be queue by setting `OLLAMA\_MAX\_QUEUE`. ## How does Ollama handle concurrent requests? Ollama supports two levels of concurrent processing. If your system has sufficient available memory (system memory when using CPU inference, or VRAM for GPU inference) then multiple models can be loaded at the same time. For a given model, if there is sufficient available memory when the model is loaded, it is configured to allow parallel request processing. If there is insufficient available memory to load
https://github.com/ollama/ollama/blob/main//docs/faq.mdx
main
ollama
[ 0.05103793367743492, 0.06720855832099915, -0.008722749538719654, 0.0705873891711235, 0.056481774896383286, -0.08864790201187134, -0.08288747072219849, -0.01283766608685255, -0.008884371258318424, -0.04198470339179039, 0.0028785276226699352, -0.0032487884163856506, -0.0756598711013794, 0.0036244899965822697, 0.028722910210490227, 0.01674916408956051, 0.12211591750383377, 0.023194557055830956, -0.05612095072865486, -0.008869599550962448, -0.04491458833217621, -0.03798792511224747, 0.018029341474175453, -0.029810942709445953, -0.007961687631905079, -0.0025439374148845673, -0.062343381345272064, -0.004459591116756201, 0.027711164206266403, 0.016079874709248543, -0.0018198799807578325, -0.0375634990632534, -0.0015473562525585294, 0.023047445341944695, 0.039394278079271317, 0.0025734882801771164, 0.01870264671742916, -0.060937125235795975, -0.11726143956184387, -0.05234406143426895, 0.017598740756511688, -0.0350290983915329, 0.012991419993340969, 0.04460539668798447, 0.019988778978586197, -0.06680326908826828, 0.040534522384405136, -0.021044999361038208, 0.008171634748578072, 0.0063449605368077755, -0.06576692312955856, -0.04474833235144615, 0.0526379756629467, -0.015612118877470493, -0.020846260711550713, -0.007263911422342062, -0.03119583986699581, 0.016977183520793915, 0.01862260513007641, -0.053983330726623535, -0.022150322794914246, -0.05718187615275383, -0.02245274931192398, 0.052907999604940414, -0.04304376244544983, 0.04406149685382843, 0.019486576318740845, -0.0020115384832024574, 0.03167423978447914, -0.008057801052927971, 0.038265421986579895, 0.042949698865413666, 0.02362605556845665, -0.07631339132785797, -0.020134475082159042, -0.009558369405567646, 0.04584921523928642, -0.0012125106295570731, -0.00919822882860899, 0.020316582173109055, 0.032250456511974335, -0.004749966785311699, 0.013926880434155464, -0.12055305391550064, -0.02955366112291813, -0.0018740156665444374, -0.02049405127763748, -0.012650775723159313, -0.03418201953172684, -0.06954989582300186, 0.045681118965148926, 0.022626042366027832, -0.00449689757078886, 0.006734203081578016, 0.0939927026629448, -0.03443090617656708, 0.009979980997741222, -0.05608545243740082, -0.030338773503899574, 0.05823696777224541, -0.06293261796236038, 0.0345567911863327, 0.013274277560412884, 0.10312274843454361, -0.04722953587770462, 0.00897989422082901, 0.06381692737340927, 0.09258304536342621, -0.11525644361972809, 0.040896352380514145, 0.03835824131965637, 0.02095102332532406, -0.010447939857840538, 0.03720415011048317, 0.001854673377238214, 0.027567319571971893, 0.015916885808110237, -0.04877973347902298, -0.08530136942863464, -0.012874895706772804, -0.031062617897987366, -0.10025584697723389, 0.053546398878097534, -0.07927314937114716, -0.014021976850926876, 0.03063693270087242, -0.01609540544450283, 3.7180945091226495e-33, 0.015719899907708168, -0.059674520045518875, -0.019921233877539635, -0.02909516543149948, 0.0568806491792202, -0.061109792441129684, 0.04813896864652634, -0.0380602702498436, 0.019786221906542778, 0.003001594915986061, -0.1378798931837082, -0.0052496581338346004, -0.06026546284556389, 0.10627633333206177, 0.08067186921834946, -0.07562080025672913, -0.03264979273080826, 0.042469341307878494, 0.020629042759537697, 0.12368857115507126, 0.1144745722413063, -0.039437077939510345, -0.02622583508491516, -0.062053728848695755, -0.027195580303668976, 0.02273404411971569, 0.025063645094633102, -0.021254949271678925, 0.0779898464679718, 0.038633961230516434, 0.0761842355132103, 0.006590439472347498, -0.03800012916326523, -0.04343389347195625, 0.042021509259939194, -0.01358027197420597, -0.011102249845862389, 0.02397756278514862, 0.08091560006141663, 0.03453352302312851, -0.027944372966885567, 0.0007796370191499591, 0.020320678129792213, -0.018132103607058525, -0.019886422902345657, -0.09840534627437592, 0.02857591211795807, -0.02320985123515129, 0.0017091259360313416, 0.057732146233320236, 0.07981578260660172, 0.09582556039094925, -0.13148021697998047, 0.08046918362379074, 0.0481300987303257, -0.06321804970502853, 0.09204583615064621, 0.030893471091985703, 0.03149481862783432, 0.11704268306493759, -0.13907679915428162, -0.05010932683944702, -0.016099028289318085, -0.05791514739394188, -0.010559030808508396, -0.022168373689055443, -0.018717601895332336, 0.060265567153692245, -0.15902025997638702, 0.11953560262918472, -0.003714421996846795, 0.02552923746407032, 0.027538439258933067, -0.023708827793598175, 0.09325072169303894, -0.048764485865831375, -0.009072298184037209, -0.05658547580242157, -0.04070783779025078, 0.03573023900389671, -0.04395245760679245, 0.15721343457698822, 0.024614086374640465, -0.01263570599257946, -0.018907174468040466, -0.06590065360069275, -0.022664589807391167, 0.010222780518233776, -0.004506467841565609, 0.03978116065263748, -0.01129536796361208, 0.11343540251255035, 0.007262188009917736, 0.009266058914363384, -0.013934945687651634, -4.0113641866054864e-33, 0.03754449263215065, -0.02857845462858677, 0.03711733594536781, 0.08165241032838821, -0.020304735749959946, 0.04805438593029976, 0.04389619082212448, 0.030414793640375137, 0.05930245295166969, -0.054602332413196564, 0.06225801259279251, -0.007194974459707737, 0.012787369079887867, 0.08079691976308823, 0.05858100578188896, -0.046759698539972305, -0.015384404920041561, 0.0000011839077842523693, 0.037976328283548355, -0.02881086803972721, 0.04372667148709297, 0.045052628964185715, 0.05878060311079025, -0.09061084687709808, 0.006654844619333744, -0.0121088195592165, 0.06729989498853683, -0.004802492912858725, -0.021790632978081703, -0.018091388046741486, -0.01941336877644062, 0.08222804218530655, -0.026040377095341682, 0.008339419960975647, 0.10489518195390701, 0.11036882549524307, -0.02872810699045658, 0.02043701522052288, -0.1027979701757431, 0.0007402784540317953, 0.048725444823503494, -0.03328019753098488, -0.04730833321809769, -0.016080861911177635, 0.008141499012708664, -0.01763383485376835, -0.12536707520484924, 0.0056692250072956085, -0.02553805150091648, 0.022381441667675972, 0.021682992577552795, -0.020455164834856987, 0.006709084380418062, 0.10361708700656891, 0.12080521881580353, -0.048383597284555435, -0.05417103320360184, -0.020932823419570923, -0.09530267119407654, -0.014808477833867073, 0.10155519843101501, -0.013552836142480373, -0.04189087077975273, 0.012354564853012562, 0.1240428164601326, -0.03515046089887619, -0.03176877275109291, -0.027891000732779503, -0.018859032541513443, 0.07226932793855667, -0.06843385845422745, -0.005595644935965538, 0.030769459903240204, 0.023541022092103958, -0.024312270805239677, -0.01331995241343975, 0.013465932570397854, 0.0015085540944710374, 0.0636393204331398, 0.0007625760626979172, -0.02665591426193714, 0.09033995866775513, 0.07772726565599442, -0.08850155025720596, -0.03519395366311073, 0.015129492618143559, 0.019885191693902016, -0.02003828063607216, 0.06430448591709137, 0.0075838444754481316, -0.011275449767708778, -0.055987004190683365, 0.0016100293723866343, 0.043807514011859894, -0.04696500301361084, -4.530988562123639e-8, -0.03348157927393913, -0.001052801264449954, -0.01318675559014082, 0.019868135452270508, -0.07316598296165466, -0.005115509498864412, -0.026838887482881546, -0.0023120746482163668, -0.05032624676823616, 0.03167857974767685, 0.05514443665742874, 0.00390792777761817, -0.05633767321705818, -0.10603582859039307, 0.04232151806354523, 0.04063629359006882, -0.023840585723519325, -0.01672370731830597, 0.0007128919241949916, -0.09427013993263245, -0.013152474537491798, 0.03821837902069092, 0.010465577244758606, -0.022308576852083206, -0.05678754299879074, 0.033121511340141296, 0.08224517852067947, -0.011445458047091961, -0.006865869276225567, -0.04633800685405731, -0.07233141362667084, -0.04801950603723526, -0.049477361142635345, 0.01726631075143814, 0.024307267740368843, -0.002632325980812311, -0.06445009261369705, 0.07606399059295654, 0.07906882464885712, 0.011280588805675507, -0.002726012608036399, -0.04343768581748009, 0.027118587866425514, -0.05952633172273636, 0.04067028686404228, 0.033841609954833984, -0.07569929212331772, 0.06618126481771469, -0.042245663702487946, 0.02522849291563034, 0.04403171315789223, -0.013539682142436504, -0.001886588055640459, 0.008337218314409256, -0.05135202407836914, -0.03698410466313362, 0.002626654924824834, -0.0995604619383812, 0.018137747421860695, 0.006490684580057859, 0.013683630153536797, -0.037286385893821716, 0.0072321817278862, 0.051577113568782806 ]
-0.008578
when using CPU inference, or VRAM for GPU inference) then multiple models can be loaded at the same time. For a given model, if there is sufficient available memory when the model is loaded, it is configured to allow parallel request processing. If there is insufficient available memory to load a new model request while one or more models are already loaded, all new requests will be queued until the new model can be loaded. As prior models become idle, one or more will be unloaded to make room for the new model. Queued requests will be processed in order. When using GPU inference new models must be able to completely fit in VRAM to allow concurrent model loads. Parallel request processing for a given model results in increasing the context size by the number of parallel requests. For example, a 2K context with 4 parallel requests will result in an 8K context and additional memory allocation. The following server settings may be used to adjust how Ollama handles concurrent requests on most platforms: - `OLLAMA\_MAX\_LOADED\_MODELS` - The maximum number of models that can be loaded concurrently provided they fit in available memory. The default is 3 \\* the number of GPUs or 3 for CPU inference. - `OLLAMA\_NUM\_PARALLEL` - The maximum number of parallel requests each model will process at the same time. The default will auto-select either 4 or 1 based on available memory. - `OLLAMA\_MAX\_QUEUE` - The maximum number of requests Ollama will queue when busy before rejecting additional requests. The default is 512 Note: Windows with Radeon GPUs currently default to 1 model maximum due to limitations in ROCm v5.7 for available VRAM reporting. Once ROCm v6.2 is available, Windows Radeon will follow the defaults above. You may enable concurrent model loads on Radeon on Windows, but ensure you don't load more models than will fit into your GPUs VRAM. ## How does Ollama load models on multiple GPUs? When loading a new model, Ollama evaluates the required VRAM for the model against what is currently available. If the model will entirely fit on any single GPU, Ollama will load the model on that GPU. This typically provides the best performance as it reduces the amount of data transferring across the PCI bus during inference. If the model does not fit entirely on one GPU, then it will be spread across all the available GPUs. ## How can I enable Flash Attention? Flash Attention is a feature of most modern models that can significantly reduce memory usage as the context size grows. To enable Flash Attention, set the `OLLAMA\_FLASH\_ATTENTION` environment variable to `1` when starting the Ollama server. ## How can I set the quantization type for the K/V cache? The K/V context cache can be quantized to significantly reduce memory usage when Flash Attention is enabled. To use quantized K/V cache with Ollama you can set the following environment variable: - `OLLAMA\_KV\_CACHE\_TYPE` - The quantization type for the K/V cache. Default is `f16`. Currently this is a global option - meaning all models will run with the specified quantization type. The currently available K/V cache quantization types are: - `f16` - high precision and memory usage (default). - `q8\_0` - 8-bit quantization, uses approximately 1/2 the memory of `f16` with a very small loss in precision, this usually has no noticeable impact on the model's quality (recommended if not using f16). - `q4\_0` - 4-bit quantization, uses approximately 1/4 the memory of `f16` with a small-medium loss in precision that may be more noticeable at higher context sizes. How much the cache quantization impacts the
https://github.com/ollama/ollama/blob/main//docs/faq.mdx
main
ollama
[ -0.026412680745124817, -0.04938355088233948, -0.044805858284235, 0.02866218239068985, -0.03588753193616867, -0.05086475983262062, -0.054752666503190994, 0.0013305636821314692, 0.061925750225782394, -0.023363562300801277, -0.04094303771853447, 0.030763110145926476, -0.05350824072957039, -0.03397277370095253, 0.07813344150781631, 0.01192125678062439, 0.14997641742229462, -0.007983976975083351, -0.10479915887117386, 0.05513932183384895, 0.11545918136835098, -0.012986104935407639, -0.04321649298071861, -0.006750406231731176, -0.05437945947051048, -0.034863147884607315, -0.00032882255618460476, -0.03535075485706329, 0.11169764399528503, 0.00450092600658536, 0.04298991337418556, -0.017618004232645035, -0.048110414296388626, 0.031027551740407944, 0.02918417938053608, -0.03553369268774986, -0.07300631701946259, -0.12797580659389496, -0.03642238304018974, 0.04967876523733139, 0.015025333501398563, 0.04993158206343651, -0.0734354704618454, 0.01333596371114254, 0.041203323751688004, -0.011425509117543697, 0.046868979930877686, 0.006451163906604052, 0.018513565883040428, -0.08372579514980316, -0.04016851261258125, -0.046150218695402145, -0.06270042806863785, 0.03592504560947418, -0.06274130940437317, 0.014539675787091255, 0.03510640561580658, -0.08782722800970078, -0.06584455817937851, 0.05891156569123268, -0.0846683531999588, -0.07210142910480499, -0.0307226050645113, 0.04347887635231018, 0.0696994885802269, 0.002258758991956711, 0.06309546530246735, -0.010030051693320274, 0.032488562166690826, 0.007189776748418808, 0.0008604787872172892, 0.05579451471567154, -0.0432477705180645, -0.046806588768959045, -0.016358014196157455, -0.000590955896768719, 0.0036092575173825026, 0.017735781148076057, 0.03880775719881058, -0.08743779361248016, 0.03624371066689491, -0.012426568195223808, 0.039737679064273834, -0.11383923888206482, 0.01930682174861431, -0.041069723665714264, -0.03883430361747742, 0.014655898325145245, 0.060481734573841095, -0.03142976760864258, 0.044261384755373, 0.04827946424484253, -0.025823477655649185, 0.048271019011735916, 0.07399912178516388, -0.01699155755341053, 0.02876795269548893, -0.008413619361817837, -0.014191338792443275, 0.03682098165154457, 0.007117924280464649, 0.014805012382566929, 0.10003441572189331, 0.08558504283428192, -0.003061604220420122, 0.020250709727406502, -0.018097221851348877, 0.06881494075059891, -0.08844432234764099, 0.014681869186460972, 0.0676484927535057, 0.05177164077758789, 0.08690010011196136, 0.0014167266199365258, -0.014119203202426434, 0.0356750562787056, 0.004258951637893915, -0.06902725994586945, -0.020132357254624367, 0.06614241749048233, -0.0700148493051529, -0.05993267893791199, 0.06736826151609421, -0.03782806545495987, -0.04485505446791649, -0.05047687515616417, -0.12005113810300827, 7.805509506806492e-33, 0.019450705498456955, -0.022599952295422554, 0.0422707162797451, -0.03914264589548111, 0.005417351610958576, 0.08908157050609589, -0.021834950894117355, -0.018758904188871384, -0.04149501770734787, -0.04912325367331505, -0.017008982598781586, 0.03801523149013519, -0.007820182479918003, 0.10376551002264023, 0.06221846491098404, -0.00330100255087018, 0.003559617092832923, 0.07065761834383011, 0.027267245575785637, 0.05358334258198738, 0.05829086899757385, -0.05665363743901253, -0.02283848635852337, 0.060366805642843246, -0.01607029139995575, 0.04482010751962662, -0.01730768196284771, 0.023603934794664383, -0.08862949907779694, 0.02998501993715763, 0.031225459650158882, -0.010378431528806686, -0.10177219659090042, 0.05084266886115074, 0.06040486320853233, 0.023241231217980385, 0.016357965767383575, -0.06927788257598877, -0.02036944404244423, -0.11925693601369858, 0.02085966430604458, 0.056708380579948425, 0.06503428518772125, -0.04235408455133438, -0.1618271768093109, -0.07066870480775833, -0.04819164052605629, -0.05715910717844963, -0.05074552446603775, -0.0019813701510429382, 0.01850118115544319, 0.03574270009994507, -0.031128136441111565, 0.0035414514131844044, 0.03382335975766182, -0.034144606441259384, -0.027377529069781303, 0.007637806236743927, 0.13669148087501526, 0.13317275047302246, -0.028016267344355583, -0.08162155747413635, -0.04325706884264946, 0.060496266931295395, 0.057362981140613556, 0.03307490795850754, -0.015868233516812325, 0.032020557671785355, 0.014843565411865711, 0.026127945631742477, -0.04306852072477341, -0.029516393318772316, -0.0020470244344323874, 0.002022915054112673, 0.02601121924817562, -0.040935222059488297, -0.006443013437092304, -0.062217313796281815, -0.10197065770626068, 0.02504613809287548, -0.0019186048302799463, 0.05108970031142235, -0.006284551694989204, -0.041007351130247116, -0.026508500799536705, -0.01795392856001854, 0.0038888303097337484, -0.006917228456586599, -0.03850141540169716, -0.033522479236125946, -0.03425169363617897, -0.001941701746545732, 0.03812269866466522, 0.02304888889193535, -0.0066345687955617905, -7.401658871689894e-33, 0.020930904895067215, -0.0672304555773735, -0.042156413197517395, 0.08579429239034653, 0.05631927773356438, -0.05182509869337082, 0.011075468733906746, -0.005210913717746735, -0.0603446327149868, -0.12280405312776566, -0.016648221760988235, 0.017067477107048035, 0.07036248594522476, 0.08330070227384567, 0.028299754485487938, -0.058669909834861755, -0.001390020246617496, -0.05495572090148926, 0.013700377196073532, 0.03960427641868591, -0.009557356126606464, -0.036600511521101, -0.033027585595846176, -0.048344895243644714, 0.010358601808547974, 0.0021332877222448587, -0.11471723765134811, -0.07804855704307556, -0.013321181759238243, 0.03377433866262436, -0.013073593378067017, -0.0054182810708880424, -0.05029630661010742, 0.052449289709329605, 0.037871140986680984, 0.07716153562068939, 0.07271847128868103, 0.04279491677880287, 0.025687068700790405, 0.08121572434902191, 0.08182968199253082, -0.011750122532248497, -0.0003891664673574269, -0.04041341692209244, -0.014295634813606739, 0.08359614759683609, -0.03846472129225731, -0.006958230398595333, -0.040043823421001434, -0.04818173870444298, 0.009978549554944038, 0.046881575137376785, 0.018561284989118576, 0.10002752393484116, 0.06652428954839706, -0.08646082133054733, -0.01439747679978609, -0.022815104573965073, 0.07494720071554184, -0.030013341456651688, 0.08337264508008957, 0.0009698705980554223, -0.05461464077234268, -0.08411669731140137, 0.010181838646531105, -0.008220897987484932, 0.005281098186969757, -0.06048303097486496, 0.002828917931765318, 0.016349904239177704, -0.08477049320936203, -0.009030940942466259, -0.0013379162410274148, 0.053582917898893356, -0.07294997572898865, 0.03680886700749397, -0.011112630367279053, -0.11825067549943924, 0.0025965054519474506, 0.016951771453022957, -0.08170042932033539, -0.030514094978570938, 0.03349578008055687, 0.04247066378593445, -0.01720578968524933, -0.0015144250355660915, 0.06175539270043373, -0.0007563982508145273, -0.013531542383134365, -0.017811190336942673, -0.034297529608011246, -0.0031732888892292976, 0.025758232921361923, 0.09213531762361526, -0.0687854140996933, -5.0022705977426085e-8, 0.02301033027470112, -0.022562753409147263, 0.07360963523387909, 0.034174393862485886, 0.04996230825781822, -0.03679351508617401, -0.01997325010597706, -0.007162174675613642, 0.016533151268959045, 0.03958171233534813, 0.11870768666267395, 0.00842819269746542, 0.032196421176195145, 0.0075632561929523945, 0.04286985099315643, 0.07805483043193817, 0.028868727385997772, -0.03395693376660347, 0.01348098460584879, -0.06602197140455246, 0.003811809467151761, 0.029120275750756264, 0.03732892870903015, 0.029064055532217026, 0.05888720601797104, -0.02726779505610466, 0.0965154692530632, 0.0448899120092392, -0.0007424522773362696, -0.014426988549530506, -0.02649385668337345, 0.019348710775375366, -0.02179810404777527, -0.02643347717821598, -0.013073605485260487, -0.0013727368786931038, -0.05003266781568527, 0.04235738515853882, 0.035392388701438904, -0.08673765510320663, 0.05257483199238777, -0.053198039531707764, 0.02746657468378544, 0.01952139474451542, 0.1464938223361969, 0.07832878828048706, 0.00270183221437037, -0.04464849457144737, -0.03629446402192116, 0.02392215095460415, -0.07676354050636292, 0.021760214120149612, -0.014501957222819328, 0.11844101548194885, -0.06313632428646088, -0.0541946217417717, 0.0019636708311736584, -0.01848543994128704, 0.02525714784860611, -0.011613542214035988, 0.0527275986969471, -0.04226381704211235, -0.04168707877397537, -0.02304936945438385 ]
0.112323
precision, this usually has no noticeable impact on the model's quality (recommended if not using f16). - `q4\_0` - 4-bit quantization, uses approximately 1/4 the memory of `f16` with a small-medium loss in precision that may be more noticeable at higher context sizes. How much the cache quantization impacts the model's response quality will depend on the model and the task. Models that have a high GQA count (e.g. Qwen2) may see a larger impact on precision from quantization than models with a low GQA count. You may need to experiment with different quantization types to find the best balance between memory usage and quality. ## Where can I find my Ollama Public Key? Your \*\*Ollama Public Key\*\* is the public part of the key pair that lets your local Ollama instance talk to [ollama.com](https://ollama.com). You'll need it to: \* Push models to Ollama \* Pull private models from Ollama to your machine \* Run models hosted in [Ollama Cloud](https://ollama.com/cloud) ### How to Add the Key \* \*\*Sign-in via the Settings page\*\* in the \*\*Mac\*\* and \*\*Windows App\*\* \* \*\*Sign‑in via CLI\*\* ```shell ollama signin ``` \* \*\*Manually copy & paste\*\* the key on the \*\*Ollama Keys\*\* page: [https://ollama.com/settings/keys](https://ollama.com/settings/keys) ### Where the Ollama Public Key lives | OS | Path to `id\_ed25519.pub` | | :- | :- | | macOS | `~/.ollama/id\_ed25519.pub` | | Linux | `/usr/share/ollama/.ollama/id\_ed25519.pub` | | Windows | `C:\Users\\.ollama\id\_ed25519.pub` | Replace <username> with your actual Windows user name. ## How can I stop Ollama from starting when I login to my computer Ollama for Windows and macOS register as a login item during installation. You can disable this if you prefer not to have Ollama automatically start. Ollama will respect this setting across upgrades, unless you uninstall the application. \*\*Windows\*\* - In `Task Manager` go to the `Startup apps` tab, search for `ollama` then click `Disable` \*\*MacOS\*\* - Open `Settings` and search for "Login Items", find the `Ollama` entry under "Allow in the Background`, then click the slider to disable.
https://github.com/ollama/ollama/blob/main//docs/faq.mdx
main
ollama
[ 0.03750180825591087, -0.0012581560295075178, -0.0407605804502964, 0.011140595190227032, -0.06737004220485687, -0.07440006732940674, -0.04648572579026222, 0.010541578754782677, 0.05155806615948677, -0.015888111665844917, 0.018230222165584564, 0.03345750272274017, -0.037526439875364304, -0.02118091657757759, 0.08041970431804657, 0.05226263403892517, 0.12859734892845154, 0.009493833407759666, -0.14332343637943268, 0.005063021555542946, 0.0673738569021225, -0.0007158354856073856, 0.042438142001628876, -0.0059033711440861225, 0.003437468083575368, -0.05358719080686569, -0.027126768603920937, 0.035167355090379715, 0.10135361552238464, -0.07815573364496231, 0.04292507469654083, 0.05449526757001877, -0.0016164075350388885, 0.017980635166168213, 0.08399375528097153, 0.07078906148672104, 0.003756132908165455, -0.09339678287506104, -0.006835045292973518, -0.012559192255139351, 0.03879132121801376, 0.030971532687544823, -0.031096186488866806, -0.00979518424719572, 0.09727945923805237, 0.000726684695109725, 0.0721169039607048, 0.049564070999622345, 0.04103272408246994, -0.1022498831152916, -0.02375400997698307, 0.014065764844417572, -0.05000429227948189, 0.026709048077464104, -0.05233451724052429, 0.004294220823794603, 0.007169133052229881, -0.05452302098274231, -0.07933829724788666, 0.08648017048835754, 0.002721037482842803, -0.011557340621948242, -0.0452270433306694, -0.0011933059431612492, 0.006618940271437168, 0.004612617660313845, 0.07719723880290985, -0.11052916944026947, 0.010197728872299194, 0.013391807675361633, 0.005904286168515682, 0.0289767999202013, -0.0265677347779274, 0.03617945685982704, -0.03077700547873974, 0.05639605224132538, -0.013399584218859673, 0.002065681153908372, 0.06253378093242645, -0.010377834551036358, 0.038490500301122665, -0.0673336386680603, 0.015062839724123478, -0.058071620762348175, 0.0681629478931427, -0.05939892306923866, 0.03579923138022423, -0.055615659803152084, 0.04660314321517944, -0.05444734916090965, 0.042846228927373886, 0.02673443779349327, 0.028632644563913345, -0.04153561219573021, 0.06312329322099686, -0.020546654239296913, 0.12103034555912018, -0.009937324561178684, 0.009934513829648495, 0.07466481626033783, 0.06323771178722382, 0.054985761642456055, -0.06858911365270615, 0.03516678512096405, -0.001756980549544096, 0.060068171471357346, 0.09950880706310272, 0.14796289801597595, -0.06014220789074898, -0.005075413733720779, 0.03253386169672012, 0.0043195015750825405, -0.004676211625337601, -0.015512515790760517, 0.024920983240008354, 0.031166922301054, -0.01843702420592308, -0.03551623597741127, -0.013130982406437397, 0.011294636875391006, -0.034971561282873154, -0.07647347450256348, 0.0560586079955101, 0.02077578566968441, -0.028752626851201057, 0.05510326102375984, -0.13792473077774048, 6.955802680630632e-33, 0.031089209020137787, 0.09381328523159027, 0.048652809113264084, -0.03784196451306343, 0.05427566170692444, 0.07428310811519623, 0.033260028809309006, -0.04188014194369316, -0.039503928273916245, -0.008610263466835022, -0.011087465099990368, 0.022938359528779984, -0.06081622838973999, -0.034129489213228226, 0.10806874185800552, 0.008658756501972675, -0.07345589250326157, 0.015787014737725258, -0.0006458718562498689, 0.024548206478357315, 0.08822347968816757, -0.08251337707042694, -0.015232807025313377, 0.029805900529026985, 0.009236986748874187, 0.06720507144927979, 0.03573146462440491, 0.02114107646048069, -0.11623729020357132, 0.03644552081823349, -0.003964236006140709, -0.04286123439669609, -0.021818263456225395, -0.0779799297451973, 0.04591754078865051, -0.002896946854889393, -0.03260667622089386, -0.03393932059407234, -0.008705216459929943, -0.1131330132484436, -0.02465728484094143, 0.0702790841460228, 0.06387291848659515, -0.08133542537689209, -0.09614738821983337, -0.06050464138388634, 0.000683325866702944, 0.014865103177726269, 0.005756904371082783, 0.027113506570458412, 0.05693208426237106, -0.00859939493238926, -0.10409124195575714, 0.06738957017660141, 0.00019269627227913588, -0.03764006122946739, 0.12173112481832504, -0.0565236397087574, 0.07028624415397644, 0.10218118131160736, -0.052601058036088943, -0.05749699845910072, -0.03516048938035965, 0.020597344264388084, 0.033347237855196, 0.025174684822559357, 0.016328446567058563, 0.039773643016815186, -0.051963888108730316, 0.06373146176338196, 0.009929625317454338, -0.02611987292766571, 0.011845041997730732, 0.01888292469084263, 0.030736520886421204, -0.08380936086177826, 0.013235710561275482, -0.03362038731575012, -0.059595342725515366, -0.034815698862075806, 0.03928777575492859, 0.08550793677568436, -0.00036167720099911094, 0.04112293943762779, -0.06255603581666946, -0.0668192133307457, 0.04804934188723564, -0.017149822786450386, -0.038150083273649216, 0.05237559974193573, -0.007725202944129705, 0.004481837619096041, 0.052652254700660706, -0.021017910912632942, -0.1379639357328415, -5.5982797235056514e-33, -0.01181630790233612, -0.006009729113429785, 0.044541873037815094, 0.11101030558347702, -0.023392733186483383, -0.07674206793308258, 0.02053605020046234, 0.028087420389056206, -0.005161184351891279, -0.08989458531141281, 0.024262098595499992, 0.012559452094137669, 0.07262976467609406, 0.05338902771472931, 0.0523095466196537, -0.027192378416657448, -0.02515491656959057, -0.10589265823364258, 0.009042191319167614, 0.09392360597848892, -0.014092763885855675, -0.03794947266578674, -0.009304153732955456, -0.009526032954454422, 0.027744822204113007, 0.04520411416888237, -0.11021940410137177, -0.011913335882127285, -0.0014806236140429974, -0.06793183833360672, -0.060486625880002975, -0.004754459951072931, -0.06873755156993866, -0.07857464998960495, -0.027190525084733963, -0.01274452917277813, 0.037864167243242264, 0.055047474801540375, 0.004480387084186077, 0.050549447536468506, 0.054860830307006836, 0.010240072384476662, -0.08894556760787964, -0.03336184471845627, -0.011574726551771164, 0.013272315263748169, -0.0780429095029831, -0.006238420959562063, -0.028650643303990364, 0.032182831317186356, 0.08078530430793762, 0.05379810929298401, -0.06149984523653984, 0.07780728489160538, 0.008862528018653393, -0.01247837021946907, -0.03621327131986618, -0.036721039563417435, -0.0403524748980999, 0.02100018598139286, 0.011205269023776054, -0.0481988824903965, -0.046987660229206085, -0.03618772327899933, 0.030668703839182854, -0.03589324280619621, 0.01697636768221855, 0.004346699919551611, -0.0039795502088963985, -0.006459503900259733, -0.061866335570812225, -0.09698159247636795, -0.007034698501229286, 0.039988018572330475, -0.0295252725481987, 0.013336556032299995, -0.10280708223581314, -0.010510305874049664, 0.07628963887691498, 0.0765661671757698, -0.04879624769091606, 0.07140673696994781, -0.02912677451968193, -0.04082484543323517, 0.01738130860030651, 0.021151363849639893, 0.06334662437438965, 0.06187265366315842, -0.06210774555802345, 0.027478523552417755, -0.0398126058280468, 0.04009734466671944, 0.008620274253189564, 0.03418712317943573, 0.004176298622041941, -5.049785301025622e-8, -0.04146768897771835, 0.036508213728666306, 0.033969808369874954, -0.009243745356798172, -0.052498891949653625, -0.06498567759990692, -0.07207638770341873, 0.06236648932099342, 0.046100568026304245, -0.0024535844568163157, 0.07833271473646164, 0.036543406546115875, -0.09358573704957962, -0.018094060942530632, -0.04033602774143219, 0.058271873742341995, 0.0057245176285505295, -0.05676630139350891, -0.0015117102302610874, -0.07453680783510208, 0.015257282182574272, 0.03877579793334007, -0.0021295445039868355, -0.025004148483276367, 0.020907314494252205, -0.03417098894715309, 0.043577536940574646, 0.1513511836528778, 0.009252693504095078, -0.011631152592599392, -0.004044880624860525, -0.004973416682332754, 0.04472551494836807, 0.005706961266696453, -0.037480179220438004, -0.026371676474809647, -0.06808478385210037, 0.005355951376259327, 0.00255519337952137, 0.019288726150989532, 0.030157731845974922, -0.02973383292555809, -0.04685729742050171, 0.0024756279308348894, 0.05706896260380745, 0.032256077975034714, 0.01868560165166855, -0.030369283631443977, -0.033906299620866776, 0.062253687530756, -0.05208369344472885, -0.00794098898768425, -0.058574654161930084, 0.05147375911474228, -0.05145684629678726, -0.05858979746699333, 0.0027282722294330597, -0.011887926608324051, 0.01308869943022728, -0.00002276056693517603, 0.033339496701955795, -0.09363974630832672, -0.0844334214925766, -0.010256251320242882 ]
0.005846
A Modelfile is the blueprint to create and share customized models using Ollama. ## Table of Contents - [Format](#format) - [Examples](#examples) - [Instructions](#instructions) - [FROM (Required)](#from-required) - [Build from existing model](#build-from-existing-model) - [Build from a Safetensors model](#build-from-a-safetensors-model) - [Build from a GGUF file](#build-from-a-gguf-file) - [PARAMETER](#parameter) - [Valid Parameters and Values](#valid-parameters-and-values) - [TEMPLATE](#template) - [Template Variables](#template-variables) - [SYSTEM](#system) - [ADAPTER](#adapter) - [LICENSE](#license) - [MESSAGE](#message) - [Notes](#notes) ## Format The format of the `Modelfile`: ``` # comment INSTRUCTION arguments ``` | Instruction | Description | | ----------------------------------- | -------------------------------------------------------------- | | [`FROM`](#from-required) (required) | Defines the base model to use. | | [`PARAMETER`](#parameter) | Sets the parameters for how Ollama will run the model. | | [`TEMPLATE`](#template) | The full prompt template to be sent to the model. | | [`SYSTEM`](#system) | Specifies the system message that will be set in the template. | | [`ADAPTER`](#adapter) | Defines the (Q)LoRA adapters to apply to the model. | | [`LICENSE`](#license) | Specifies the legal license. | | [`MESSAGE`](#message) | Specify message history. | | [`REQUIRES`](#requires) | Specify the minimum version of Ollama required by the model. | ## Examples ### Basic `Modelfile` An example of a `Modelfile` creating a mario blueprint: ``` FROM llama3.2 # sets the temperature to 1 [higher is more creative, lower is more coherent] PARAMETER temperature 1 # sets the context window size to 4096, this controls how many tokens the LLM can use as context to generate the next token PARAMETER num\_ctx 4096 # sets a custom system message to specify the behavior of the chat assistant SYSTEM You are Mario from super mario bros, acting as an assistant. ``` To use this: 1. Save it as a file (e.g. `Modelfile`) 2. `ollama create choose-a-model-name -f ` 3. `ollama run choose-a-model-name` 4. Start using the model! To view the Modelfile of a given model, use the `ollama show --modelfile` command. ```shell ollama show --modelfile llama3.2 ``` ``` # Modelfile generated by "ollama show" # To build a new Modelfile based on this one, replace the FROM line with: # FROM llama3.2:latest FROM /Users/pdevine/.ollama/models/blobs/sha256-00e1317cbf74d901080d7100f57580ba8dd8de57203072dc6f668324ba545f29 TEMPLATE """{{ if .System }}<|start\_header\_id|>system<|end\_header\_id|> {{ .System }}<|eot\_id|>{{ end }}{{ if .Prompt }}<|start\_header\_id|>user<|end\_header\_id|> {{ .Prompt }}<|eot\_id|>{{ end }}<|start\_header\_id|>assistant<|end\_header\_id|> {{ .Response }}<|eot\_id|>""" PARAMETER stop "<|start\_header\_id|>" PARAMETER stop "<|end\_header\_id|>" PARAMETER stop "<|eot\_id|>" PARAMETER stop "<|reserved\_special\_token" ``` ## Instructions ### FROM (Required) The `FROM` instruction defines the base model to use when creating a model. ``` FROM : ``` #### Build from existing model ``` FROM llama3.2 ``` A list of available base models Additional models can be found at #### Build from a Safetensors model ``` FROM ``` The model directory should contain the Safetensors weights for a supported architecture. Currently supported model architectures: - Llama (including Llama 2, Llama 3, Llama 3.1, and Llama 3.2) - Mistral (including Mistral 1, Mistral 2, and Mixtral) - Gemma (including Gemma 1 and Gemma 2) - Phi3 #### Build from a GGUF file ``` FROM ./ollama-model.gguf ``` The GGUF file location should be specified as an absolute path or relative to the `Modelfile` location. ### PARAMETER The `PARAMETER` instruction defines a parameter that can be set when the model is run. ``` PARAMETER ``` #### Valid Parameters and Values | Parameter | Description | Value Type | Example Usage | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------- | | num\_ctx | Sets the size of the context window used to generate the next token. (Default: 2048) | int | num\_ctx 4096 | | repeat\_last\_n | Sets how far back for the model to look back to prevent repetition. (Default: 64, 0 = disabled, -1 = num\_ctx) | int
https://github.com/ollama/ollama/blob/main//docs/modelfile.mdx
main
ollama
[ -0.0652954950928688, -0.010461916215717793, -0.07122400403022766, -0.004412225913256407, 0.02237812802195549, 0.004861124791204929, -0.01059283409267664, 0.08594901859760284, -0.04251429811120033, 0.020741945132613182, 0.03811251372098923, -0.020277300849556923, 0.05950946360826492, -0.05486096069216728, 0.0494527667760849, 0.047436945140361786, -0.013666280545294285, -0.024519963189959526, -0.0757431611418724, -0.00609115744009614, 0.08655846863985062, 0.11935749650001526, 0.01613975130021572, 0.056781135499477386, -0.04147811979055405, -0.033395007252693176, 0.032059650868177414, 0.08763458579778671, -0.017405565828084946, -0.05380816385149956, 0.03560204058885574, 0.024246256798505783, 0.03235671669244766, 0.051409587264060974, 0.1265542209148407, 0.06402622908353806, 0.049115654081106186, -0.09826623648405075, -0.028295675292611122, -0.04358106106519699, -0.004389611538499594, 0.01767115294933319, -0.06114239990711212, -0.02758518047630787, 0.01642950251698494, -0.07451300323009491, -0.015054875053465366, -0.04648073762655258, 0.026000285521149635, 0.003920504357665777, -0.08796028792858124, -0.043570294976234436, -0.02578158862888813, -0.08665390312671661, 0.04175572097301483, 0.009074135683476925, -0.0015876382822170854, -0.07869091629981995, -0.012553395703434944, 0.006025772076100111, -0.03310703858733177, 0.08037038147449493, -0.048403166234493256, 0.016142595559358597, -0.053979143500328064, 0.012782393023371696, -0.03722153231501579, 0.07156628370285034, 0.019272688776254654, -0.007027865387499332, -0.11447451263666153, -0.008978514932096004, -0.03435816988348961, -0.01181749626994133, -0.0782226100564003, 0.013877231627702713, 0.03650294616818428, 0.07948178797960281, -0.012148704379796982, -0.10396140068769455, -0.01965266652405262, 0.02584112249314785, 0.03599471226334572, -0.01313498243689537, -0.004362905863672495, -0.020994015038013458, 0.021271301433444023, -0.0006671869778074324, 0.14719177782535553, -0.03707965835928917, -0.0004500831419136375, -0.03219447284936905, -0.00308208423666656, -0.02687123790383339, 0.03362797573208809, 0.04927397519350052, 0.07104837894439697, -0.03942342847585678, -0.01564348116517067, 0.10408785194158554, -0.03555804863572121, -0.015235408209264278, 0.08427181839942932, 0.030308108776807785, -0.017872639000415802, 0.04339396208524704, 0.019009843468666077, 0.06570768356323242, -0.06460988521575928, -0.008096465840935707, 0.041220299899578094, 0.010444683022797108, -0.0015579311875626445, -0.11295053362846375, 0.06276500225067139, -0.024230334907770157, -0.06495401263237, -0.035572659224271774, 0.005089153070002794, 0.0448218435049057, 0.02304748445749283, -0.036182302981615067, 0.024265369400382042, 0.05849343165755272, -0.033025842159986496, -0.01917160488665104, -0.06592098623514175, -8.566516100663194e-34, 0.04655743017792702, 0.007040188182145357, -0.020588133484125137, 0.13162446022033691, 0.04856820032000542, 0.05355587974190712, 0.04694955050945282, -0.012084031477570534, -0.060386136174201965, 0.009004689753055573, -0.04375087469816208, -0.006605819799005985, -0.05058305338025093, 0.07248888909816742, -0.04622117802500725, 0.01896832510828972, -0.05822177231311798, 0.06534095108509064, 0.04802854359149933, 0.018084611743688583, 0.08781655877828598, 0.003969837445765734, -0.008157240226864815, 0.03586623817682266, 0.02110203728079796, 0.09256304800510406, 0.005020220763981342, -0.06532040983438492, -0.05460023880004883, 0.004282854963093996, 0.12412622570991516, -0.030733982101082802, 0.011054711416363716, -0.018823614344000816, -0.05127011612057686, -0.03180823475122452, -0.05547283962368965, -0.039642754942178726, -0.02490195445716381, -0.023542679846286774, 0.04506818205118179, 0.0027350096497684717, -0.022977443411946297, -0.02210969477891922, -0.014291532337665558, 0.012756421230733395, -0.007664451841264963, 0.03377212584018707, 0.12396625429391861, -0.06032240763306618, -0.0067931897938251495, -0.009423112496733665, 0.003379534464329481, -0.031216008588671684, -0.02873210981488228, -0.01634889841079712, -0.02091650478541851, -0.018615897744894028, 0.1064738780260086, -0.045295003801584244, -0.0496930293738842, 0.08979060500860214, -0.04433054104447365, -0.02140192873775959, 0.06193283572793007, -0.03395539149641991, -0.02217981591820717, -0.034724507480859756, 0.07078190892934799, -0.04362184554338455, -0.07918913662433624, -0.050814688205718994, -0.009031705558300018, 0.05381056293845177, 0.0077494108118116856, -0.09528400748968124, -0.020141709595918655, -0.04208695515990257, -0.024474922567605972, -0.04842808097600937, -0.026158476248383522, 0.05388724058866501, -0.021225905045866966, -0.030919309705495834, 0.03124009631574154, -0.05029244348406792, 0.008126100525259972, 0.00026577149401418865, -0.05310650169849396, -0.0059311348013579845, 0.0315915122628212, -0.028900206089019775, -0.0692472830414772, -0.07049677520990372, 0.04161418229341507, -1.7733562877802724e-33, 0.03889674320816994, 0.016502084210515022, -0.013041706755757332, -0.011388476006686687, 0.041820649057626724, -0.025948595255613327, 0.011440942995250225, 0.019106445834040642, -0.0237983837723732, 0.024612274020910263, -0.07126764953136444, -0.0019478333415463567, 0.07737798988819122, -0.0319025032222271, 0.031542617827653885, -0.03883633390069008, -0.0808529257774353, -0.02257675863802433, -0.01141996867954731, 0.03301503136754036, -0.043257150799036026, 0.04091893881559372, 0.02862163446843624, 0.031103888526558876, 0.08083029091358185, -0.017419325187802315, -0.0540323406457901, 0.003700854489579797, 0.04238341376185417, 0.011465960182249546, 0.0006125963409431279, 0.08537419140338898, -0.06043049693107605, 0.01499808207154274, -0.016291707754135132, -0.03417624533176422, -0.01576359197497368, -0.030219702050089836, 0.004382282495498657, 0.0992937833070755, 0.08123096078634262, 0.017562290653586388, -0.04142061620950699, -0.06369311362504959, -0.06697268038988113, 0.03455989062786102, 0.03926274552941322, -0.06674507260322571, -0.033243756741285324, -0.11227080971002579, 0.018338169902563095, -0.06278237700462341, -0.010106861591339111, -0.041625071316957474, 0.030661771073937416, 0.0005498984828591347, 0.10432489961385727, -0.06090902164578438, -0.026160569861531258, -0.0018016063841059804, 0.05459319427609444, -0.03319458290934563, 0.05149739235639572, -0.07767639309167862, -0.035671934485435486, -0.06494691222906113, -0.011164437048137188, -0.03255167603492737, -0.029742490500211716, -0.008653312921524048, -0.08681756258010864, -0.057441163808107376, -0.012050061486661434, 0.001664524432271719, 0.09338271617889404, -0.01456519030034542, -0.09433349967002869, -0.001339078415185213, -0.030828049406409264, 0.01323199737817049, 0.0032712873071432114, -0.01916828565299511, 0.044154394418001175, 0.07384248077869415, 0.005035867914557457, -0.08345502614974976, 0.03690356761217117, 0.12434835731983185, 0.00867865514010191, 0.05622902140021324, -0.0910450890660286, 0.02115125209093094, 0.09422200173139572, 0.13537687063217163, -0.01416835281997919, -5.636106692463727e-8, -0.06928432732820511, -0.010750487446784973, -0.013273675926029682, 0.011442406103014946, -0.06743686646223068, 0.03902085870504379, 0.015192565508186817, -0.07225943356752396, 0.007716016843914986, 0.007224534638226032, 0.045377589762210846, 0.03401389345526695, -0.06871804594993591, 0.020517151802778244, -0.09535177797079086, 0.048687249422073364, 0.02775687910616398, 0.046354856342077255, -0.02197207510471344, -0.03902207314968109, 0.07781998813152313, 0.058054953813552856, -0.016387004405260086, 0.0284240934997797, 0.08532620221376419, 0.01927289552986622, -0.050197940319776535, 0.05624847486615181, -0.003988952375948429, 0.04510242119431496, 0.08248428255319595, -0.048073284327983856, 0.041966184973716736, 0.02967524714767933, -0.06777933984994888, -0.012172713875770569, 0.06648845225572586, 0.06015525385737419, 0.051817554980516434, -0.010862407274544239, 0.012071269564330578, 0.09035968780517578, -0.11836082488298416, -0.008338965475559235, 0.08260978013277054, 0.016929322853684425, -0.09618411958217621, -0.09526408463716507, -0.06857068091630936, 0.05966515466570854, -0.039675164967775345, -0.0472625195980072, -0.036205098032951355, 0.0885867103934288, -0.09090987592935562, -0.03958022594451904, 0.014397668652236462, 0.015096202492713928, 0.08354940265417099, -0.07557635009288788, -0.015827173367142677, 0.03700238838791847, 0.09729654341936111, -0.014139070175588131 ]
0.089384
| num\_ctx | Sets the size of the context window used to generate the next token. (Default: 2048) | int | num\_ctx 4096 | | repeat\_last\_n | Sets how far back for the model to look back to prevent repetition. (Default: 64, 0 = disabled, -1 = num\_ctx) | int | repeat\_last\_n 64 | | repeat\_penalty | Sets how strongly to penalize repetitions. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient. (Default: 1.1) | float | repeat\_penalty 1.1 | | temperature | The temperature of the model. Increasing the temperature will make the model answer more creatively. (Default: 0.8) | float | temperature 0.7 | | seed | Sets the random number seed to use for generation. Setting this to a specific number will make the model generate the same text for the same prompt. (Default: 0) | int | seed 42 | | stop | Sets the stop sequences to use. When this pattern is encountered the LLM will stop generating text and return. Multiple stop patterns may be set by specifying multiple separate `stop` parameters in a modelfile. | string | stop "AI assistant:" | | num\_predict | Maximum number of tokens to predict when generating text. (Default: -1, infinite generation) | int | num\_predict 42 | | top\_k | Reduces the probability of generating nonsense. A higher value (e.g. 100) will give more diverse answers, while a lower value (e.g. 10) will be more conservative. (Default: 40) | int | top\_k 40 | | top\_p | Works together with top-k. A higher value (e.g., 0.95) will lead to more diverse text, while a lower value (e.g., 0.5) will generate more focused and conservative text. (Default: 0.9) | float | top\_p 0.9 | | min\_p | Alternative to the top\*p, and aims to ensure a balance of quality and variety. The parameter \\_p\* represents the minimum probability for a token to be considered, relative to the probability of the most likely token. For example, with \_p\_=0.05 and the most likely token having a probability of 0.9, logits with a value less than 0.045 are filtered out. (Default: 0.0) | float | min\_p 0.05 | ### TEMPLATE `TEMPLATE` of the full prompt template to be passed into the model. It may include (optionally) a system message, a user's message and the response from the model. Note: syntax may be model specific. Templates use Go [template syntax](https://pkg.go.dev/text/template). #### Template Variables | Variable | Description | | ----------------- | --------------------------------------------------------------------------------------------- | | `{{ .System }}` | The system message used to specify custom behavior. | | `{{ .Prompt }}` | The user prompt message. | | `{{ .Response }}` | The response from the model. When generating a response, text after this variable is omitted. | ``` TEMPLATE """{{ if .System }}<|im\_start|>system {{ .System }}<|im\_end|> {{ end }}{{ if .Prompt }}<|im\_start|>user {{ .Prompt }}<|im\_end|> {{ end }}<|im\_start|>assistant """ ``` ### SYSTEM The `SYSTEM` instruction specifies the system message to be used in the template, if applicable. ``` SYSTEM """""" ``` ### ADAPTER The `ADAPTER` instruction specifies a fine tuned LoRA adapter that should apply to the base model. The value of the adapter should be an absolute path or a path relative to the Modelfile. The base model should be specified with a `FROM` instruction. If the base model is not the same as the base model that the adapter was tuned from the behaviour will be erratic. #### Safetensor adapter ``` ADAPTER ``` Currently supported Safetensor adapters: - Llama (including Llama 2, Llama 3, and Llama 3.1) -
https://github.com/ollama/ollama/blob/main//docs/modelfile.mdx
main
ollama
[ -0.017187684774398804, -0.020023126155138016, -0.025267038494348526, 0.05982105806469917, -0.03005521558225155, 0.05990017578005791, 0.06248698756098747, 0.015257498249411583, 0.04415355622768402, -0.044162556529045105, -0.008790258318185806, -0.05629337579011917, 0.10083746165037155, -0.05848785117268562, -0.0016563998069614172, -0.03594979643821716, 0.041614606976509094, 0.030615728348493576, -0.08764688670635223, -0.09242934733629227, 0.0994068831205368, 0.053710080683231354, 0.02410528063774109, 0.0567232221364975, -0.04689159244298935, -0.028707703575491905, 0.014884592965245247, 0.07219389081001282, 0.13267578184604645, -0.015615573152899742, -0.027410630136728287, 0.03686181828379631, 0.03540607914328575, 0.013994786888360977, 0.021731020882725716, -0.0553787499666214, -0.11143890768289566, -0.02522643283009529, -0.013432735577225685, 0.004442182369530201, 0.00658375583589077, -0.014844914898276329, 0.003870371263474226, 0.0377790667116642, 0.04685759171843529, -0.0270237997174263, -0.03535464406013489, -0.02490082010626793, 0.02669578045606613, -0.010482561774551868, 0.00015665075625292957, 0.03293586149811745, -0.006149472668766975, -0.029607459902763367, -0.019223688170313835, 0.007829823531210423, 0.013806149363517761, 0.008071965537965298, -0.03967241942882538, -0.040957722812891006, -0.041016317903995514, -0.0427667498588562, -0.10114006698131561, 0.0033218013122677803, 0.03876137733459473, -0.006131881847977638, -0.0308032538741827, 0.03919052705168724, 0.07283627241849899, 0.08949948102235794, -0.02651723101735115, 0.048264939337968826, 0.0005657659494318068, 0.003571620909497142, 0.03684964030981064, 0.04082499444484711, -0.01336649153381586, -0.07091634720563889, 0.006919748615473509, -0.014443841762840748, -0.03708091750741005, -0.08464629203081131, 0.08009221404790878, -0.04901004582643509, 0.04218223690986633, -0.07569599151611328, 0.11931613087654114, 0.02149084210395813, 0.14525106549263, 0.03263310343027115, -0.01070003304630518, -0.0013570771552622318, 0.03499946370720863, 0.014843936078250408, -0.020103204995393753, 0.12289397418498993, 0.03419680520892143, -0.04319322854280472, -0.031098568812012672, 0.027681250125169754, 0.0291916411370039, -0.021907875314354897, 0.022289829328656197, 0.08669102936983109, 0.06189702823758125, -0.09570848941802979, 0.05352633073925972, 0.014034842140972614, 0.01818358711898327, -0.04570190981030464, 0.028356505557894707, 0.10400807112455368, 0.032999757677316666, 0.00910867191851139, 0.030808964744210243, 0.006411230657249689, -0.03398799151182175, -0.03663976863026619, 0.03456085920333862, 0.03606390580534935, -0.014939782209694386, -0.034925270825624466, -0.04404563829302788, 0.005003377795219421, -0.01914764568209648, -0.01701168343424797, 0.004224362783133984, 3.9327632874698156e-33, -0.0011217932915315032, 0.005305866710841656, -0.02503596991300583, 0.011276472359895706, 0.07280194759368896, 0.04870212823152542, -0.04799984395503998, 0.027981961145997047, -0.016920089721679688, -0.01940002478659153, -0.028294185176491737, -0.006523613352328539, -0.03784102946519852, 0.0547640398144722, 0.034038227051496506, -0.07895767688751221, 0.03527892008423805, 0.12459281086921692, -0.020072748884558678, -0.01612301543354988, -0.012831246480345726, 0.0003102944465354085, -0.00676714675500989, -0.024837570264935493, 0.07848373800516129, 0.07438565045595169, 0.013947469182312489, -0.010789149440824986, -0.07984630763530731, 0.024430615827441216, -0.05175579711794853, 0.06190447509288788, -0.025451913475990295, 0.010339193977415562, 0.02099297009408474, 0.039716944098472595, 0.04567059874534607, 0.026349462568759918, 0.06215464696288109, -0.026681529358029366, -0.061975281685590744, 0.028938286006450653, 0.09994520246982574, 0.006133438553661108, -0.0724586620926857, -0.07663943618535995, 0.005964929237961769, 0.0538649708032608, -0.08949919790029526, 0.037786826491355896, 0.07874926924705505, 0.047195062041282654, -0.0043503097258508205, -0.004441193304955959, -0.020323771983385086, -0.10730381309986115, -0.0022630037274211645, -0.035537201911211014, -0.011963394470512867, 0.04386860504746437, 0.015324834734201431, -0.018682032823562622, 0.03258966654539108, 0.06710910052061081, 0.050933923572301865, 0.11162073910236359, -0.06004825979471207, -0.03402356430888176, 0.05117902159690857, 0.02392742410302162, -0.10212559252977371, -0.011993740685284138, -0.0831787958741188, -0.08306121826171875, -0.03131156042218208, -0.06160179525613785, 0.10577943176031113, -0.05000756308436394, -0.06529200822114944, -0.03148721903562546, 0.012597914785146713, 0.018094491213560104, -0.08214306086301804, -0.07587061822414398, -0.014580683782696724, -0.08403272181749344, 0.029243912547826767, -0.023008577525615692, -0.056606534868478775, -0.1297757923603058, 0.06132028251886368, -0.06840018928050995, 0.0857771635055542, 0.030577855184674263, -0.051800891757011414, -4.5972875090629325e-33, 0.009907948784530163, 0.0032977662049233913, -0.0064386543817818165, 0.05274467170238495, -0.00014953204663470387, -0.015329805202782154, -0.012070019729435444, -0.03437957167625427, -0.05546826124191284, -0.14931970834732056, 0.008898616768419743, 0.006395956035703421, 0.03826447203755379, 0.03771253675222397, -0.053795650601387024, -0.016760682687163353, -0.018629591912031174, 0.029504794627428055, -0.020103055983781815, -0.02283558063209057, 0.03593398258090019, -0.0025807248894125223, -0.12261591851711273, 0.01767844520509243, -0.030885666608810425, -0.016344858333468437, -0.09936349838972092, 0.01371972169727087, 0.04860410466790199, -0.05214839056134224, -0.0327802337706089, 0.021060625091195107, 0.03701499477028847, -0.01276442501693964, -0.02453271858394146, -0.004070397932082415, 0.11284545809030533, 0.025605319067835808, 0.00124209257774055, 0.12654165923595428, 0.10416185110807419, -0.02664804831147194, -0.028650280088186264, 0.04310374706983566, -0.008277175948023796, 0.07709728926420212, 0.030549870803952217, -0.08950769156217575, -0.02997622825205326, 0.014369374141097069, 0.04865128546953201, -0.0709436759352684, -0.11392416059970856, 0.03871869295835495, -0.09418611228466034, -0.055392634123563766, -0.05865369364619255, -0.02180328220129013, -0.017443822696805, -0.016638046130537987, -0.01650046929717064, -0.012534817680716515, 0.03484828770160675, -0.017329420894384384, -0.004733612295240164, 0.013974053785204887, -0.050456397235393524, -0.037946559488773346, 0.0013461241032928228, 0.0014363545924425125, -0.017188383266329765, 0.04740365594625473, 0.0033577224239706993, 0.014987731352448463, -0.02684982493519783, -0.04871722683310509, -0.014727003872394562, -0.08107023686170578, -0.027759939432144165, 0.008516071364283562, -0.09743025153875351, 0.025961872190237045, 0.013838316313922405, 0.07604961097240448, -0.09602528810501099, 0.03580700606107712, 0.030415818095207214, 0.09977327287197113, 0.02326907403767109, 0.039522685110569, -0.05632396414875984, 0.02029825933277607, 0.02356816828250885, 0.14058318734169006, -0.08109600841999054, -6.083987358351806e-8, -0.07650543004274368, -0.036392174661159515, -0.018966060131788254, 0.07975896447896957, 0.0278096292167902, 0.0266330074518919, -0.03578725457191467, -0.056479405611753464, 0.02602267824113369, -0.11938293278217316, 0.0952007845044136, 0.058129843324422836, -0.02544867806136608, -0.02081271819770336, 0.00882797222584486, 0.026428375393152237, 0.006290345918387175, -0.007075062487274408, 0.011940923519432545, 0.0003004835161846131, 0.031615857034921646, 0.01650819554924965, 0.0022790234070271254, 0.01238429918885231, 0.021826187148690224, 0.02898724004626274, -0.010960482992231846, 0.1592506766319275, 0.005993171129375696, -0.02614547871053219, 0.00140569603536278, -0.043565426021814346, 0.0026713486295193434, 0.06145155802369118, -0.0853109136223793, 0.027054177597165108, -0.010415909811854362, 0.006106284447014332, 0.04855234920978546, 0.008956543169915676, 0.04000568017363548, -0.0685119777917862, -0.08527049422264099, 0.01677090674638748, 0.0017162910662591457, -0.00004058538979734294, -0.0022643301635980606, -0.09875796735286713, 0.023189077153801918, -0.03596974164247513, -0.06206066533923149, 0.019970983266830444, -0.012117798440158367, 0.04429182782769203, -0.003915708977729082, -0.003900711890310049, -0.040672384202480316, 0.04049918055534363, -0.018157750368118286, 0.04771863669157028, -0.04889999330043793, 0.008134488947689533, -0.09609804302453995, -0.08068438619375229 ]
0.124655
be specified with a `FROM` instruction. If the base model is not the same as the base model that the adapter was tuned from the behaviour will be erratic. #### Safetensor adapter ``` ADAPTER ``` Currently supported Safetensor adapters: - Llama (including Llama 2, Llama 3, and Llama 3.1) - Mistral (including Mistral 1, Mistral 2, and Mixtral) - Gemma (including Gemma 1 and Gemma 2) #### GGUF adapter ``` ADAPTER ./ollama-lora.gguf ``` ### LICENSE The `LICENSE` instruction allows you to specify the legal license under which the model used with this Modelfile is shared or distributed. ``` LICENSE """ """ ``` ### MESSAGE The `MESSAGE` instruction allows you to specify a message history for the model to use when responding. Use multiple iterations of the MESSAGE command to build up a conversation which will guide the model to answer in a similar way. ``` MESSAGE ``` #### Valid roles | Role | Description | | --------- | ------------------------------------------------------------ | | system | Alternate way of providing the SYSTEM message for the model. | | user | An example message of what the user could have asked. | | assistant | An example message of how the model should respond. | #### Example conversation ``` MESSAGE user Is Toronto in Canada? MESSAGE assistant yes MESSAGE user Is Sacramento in Canada? MESSAGE assistant no MESSAGE user Is Ontario in Canada? MESSAGE assistant yes ``` ### REQUIRES The `REQUIRES` instruction allows you to specify the minimum version of Ollama required by the model. ``` REQUIRES ``` The version should be a valid Ollama version (e.g. 0.14.0). ## Notes - the \*\*`Modelfile` is not case sensitive\*\*. In the examples, uppercase instructions are used to make it easier to distinguish it from arguments. - Instructions can be in any order. In the examples, the `FROM` instruction is first to keep it easily readable. [1]: https://ollama.com/library
https://github.com/ollama/ollama/blob/main//docs/modelfile.mdx
main
ollama
[ -0.04271628335118294, -0.052664823830127716, -0.023356927558779716, -0.018642829731106758, 0.029636552557349205, -0.051560912281274796, -0.012565537355840206, 0.004776342771947384, -0.02868194878101349, -0.03908482566475868, 0.058067481964826584, -0.06709016114473343, 0.053125444799661636, -0.01812184415757656, 0.022846966981887817, 0.06483722478151321, 0.04704618453979492, -0.005372417625039816, -0.08690724521875381, 0.07616222649812698, 0.05500590056180954, 0.0884120762348175, 0.013787467032670975, 0.07853133976459503, -0.08631101250648499, -0.018220793455839157, 0.036920737475156784, 0.05010301247239113, -0.00611056899651885, -0.09423483908176422, -0.0035125110298395157, 0.038232915103435516, -0.0008225679048337042, 0.018362538889050484, 0.01643480360507965, -0.009188305586576462, -0.007202631328254938, -0.046815719455480576, -0.06787791848182678, -0.0322214774787426, 0.07616252452135086, -0.013101110234856606, -0.04154577851295471, -0.016427351161837578, 0.016212984919548035, -0.12512247264385223, 0.028730999678373337, -0.04103133827447891, -0.01211492158472538, 0.026941286399960518, -0.03087872453033924, -0.06522715836763382, -0.021862631663680077, -0.018269691616296768, -0.04519285634160042, -0.01709766872227192, -0.03952372446656227, -0.007899153977632523, -0.0036581854801625013, -0.013608405366539955, 0.010272234678268433, 0.05665728822350502, -0.025911390781402588, 0.00037344946758821607, -0.027844052761793137, 0.000021613723220070824, -0.036124467849731445, 0.021740615367889404, -0.04670345038175583, -0.05402154475450516, -0.0687142014503479, -0.028225354850292206, -0.01232802402228117, 0.04231930524110794, -0.0809633880853653, 0.05687978118658066, 0.09170258045196533, 0.01957632042467594, 0.057675864547491074, 0.0016892122803255916, -0.008365418761968613, -0.022820403799414635, 0.00031358652631752193, 0.033490799367427826, 0.034748632460832596, 0.004695352166891098, -0.07338307052850723, 0.05143154039978981, 0.13171474635601044, -0.060541700571775436, 0.0005732115241698921, -0.01709737628698349, 0.026825083419680595, 0.07169315218925476, 0.08838756382465363, 0.022304654121398926, 0.027706114575266838, -0.03949226066470146, -0.08111289888620377, 0.08216678351163864, -0.01428085844963789, -0.014034721069037914, 0.029621588066220284, 0.08716017007827759, -0.03958115354180336, 0.0030791987664997578, 0.018054116517305374, 0.016162127256393433, -0.0721016377210617, -0.020704802125692368, 0.022539565339684486, 0.04484511539340019, 0.0718236193060875, -0.01571284979581833, -0.003498780308291316, 0.041267283260822296, -0.05627516284584999, 0.004065182991325855, -0.057827822864055634, -0.02214464731514454, -0.014412562362849712, -0.04423663765192032, 0.0862000361084938, 0.004327347502112389, 0.07973166555166245, 0.031245926395058632, 0.008864703588187695, 4.0870043093450236e-33, -0.0162640567868948, -0.03602816164493561, 0.009665342979133129, 0.14834026992321014, 0.040271807461977005, 0.014510134235024452, 0.011801611632108688, 0.03390076011419296, -0.1081426739692688, 0.0007849803660064936, -0.05035858601331711, 0.017900994047522545, -0.014531539753079414, 0.03339731693267822, 0.0035148034803569317, 0.011996012181043625, -0.01129990816116333, 0.02973047085106373, 0.05088913440704346, -0.023264441639184952, 0.06802154332399368, -0.017368778586387634, -0.007954111322760582, -0.031748734414577484, 0.021847527474164963, 0.15996159613132477, 0.03396584838628769, -0.023688828572630882, 0.01676536165177822, 0.047967880964279175, 0.03250311687588692, 0.025823423638939857, 0.01694931834936142, -0.0069005610421299934, -0.028293592855334282, 0.007794101256877184, -0.12839210033416748, -0.014335180632770061, -0.08194059878587723, -0.05432352051138878, 0.04128415510058403, -0.02143360674381256, -0.02753290720283985, -0.020041868090629578, 0.022949030622839928, -0.07621986418962479, -0.03428680822253227, 0.06360100209712982, 0.07735193520784378, 0.04189445078372955, -0.020939413458108902, -0.01701333560049534, -0.13184945285320282, 0.01851019822061062, -0.03323737904429436, -0.010942140594124794, -0.031125087291002274, 0.05259372666478157, 0.034231171011924744, 0.014333284460008144, -0.06784109026193619, 0.018755774945020676, -0.04082859680056572, 0.005987860262393951, 0.11650499701499939, 0.009465240873396397, -0.058370690792798996, -0.10783800482749939, -0.0010837193112820387, 0.0014171976363286376, -0.02329297922551632, 0.0031410853844136, -0.034821607172489166, 0.08372042328119278, -0.08336592465639114, -0.10240120440721512, -0.07923681288957596, 0.0469365157186985, 0.019019141793251038, 0.031162705272436142, 0.0005529851769097149, 0.023984864354133606, -0.0031568666454404593, 0.03875838965177536, -0.026845566928386688, -0.07918950915336609, 0.0165299940854311, 0.0210834052413702, -0.07633568346500397, 0.10172521322965622, 0.060518644750118256, 0.016688551753759384, 0.004710003267973661, 0.012333830818533897, 0.030621670186519623, -5.12406069047097e-33, -0.027845704928040504, -0.030410494655370712, -0.030328799039125443, 0.008243067190051079, 0.008620782755315304, -0.06470228731632233, 0.013409276492893696, 0.053354330360889435, -0.023970676586031914, -0.027881132438778877, -0.031830187886953354, 0.04532482475042343, 0.032363127917051315, -0.03337446227669716, 0.06619980931282043, -0.021186286583542824, -0.0463005006313324, -0.08434339612722397, -0.0026212872471660376, 0.01805621199309826, 0.005083790980279446, 0.030581597238779068, -0.031098593026399612, -0.027125027030706406, -0.007745145820081234, -0.002985360799357295, -0.005011690314859152, 0.02814565785229206, 0.011810715310275555, -0.023692555725574493, 0.021480122581124306, 0.08016973733901978, -0.038037918508052826, 0.01581641659140587, 0.0008696720469743013, -0.003073020139709115, -0.03997064754366875, -0.027211500331759453, 0.028307892382144928, 0.020947538316249847, 0.06968433409929276, 0.04443434998393059, -0.08602812886238098, -0.04085874184966087, -0.04133420065045357, -0.031221207231283188, 0.018424440175294876, -0.12149330228567123, 0.028769133612513542, -0.04076628014445305, 0.028846267610788345, -0.10269500315189362, 0.053495194762945175, 0.00904450099915266, 0.034265466034412384, 0.013629041612148285, 0.11638209223747253, -0.06730514764785767, -0.003796165343374014, -0.027214592322707176, 0.10964860767126083, -0.05088823661208153, -0.0236054714769125, -0.07886422425508499, -0.016111955046653748, 0.002723817713558674, -0.027498530223965645, -0.006276512052863836, 0.0976390615105629, 0.03826813027262688, 0.05411549657583237, -0.06711659580469131, 0.0050917682237923145, -0.08154052495956421, 0.10055091977119446, -0.019642893224954605, -0.14346379041671753, 0.00009067513747140765, -0.018285712227225304, -0.08831380307674408, -0.04593431204557419, -0.010305272415280342, 0.05625205114483833, 0.11807911843061447, -0.006748161278665066, -0.038516294211149216, 0.08935064822435379, 0.06306455284357071, 0.0459146611392498, 0.020839476957917213, -0.07619834691286087, -0.021818406879901886, 0.004086009226739407, 0.12174241244792938, -0.032026827335357666, -5.753261689278588e-8, -0.12155517190694809, -0.050180528312921524, -0.10700489580631256, 0.06343799084424973, -0.020460234954953194, 0.05629899352788925, -0.06322500854730606, -0.062110722064971924, 0.0393281914293766, 0.0735950693488121, 0.05560702830553055, -0.015218247659504414, -0.036423515528440475, -0.0037916377186775208, 0.05586762726306915, -0.002453453605994582, 0.018702689558267593, 0.024583034217357635, -0.04649757593870163, -0.07919636368751526, 0.039841338992118835, 0.060684312134981155, 0.013573918491601944, -0.014213179238140583, 0.033407215029001236, -0.0064918845891952515, -0.0787321925163269, 0.0725865587592125, -0.018214788287878036, 0.0172446109354496, 0.006891926284879446, -0.04668206349015236, -0.02459515817463398, 0.04615623876452446, -0.12445899844169617, 0.01333748921751976, 0.05410415306687355, -0.014243998564779758, 0.10239650309085846, -0.0045872824266552925, 0.10041455179452896, 0.06931912153959274, -0.11347735673189163, -0.003931040409952402, 0.03753698617219925, 0.003586758393794298, -0.04495285078883171, -0.11581859737634659, -0.01404550950974226, 0.04942856356501579, -0.048012420535087585, -0.02606828510761261, -0.046410806477069855, 0.06029956787824631, -0.0486852265894413, -0.10052730143070221, -0.003519771620631218, 0.008357584476470947, 0.02015201933681965, 0.00863782037049532, 0.03763395547866821, 0.018413808196783066, 0.0032246361952275038, -0.03450360149145126 ]
0.069349
This quickstart will walk your through running your first model with Ollama. To get started, download Ollama on macOS, Windows or Linux. [Download Ollama](https://ollama.com/download) ## Run a model Open a terminal and run the command: ```sh ollama run gemma3 ``` ```sh ollama pull gemma3 ``` Lastly, chat with the model: ```shell curl http://localhost:11434/api/chat -d '{ "model": "gemma3", "messages": [{ "role": "user", "content": "Hello there!" }], "stream": false }' ``` Start by downloading a model: ```sh ollama pull gemma3 ``` Then install Ollama's Python library: ```sh pip install ollama ``` Lastly, chat with the model: ```python from ollama import chat from ollama import ChatResponse response: ChatResponse = chat(model='gemma3', messages=[ { 'role': 'user', 'content': 'Why is the sky blue?', }, ]) print(response['message']['content']) # or access fields directly from the response object print(response.message.content) ``` Start by downloading a model: ``` ollama pull gemma3 ``` Then install the Ollama JavaScript library: ``` npm i ollama ``` Lastly, chat with the model: ```shell import ollama from 'ollama' const response = await ollama.chat({ model: 'gemma3', messages: [{ role: 'user', content: 'Why is the sky blue?' }], }) console.log(response.message.content) ``` See a full list of available models [here](https://ollama.com/models). ## Coding For coding use cases, we recommend using the `glm-4.7-flash` model. Note: this model requires 23 GB of VRAM with 64000 tokens context length. ```sh ollama pull glm-4.7-flash ``` Alternatively, you can use a more powerful cloud model (with full context length): ```sh ollama pull glm-4.7:cloud ``` Use `ollama launch` to quickly set up a coding tool with Ollama models: ```sh ollama launch ``` ### Supported integrations - [OpenCode](/integrations/opencode) - Open-source coding assistant - [Claude Code](/integrations/claude-code) - Anthropic's agentic coding tool - [Codex](/integrations/codex) - OpenAI's coding assistant - [Droid](/integrations/droid) - Factory's AI coding agent ### Launch with a specific model ```sh ollama launch claude --model glm-4.7-flash ``` ### Configure without launching ```sh ollama launch claude --config ```
https://github.com/ollama/ollama/blob/main//docs/quickstart.mdx
main
ollama
[ -0.050011586397886276, -0.06447439640760422, 0.0030131216626614332, 0.04464908316731453, -0.05147344619035721, -0.11914996057748795, -0.012835482135415077, -0.016382401809096336, 0.027275070548057556, -0.05011850968003273, 0.060100916773080826, -0.05256408825516701, -0.06300715357065201, 0.02484992891550064, 0.11113526672124863, 0.018092723563313484, 0.0341084860265255, -0.037536781281232834, -0.029163731262087822, -0.02313416451215744, 0.07421188056468964, 0.03026607446372509, 0.04925594851374626, 0.03999750316143036, -0.038156475871801376, -0.03456513583660126, 0.045328352600336075, 0.06466875970363617, -0.016803434118628502, -0.06908728182315826, 0.03901584446430206, -0.02915509231388569, 0.012131817638874054, 0.0188443623483181, 0.019661640748381615, 0.047257039695978165, 0.04862333834171295, -0.10832573473453522, -0.056203726679086685, -0.001736893318593502, 0.05394617095589638, 0.013191848993301392, -0.05507490038871765, -0.0917239710688591, 0.03393654152750969, -0.13426825404167175, -0.018420007079839706, -0.03844187781214714, 0.07464808970689774, 0.0045083132572472095, -0.08898685872554779, -0.06688366085290909, -0.028865348547697067, 0.10162157565355301, 0.013533472083508968, 0.05090588331222534, -0.06057273596525192, -0.03874755650758743, 0.016735868528485298, -0.05495740473270416, -0.021680103614926338, -0.004908709321171045, -0.018429962918162346, 0.006754265632480383, 0.00037135224556550384, -0.02880500815808773, -0.09535088390111923, 0.03991951048374176, 0.0294906347990036, 0.0006823672447353601, -0.0518491230905056, -0.015854164958000183, 0.004761627409607172, -0.0012801382690668106, -0.02546849101781845, -0.05565447360277176, 0.11121471226215363, -0.018417347222566605, -0.027543706819415092, 0.03492821380496025, -0.05194180831313133, -0.06393954157829285, -0.01578211411833763, 0.02906360849738121, 0.007859228178858757, 0.02873358316719532, -0.03369509428739548, 0.036502111703157425, 0.021317657083272934, -0.0397687591612339, -0.05014311149716377, 0.03336464986205101, -0.02014111541211605, 0.035790566354990005, 0.01878267154097557, 0.014123202301561832, 0.06774213910102844, 0.01757844164967537, -0.010992300696671009, 0.11823246628046036, 0.0005892793997190893, -0.029548298567533493, 0.03930795565247536, 0.01767592877149582, -0.014400560408830643, -0.006938890088349581, 0.05354149267077446, 0.028729505836963654, -0.04201409965753555, 0.02735930122435093, -0.05611340329051018, -0.05341613292694092, 0.04942955821752548, 0.012939834035933018, -0.007292250636965036, 0.050236333161592484, -0.02898544631898403, 0.011784940026700497, 0.02914765477180481, 0.07366872578859329, 0.11937322467565536, -0.05267585068941116, 0.040911782532930374, 0.07208852469921112, 0.06412442773580551, 0.08601817488670349, 0.0038632082287222147, 6.149087723626174e-33, 0.07395501434803009, -0.00493340939283371, 0.01822463981807232, 0.09795022755861282, 0.08378061652183533, 0.07331058382987976, 0.039533257484436035, -0.057837024331092834, -0.07022009044885635, -0.030442096292972565, -0.08404377847909927, 0.04128876328468323, -0.06070850044488907, -0.00746262539178133, -0.01907735876739025, -0.012168416753411293, -0.045477546751499176, 0.0329168401658535, 0.07326050102710724, 0.03287483751773834, 0.04236156493425369, 0.0036104125902056694, -0.0014835470356047153, 0.002131224609911442, 0.02301877737045288, 0.0649849995970726, -0.05051044374704361, -0.06861376017332077, -0.04833966866135597, 0.0483073964715004, 0.10086088627576828, -0.0031494470313191414, -0.03124491684138775, -0.04142998158931732, 0.011385222896933556, -0.030022067949175835, -0.04851999133825302, -0.05539111793041229, -0.06458622962236404, -0.059366270899772644, -0.06068752333521843, -0.020293883979320526, 0.0012536065187305212, -0.08422139286994934, -0.11392729729413986, -0.08330124616622925, -0.07546267658472061, 0.03934226930141449, 0.03935491293668747, 0.023925261572003365, 0.01055504847317934, -0.021692639216780663, -0.021740321069955826, 0.0137278251349926, -0.029300762340426445, -0.05286766588687897, -0.019900303333997726, -0.0198808666318655, 0.06913778930902481, -0.01727617159485817, -0.03505818173289299, 0.02412520721554756, 0.004422219470143318, -0.061303820461034775, 0.067304827272892, -0.027186250314116478, -0.0065135951153934, 0.027338605374097824, 0.023556165397167206, 0.018543409183621407, -0.07224418967962265, 0.008223927579820156, -0.006931208074092865, 0.06287005543708801, -0.04722510278224945, -0.03608454018831253, -0.0005078391404822469, -0.027583908289670944, -0.014482593163847923, 0.06956420838832855, 0.04285654425621033, -0.039076924324035645, -0.02622789889574051, -0.024102257564663887, 0.018458450213074684, -0.006843097507953644, 0.06121391803026199, -0.0011415013577789068, -0.020213274285197258, 0.04848210886120796, -0.035909995436668396, 0.04107730835676193, 0.032445963472127914, -0.008672847412526608, -0.02860081009566784, -5.9250811120296633e-33, 0.056851826608181, 0.017812291160225868, -0.0036021701525896788, -0.07127770036458969, 0.05197342485189438, -0.012819060124456882, 0.0460243821144104, 0.055944252759218216, 0.021114889532327652, -0.000498030916787684, -0.023755831643939018, -0.029228681698441505, 0.05701669678092003, 0.0037489146925508976, 0.1151764988899231, 0.0018861270509660244, -0.04400542378425598, -0.0908828005194664, 0.026345059275627136, -0.026199882850050926, -0.09276597946882248, 0.01399820763617754, -0.10828511416912079, 0.008337714709341526, 0.005868945270776749, -0.02542983926832676, -0.012112333439290524, 0.0388886034488678, -0.05852559208869934, -0.044030167162418365, -0.03147885948419571, 0.03272004425525665, -0.06819819658994675, 0.06481015682220459, -0.017211245372891426, 0.07975004613399506, 0.041086066514253616, 0.048343658447265625, 0.0034707507584244013, 0.03781409189105034, 0.10894612967967987, -0.00003562028723536059, -0.10731298476457596, -0.040495336055755615, -0.046866465359926224, 0.10186110436916351, 0.0004718750424217433, 0.044404786080121994, -0.10695167630910873, 0.006576995365321636, 0.0557522177696228, -0.02688455954194069, 0.03643088415265083, 0.008037272840738297, 0.033046696335077286, -0.054284047335386276, 0.07688336819410324, -0.09145047515630722, -0.040298886597156525, -0.02753383480012417, 0.028283361345529556, -0.09929927438497543, 0.037298496812582016, -0.028929896652698517, -0.022040726616978645, -0.07699237018823624, -0.0651230588555336, 0.01706698350608349, -0.016842905431985855, -0.029372772201895714, -0.06011638045310974, -0.024197442457079887, 0.023674778640270233, -0.001875631045550108, 0.12339295446872711, 0.04013870283961296, -0.15171001851558685, -0.004259129986166954, -0.002811640501022339, 0.016142746433615685, -0.05405987799167633, -0.022982997819781303, 0.09449378401041031, 0.05697641149163246, 0.03544106334447861, 0.032891713082790375, 0.10113490372896194, 0.10234037786722183, 0.007170494645833969, -0.027642183005809784, -0.028603123500943184, 0.02466774173080921, 0.039363566786050797, 0.11005610227584839, 0.027106797322630882, -4.768157424450692e-8, -0.11527899652719498, -0.09596961736679077, -0.004334920085966587, 0.046648528426885605, -0.06623313575983047, 0.06994237750768661, 0.01517408061772585, -0.005186043214052916, 0.04548744857311249, 0.025543181225657463, 0.010924635455012321, 0.036153264343738556, 0.012413918040692806, -0.057176101952791214, -0.03127502650022507, 0.05523093044757843, -0.027075011283159256, 0.05303647741675377, 0.009752475656569004, -0.05722779035568237, 0.09701595455408096, 0.02950766496360302, 0.01937323994934559, 0.058047641068696976, 0.012263141572475433, -0.032317616045475006, -0.043058767914772034, 0.051398999989032745, -0.12831582129001617, -0.05657903105020523, -0.026186121627688408, -0.05870591104030609, 0.06474999338388443, -0.016833478584885597, 0.00041807210072875023, -0.0378839373588562, -0.026502076536417007, -0.002310967305675149, -0.04291551560163498, -0.004075893200933933, 0.1190013661980629, 0.026637252420186996, -0.06290493160486221, -0.08153161406517029, 0.0834294930100441, 0.05913113057613373, 0.019973604008555412, -0.11288286000490189, 0.033782295882701874, 0.005274847615510225, -0.01611315831542015, -0.03838468715548515, 0.03444980829954147, 0.03374671936035156, -0.032688453793525696, -0.06623726338148117, 0.006636353675276041, -0.008666262961924076, -0.019029581919312477, -0.0016309075290337205, 0.07282387465238571, 0.08352404832839966, 0.0326334573328495, 0.012071117758750916 ]
0.133258
## Cloud Models Ollama's cloud models are a new kind of model in Ollama that can run without a powerful GPU. Instead, cloud models are automatically offloaded to Ollama's cloud service while offering the same capabilities as local models, making it possible to keep using your local tools while running larger models that wouldn't fit on a personal computer. ### Supported models For a list of supported models, see Ollama's [model library](https://ollama.com/search?c=cloud). ### Running Cloud models Ollama's cloud models require an account on [ollama.com](https://ollama.com). To sign in or create an account, run: ``` ollama signin ``` To run a cloud model, open the terminal and run: ``` ollama run gpt-oss:120b-cloud ``` First, pull a cloud model so it can be accessed: ``` ollama pull gpt-oss:120b-cloud ``` Next, install [Ollama's Python library](https://github.com/ollama/ollama-python): ``` pip install ollama ``` Next, create and run a simple Python script: ```python from ollama import Client client = Client() messages = [ { 'role': 'user', 'content': 'Why is the sky blue?', }, ] for part in client.chat('gpt-oss:120b-cloud', messages=messages, stream=True): print(part['message']['content'], end='', flush=True) ``` First, pull a cloud model so it can be accessed: ``` ollama pull gpt-oss:120b-cloud ``` Next, install [Ollama's JavaScript library](https://github.com/ollama/ollama-js): ``` npm i ollama ``` Then use the library to run a cloud model: ```typescript import { Ollama } from "ollama"; const ollama = new Ollama(); const response = await ollama.chat({ model: "gpt-oss:120b-cloud", messages: [{ role: "user", content: "Explain quantum computing" }], stream: true, }); for await (const part of response) { process.stdout.write(part.message.content); } ``` First, pull a cloud model so it can be accessed: ``` ollama pull gpt-oss:120b-cloud ``` Run the following cURL command to run the command via Ollama's API: ``` curl http://localhost:11434/api/chat -d '{ "model": "gpt-oss:120b-cloud", "messages": [{ "role": "user", "content": "Why is the sky blue?" }], "stream": false }' ``` ## Cloud API access Cloud models can also be accessed directly on ollama.com's API. In this mode, ollama.com acts as a remote Ollama host. ### Authentication For direct access to ollama.com's API, first create an [API key](https://ollama.com/settings/keys). Then, set the `OLLAMA\_API\_KEY` environment variable to your API key. ``` export OLLAMA\_API\_KEY=your\_api\_key ``` ### Listing models For models available directly via Ollama's API, models can be listed via: ``` curl https://ollama.com/api/tags ``` ### Generating a response First, install [Ollama's Python library](https://github.com/ollama/ollama-python) ``` pip install ollama ``` Then make a request ```python import os from ollama import Client client = Client( host="https://ollama.com", headers={'Authorization': 'Bearer ' + os.environ.get('OLLAMA\_API\_KEY')} ) messages = [ { 'role': 'user', 'content': 'Why is the sky blue?', }, ] for part in client.chat('gpt-oss:120b', messages=messages, stream=True): print(part['message']['content'], end='', flush=True) ``` First, install [Ollama's JavaScript library](https://github.com/ollama/ollama-js): ``` npm i ollama ``` Next, make a request to the model: ```typescript import { Ollama } from "ollama"; const ollama = new Ollama({ host: "https://ollama.com", headers: { Authorization: "Bearer " + process.env.OLLAMA\_API\_KEY, }, }); const response = await ollama.chat({ model: "gpt-oss:120b", messages: [{ role: "user", content: "Explain quantum computing" }], stream: true, }); for await (const part of response) { process.stdout.write(part.message.content); } ``` Generate a response via Ollama's chat API: ``` curl https://ollama.com/api/chat \ -H "Authorization: Bearer $OLLAMA\_API\_KEY" \ -d '{ "model": "gpt-oss:120b", "messages": [{ "role": "user", "content": "Why is the sky blue?" }], "stream": false }' ```
https://github.com/ollama/ollama/blob/main//docs/cloud.mdx
main
ollama
[ -0.06485563516616821, -0.061392780393362045, -0.030363405123353004, 0.04743262007832527, -0.01290776114910841, -0.10485905408859253, -0.07925081253051758, 0.007906731218099594, 0.02147585339844227, -0.027447396889328957, 0.002947772853076458, 0.024645134806632996, -0.04560761898756027, -0.02692582458257675, 0.08308543264865875, -0.00045330036664381623, 0.1215083971619606, -0.09380494803190231, -0.05182742327451706, 0.03425344452261925, 0.05454830825328827, 0.009741561487317085, -0.037061579525470734, 0.027407057583332062, -0.01792968437075615, -0.059586212038993835, -0.011001808568835258, 0.03697138652205467, -0.01929090917110443, -0.006186787039041519, 0.03692533075809479, -0.05402108281850815, -0.03228502348065376, 0.069669209420681, 0.06849946826696396, -0.025308487936854362, -0.015544652007520199, -0.10811799764633179, -0.07990728318691254, -0.043391674757003784, 0.06456205248832703, -0.04412652924656868, -0.08353915810585022, -0.021313238888978958, 0.04330858588218689, -0.06187276169657707, 0.01085781678557396, -0.04534195363521576, 0.025440609082579613, -0.030841942876577377, -0.04185034707188606, -0.04828385263681412, -0.004254512954503298, 0.010293050669133663, -0.02669539302587509, 0.03640669956803322, 0.024610033258795738, -0.0763750672340393, 0.04140539467334747, 0.012334313243627548, -0.020224381238222122, -0.010335631668567657, -0.02883579581975937, 0.052714258432388306, -0.02251863107085228, -0.012624092400074005, -0.0003005028120242059, -0.010072941891849041, 0.0322418175637722, -0.05266512557864189, 0.030492626130580902, 0.030343128368258476, -0.025058239698410034, 0.04070374742150307, 0.007494380697607994, -0.03777917101979256, 0.08439719676971436, -0.0020339617040008307, 0.058245718479156494, 0.07391779124736786, -0.035153813660144806, -0.017377760261297226, 0.031942009925842285, 0.04431311786174774, 0.01582944765686989, 0.009693234227597713, -0.0028978066984564066, 0.043300069868564606, 0.10718756169080734, -0.10673502832651138, 0.03592369705438614, 0.019367720931768417, -0.002172938548028469, -0.045804962515830994, 0.045713312923908234, -0.05934685096144676, 0.08774057775735855, -0.02986879274249077, -0.06455592811107635, 0.07096600532531738, -0.055659398436546326, -0.02570454403758049, 0.04932546615600586, 0.07343986630439758, -0.04102400317788124, 0.06254041194915771, 0.042333606630563736, 0.07747334241867065, -0.03919330611824989, 0.0016550689470022917, 0.027922241017222404, -0.08277138322591782, 0.035215798765420914, 0.02288893610239029, -0.001337077934294939, 0.03871704265475273, -0.06900610774755478, 0.0005231702816672623, -0.011389646679162979, 0.008942022919654846, -0.010767090134322643, -0.0697832703590393, 0.07623409479856491, -0.02140861004590988, -0.01634499616920948, 0.09501158446073532, -0.11310701072216034, 5.47875141715221e-33, 0.11270880699157715, 0.007409980054944754, 0.042891379445791245, -0.035464175045490265, 0.07049194723367691, 0.05940426513552666, -0.00794732291251421, -0.06923023611307144, -0.05202076584100723, 0.0144960917532444, -0.08895996958017349, 0.10753972083330154, -0.02743169479072094, 0.05800692364573479, 0.08192623406648636, 0.01297020260244608, -0.024820851162075996, 0.011511370539665222, 0.09666021913290024, 0.05654250457882881, 0.08192397654056549, -0.00016704188601579517, 0.061785560101270676, 0.009061911143362522, -0.04976441711187363, 0.07849682867527008, -0.031521961092948914, -0.02448749728500843, 0.03867126628756523, 0.050267912447452545, 0.08237754553556442, -0.04580814763903618, -0.04984103888273239, -0.0226005669683218, 0.009974689222872257, 0.02204722911119461, -0.08406634628772736, -0.06782042235136032, 0.005648514721542597, -0.03096688538789749, 0.03209911659359932, 0.03245210275053978, 0.01801169104874134, -0.0725478082895279, -0.08578889071941376, 0.031145885586738586, 0.035137809813022614, -0.0043294355273246765, 0.07044737786054611, 0.05806500464677811, -0.06955180317163467, 0.02042369730770588, -0.1115093007683754, -0.009897294454276562, -0.0356522798538208, 0.018149953335523605, 0.04922754317522049, -0.03471020609140396, 0.16688892245292664, -0.03554884344339371, -0.08138105273246765, -0.031062722206115723, -0.00034989890991710126, -0.01803254708647728, -0.03646719455718994, -0.07518453896045685, -0.020081400871276855, 0.05109782889485359, -0.02579614892601967, 0.050484295934438705, -0.04427046328783035, -0.019206171855330467, -0.050373271107673645, 0.06965842843055725, 0.0690678060054779, -0.08050765842199326, 0.005005324259400368, -0.04303405433893204, -0.07805810123682022, 0.029708076268434525, 0.004354191478341818, 0.013604292646050453, -0.00015068292850628495, 0.00675332872197032, -0.0323287658393383, -0.035994525998830795, 0.0246256235986948, 0.07215134054422379, -0.0660882517695427, -0.022145254537463188, -0.0034406178165227175, -0.020246684551239014, 0.061518654227256775, 0.019364479929208755, -0.034780099987983704, -6.446331674040744e-33, -0.00726226856932044, -0.08133793622255325, 0.006521004717797041, 0.034806475043296814, 0.05267466977238655, -0.05061163380742073, 0.02000182680785656, 0.034554414451122284, -0.021372798830270767, -0.031114419922232628, 0.024447785690426826, 0.035137806087732315, 0.08852379024028778, 0.03673286363482475, 0.12292101979255676, -0.06747957319021225, -0.08782559633255005, -0.059479452669620514, -0.039602573961019516, -0.002352109644562006, -0.08615662902593613, -0.013484940864145756, -0.01186410989612341, -0.034059714525938034, 0.017632359638810158, 0.013831410557031631, -0.029645701870322227, -0.03459254279732704, 0.011602618731558323, -0.02226945199072361, -0.055687155574560165, 0.10002974420785904, -0.053364042192697525, 0.04135725274682045, -0.02482389658689499, 0.06616399437189102, 0.003731999546289444, -0.0019974347669631243, -0.03919319063425064, -0.0002508399775251746, 0.08581850677728653, -0.04092670604586601, 0.005077785346657038, -0.049180205911397934, -0.011046163737773895, 0.0755702555179596, -0.011135086417198181, 0.028645116835832596, -0.08658553659915924, -0.013708249665796757, 0.018820032477378845, -0.0029683380853384733, 0.02242160588502884, 0.029486706480383873, 0.04706190899014473, -0.06275874376296997, 0.0570732057094574, 0.025511985644698143, -0.05132494121789932, -0.038062650710344315, 0.06621821224689484, -0.08086594194173813, 0.04879976436495781, 0.012021265923976898, -0.08255830407142639, -0.05130154266953468, -0.03807833045721054, 0.005740310065448284, -0.024173259735107422, 0.015777913853526115, -0.14026837050914764, -0.042186420410871506, 0.025000503286719322, -0.0020744402427226305, -0.014712774194777012, 0.01830475404858589, -0.18960662186145782, -0.04695240408182144, 0.03209422901272774, -0.03775618225336075, -0.041137680411338806, 0.01528928428888321, 0.0709380954504013, -0.022140400484204292, 0.0788344144821167, -0.06500844657421112, 0.10172967612743378, 0.02954724058508873, 0.012271353974938393, 0.015355736948549747, -0.09582661837339401, 0.019661208614706993, 0.030477765947580338, 0.11319287121295929, 0.004168928135186434, -4.6333980208146386e-8, -0.01609828509390354, 0.0336356982588768, 0.06252694129943848, 0.0834004282951355, -0.04837638884782791, -0.015047697350382805, 0.06418696790933609, -0.005218490958213806, 0.03527138754725456, 0.05729066580533981, 0.04691113531589508, -0.013758258894085884, -0.0048703220672905445, -0.02345868945121765, -0.023758793249726295, 0.11382970213890076, 0.02465037629008293, 0.015697602182626724, 0.034011486917734146, -0.05457182601094246, -0.03602423891425133, -0.017293041571974754, 0.010038146749138832, 0.02025950700044632, 0.01757550798356533, 0.0156756192445755, -0.020628677681088448, 0.045963678508996964, -0.06993025541305542, -0.05115937441587448, -0.027641743421554565, -0.024874363094568253, 0.0706559494137764, -0.03951295092701912, 0.0053514656610786915, -0.010446424596011639, -0.024944592267274857, 0.010301676578819752, 0.03995831683278084, -0.043709106743335724, 0.005387987941503525, 0.010712429881095886, 0.003444668371230364, -0.08571728318929672, 0.05819149687886238, 0.0663343295454979, -0.0017497724620625377, -0.038381703197956085, -0.0580102875828743, 0.12019697576761246, -0.010408359579741955, -0.07252898067235947, -0.025290900841355324, 0.055068012326955795, 0.0025835756678134203, -0.06645926088094711, -0.06103122979402542, -0.04445797950029373, -0.029624508693814278, 0.041015636175870895, 0.049411430954933167, -0.021169425919651985, 0.056070782244205475, -0.012273975647985935 ]
0.043686
## System Requirements \* MacOS Sonoma (v14) or newer \* Apple M series (CPU and GPU support) or x86 (CPU only) ## Filesystem Requirements The preferred method of installation is to mount the `ollama.dmg` and drag-and-drop the Ollama application to the system-wide `Applications` folder. Upon startup, the Ollama app will verify the `ollama` CLI is present in your PATH, and if not detected, will prompt for permission to create a link in `/usr/local/bin` Once you've installed Ollama, you'll need additional space for storing the Large Language models, which can be tens to hundreds of GB in size. If your home directory doesn't have enough space, you can change where the binaries are installed, and where the models are stored. ### Changing Install Location To install the Ollama application somewhere other than `Applications`, place the Ollama application in the desired location, and ensure the CLI `Ollama.app/Contents/Resources/ollama` or a sym-link to the CLI can be found in your path. Upon first start decline the "Move to Applications?" request. ## Troubleshooting Ollama on MacOS stores files in a few different locations. - `~/.ollama` contains models and configuration - `~/.ollama/logs` contains logs - \*app.log\* contains most recent logs from the GUI application - \*server.log\* contains the most recent server logs - `/Ollama.app/Contents/Resources/ollama` the CLI binary ## Uninstall To fully remove Ollama from your system, remove the following files and folders: ``` sudo rm -rf /Applications/Ollama.app sudo rm /usr/local/bin/ollama rm -rf "~/Library/Application Support/Ollama" rm -rf "~/Library/Saved Application State/com.electron.ollama.savedState" rm -rf ~/Library/Caches/com.electron.ollama/ rm -rf ~/Library/Caches/ollama rm -rf ~/Library/WebKit/com.electron.ollama rm -rf ~/.ollama ```
https://github.com/ollama/ollama/blob/main//docs/macos.mdx
main
ollama
[ 0.013805510476231575, -0.03131522610783577, -0.07331958413124084, -0.08696793764829636, 0.004233058542013168, -0.06313952803611755, -0.07788905501365662, 0.0697302594780922, -0.027629686519503593, -0.012828673236072063, 0.02906203083693981, -0.04792023450136185, -0.07769902795553207, 0.015952492132782936, 0.05952299013733864, 0.07827768474817276, 0.07063925266265869, 0.001722776796668768, -0.0014731728006154299, 0.03555397689342499, 0.11368496716022491, -0.009602094069123268, 0.022316627204418182, 0.02125578001141548, 0.01167851872742176, 0.04378673806786537, 0.09067215025424957, 0.05524403229355812, -0.0305820070207119, -0.0477571077644825, 0.009262699633836746, -0.009135481901466846, 0.05887618288397789, -0.0342533215880394, 0.1136154904961586, 0.020581981167197227, 0.06828916072845459, -0.14746950566768646, -0.11371567845344543, -0.08951771259307861, 0.01182347908616066, 0.08785729110240936, 0.03851998969912529, 0.04945722222328186, 0.015188694931566715, -0.09368272870779037, 0.07631265372037888, -0.017890283837914467, 0.10843438655138016, 0.007497919257730246, -0.010600519366562366, -0.09646403789520264, 0.010011348873376846, 0.030414270237088203, 0.01147691160440445, 0.04320089891552925, 0.01760672964155674, -0.0807100161910057, -0.0010182897094637156, 0.04043356701731682, 0.013339882716536522, 0.033509738743305206, 0.008807403966784477, 0.06143677979707718, -0.03749396651983261, -0.019500868394970894, 0.012494170106947422, -0.000919366255402565, 0.0045202490873634815, -0.04492824524641037, 0.01642942614853382, 0.0030514125246554613, 0.006334812380373478, 0.10338342189788818, -0.04857761040329933, -0.003510241163894534, 0.089960016310215, 0.009573528543114662, 0.02629837952554226, -0.003263952909037471, 0.007949418388307095, 0.06981620192527771, 0.04957969859242439, 0.011377383023500443, 0.003137732855975628, 0.04602803289890289, 0.026519738137722015, -0.006056619808077812, 0.05262179300189018, 0.012722446583211422, 0.04265948757529259, -0.08323294669389725, 0.06268837302923203, -0.033440638333559036, 0.053894951939582825, -0.07289113104343414, 0.058939725160598755, 0.04901609942317009, 0.00510493665933609, 0.06117165833711624, -0.0025174508336931467, -0.07747471332550049, 0.07410205155611038, 0.0812116414308548, -0.1014891192317009, 0.03562202304601669, 0.06881576031446457, 0.07264372706413269, -0.08428198844194412, 0.005569219123572111, 0.0018425569869577885, -0.06361442804336548, -0.01832835003733635, 0.058562085032463074, 0.019478382542729378, 0.006705612875521183, -0.00782815832644701, -0.00968892965465784, -0.020723577588796616, 0.022832371294498444, -0.009510461241006851, -0.047398705035448074, 0.05541476979851723, -0.03151156008243561, 0.058591194450855255, 0.04884236678481102, -0.07616820931434631, 5.390801297165671e-33, 0.05791724473237991, 0.0747576653957367, -0.048992596566677094, 0.05819815397262573, -0.0007734950049780309, -0.0008916578954085708, 0.06394502520561218, -0.034289125353097916, -0.05322558432817459, -0.04258774220943451, -0.05151006951928139, 0.08110823482275009, -0.09574219584465027, 0.02483002096414566, 0.09227922558784485, -0.024725275114178658, 0.05697266012430191, 0.02868647687137127, 0.052394967526197433, -0.016153311356902122, 0.03499332070350647, 0.017480049282312393, -0.035962171852588654, -0.07473455369472504, -0.06557995080947876, 0.07540637999773026, 0.004417821299284697, -0.07204394042491913, 0.011519033461809158, 0.026668479666113853, 0.002795859007164836, -0.01956135965883732, -0.034511830657720566, -0.02607513964176178, 0.004615119658410549, -0.01946980319917202, -0.030640078708529472, -0.0679464265704155, -0.014107215218245983, -0.0547124482691288, -0.019031817093491554, 0.04940781369805336, 0.012110546231269836, -0.0410882942378521, 0.06010531261563301, -0.012005437165498734, -0.013105327263474464, 0.001259739976376295, 0.03617968410253525, -0.04418431594967842, -0.011719603091478348, -0.0038362538907676935, -0.029935140162706375, 0.019674109295010567, -0.008406205102801323, 0.0005708792596124113, -0.00923935417085886, -0.08069384098052979, 0.13903819024562836, -0.012610625475645065, -0.024029500782489777, -0.0009532857802696526, 0.06763316690921783, 0.03234270215034485, 0.030887415632605553, -0.05153607577085495, 0.017388219013810158, -0.03773723170161247, -0.0013294083764776587, 0.023803796619176865, -0.07971732318401337, -0.09678228199481964, 0.009301788173615932, 0.05245594680309296, -0.04759541153907776, -0.03742970898747444, -0.029533790424466133, -0.035194337368011475, -0.12841464579105377, 0.008955135941505432, 0.006627729162573814, -0.06218939647078514, 0.021411314606666565, 0.011055022478103638, 0.08353373408317566, -0.010940274223685265, 0.0456218384206295, 0.01591813750565052, -0.03731635585427284, 0.05782896280288696, 0.028677774593234062, -0.0013619664823636413, -0.01593443937599659, -0.026593612506985664, -0.045013055205345154, -6.381165205967034e-33, 0.04802864044904709, -0.08961423486471176, 0.03558967262506485, -0.023039881139993668, -0.0906282514333725, 0.007779201027005911, -0.048398930579423904, 0.05788330361247063, -0.06018605828285217, -0.0768132209777832, -0.03162195533514023, -0.028835544362664223, 0.13365665078163147, -0.06577442586421967, 0.00639009615406394, -0.04817332699894905, -0.051914144307374954, 0.03677679970860481, 0.02140706591308117, -0.0006522628827951849, -0.045157093554735184, 0.020392343401908875, 0.021868444979190826, -0.02465837262570858, 0.019337577745318413, -0.08426781743764877, -0.08857698738574982, -0.03187666833400726, -0.04593515396118164, 0.03904884308576584, -0.031598348170518875, -0.016699684783816338, -0.07278184592723846, -0.009925942867994308, -0.026606405153870583, 0.03355057165026665, 0.004190018866211176, -0.0036220932379364967, -0.027672702446579933, 0.049797166138887405, 0.06519138813018799, -0.04632385075092316, -0.0661526471376419, -0.1170400083065033, -0.046419352293014526, 0.09249036759138107, -0.07981054484844208, 0.03493037074804306, -0.022436756640672684, -0.07806779444217682, 0.02280922420322895, -0.019426852464675903, 0.06415575742721558, -0.02321789786219597, 0.07663222402334213, 0.023370688781142235, 0.07120779156684875, -0.032376039773225784, -0.006539087742567062, -0.001936450251378119, -0.009767393581569195, -0.04623356834053993, -0.0018909214995801449, -0.08716755360364914, -0.05028805136680603, -0.0886390432715416, -0.07767432928085327, 0.016288788989186287, -0.07626987993717194, 0.046508461236953735, -0.05685693770647049, 0.015912747010588646, 0.026481792330741882, 0.0373167060315609, 0.021489610895514488, 0.012120163068175316, -0.09882436692714691, -0.05804430693387985, 0.09999213367700577, -0.007198898121714592, -0.019175203517079353, 0.09909413754940033, 0.05457492172718048, 0.00968326348811388, 0.03608107194304466, -0.009673125110566616, 0.09341764450073242, -0.03634149581193924, -0.000495997432153672, -0.03628228232264519, 0.001637100474908948, 0.046771686524152756, 0.012144756503403187, 0.04609464481472969, -0.03196281939744949, -5.8829826343753666e-8, -0.016793040558695793, -0.016998713836073875, 0.011636962182819843, 0.048638828098773956, -0.0005888990126550198, -0.03628697618842125, -0.03290976583957672, 0.03672275319695473, 0.11879833042621613, 0.06270808726549149, 0.04824011027812958, 0.029143566265702248, -0.053800202906131744, -0.014307010918855667, -0.1088411882519722, 0.0867265909910202, 0.018151864409446716, 0.03761192411184311, 0.016324035823345184, -0.05522749945521355, 0.04978107288479805, 0.008020326495170593, 0.04183635115623474, 0.052288830280303955, 0.03790156543254852, -0.04613420367240906, 0.0572555810213089, 0.09341094642877579, 0.009324989281594753, 0.010816956870257854, -0.03007921390235424, -0.0403115376830101, -0.026746228337287903, 0.021548163145780563, 0.005993749480694532, -0.008641033433377743, -0.07265359163284302, 0.11534326523542404, 0.050406720489263535, -0.09514161199331284, 0.07135508209466934, -0.01961658149957657, 0.014507632702589035, -0.08284879475831985, 0.03463836759328842, -0.02675672620534897, -0.05230904743075371, -0.014966674149036407, -0.09804245829582214, 0.06082398071885109, -0.018723562359809875, -0.014441692270338535, -0.02837309241294861, 0.06408539414405823, 0.029465248808264732, -0.01960795558989048, -0.04513409361243248, -0.03220975026488304, -0.05489258095622063, 0.016244834288954735, 0.08002324402332306, -0.01933787204325199, -0.009158709086477757, -0.009296008385717869 ]
0.177024
Sometimes Ollama may not perform as expected. One of the best ways to figure out what happened is to take a look at the logs. Find the logs on \*\*Mac\*\* by running the command: ```shell cat ~/.ollama/logs/server.log ``` On \*\*Linux\*\* systems with systemd, the logs can be found with this command: ```shell journalctl -u ollama --no-pager --follow --pager-end ``` When you run Ollama in a \*\*container\*\*, the logs go to stdout/stderr in the container: ```shell docker logs ``` (Use `docker ps` to find the container name) If manually running `ollama serve` in a terminal, the logs will be on that terminal. When you run Ollama on \*\*Windows\*\*, there are a few different locations. You can view them in the explorer window by hitting `+R` and type in: - `explorer %LOCALAPPDATA%\Ollama` to view logs. The most recent server logs will be in `server.log` and older logs will be in `server-#.log` - `explorer %LOCALAPPDATA%\Programs\Ollama` to browse the binaries (The installer adds this to your user PATH) - `explorer %HOMEPATH%\.ollama` to browse where models and configuration is stored - `explorer %TEMP%` where temporary executable files are stored in one or more `ollama\*` directories To enable additional debug logging to help troubleshoot problems, first \*\*Quit the running app from the tray menu\*\* then in a powershell terminal ```powershell $env:OLLAMA\_DEBUG="1" & "ollama app.exe" ``` Join the [Discord](https://discord.gg/ollama) for help interpreting the logs. ## LLM libraries Ollama includes multiple LLM libraries compiled for different GPUs and CPU vector features. Ollama tries to pick the best one based on the capabilities of your system. If this autodetection has problems, or you run into other problems (e.g. crashes in your GPU) you can workaround this by forcing a specific LLM library. `cpu\_avx2` will perform the best, followed by `cpu\_avx` an the slowest but most compatible is `cpu`. Rosetta emulation under MacOS will work with the `cpu` library. In the server log, you will see a message that looks something like this (varies from release to release): ``` Dynamic LLM libraries [rocm\_v6 cpu cpu\_avx cpu\_avx2 cuda\_v11 rocm\_v5] ``` \*\*Experimental LLM Library Override\*\* You can set OLLAMA\_LLM\_LIBRARY to any of the available LLM libraries to bypass autodetection, so for example, if you have a CUDA card, but want to force the CPU LLM library with AVX2 vector support, use: ```shell OLLAMA\_LLM\_LIBRARY="cpu\_avx2" ollama serve ``` You can see what features your CPU has with the following. ```shell cat /proc/cpuinfo| grep flags | head -1 ``` ## Installing older or pre-release versions on Linux If you run into problems on Linux and want to install an older version, or you'd like to try out a pre-release before it's officially released, you can tell the install script which version to install. ```shell curl -fsSL https://ollama.com/install.sh | OLLAMA\_VERSION=0.5.7 sh ``` ## Linux tmp noexec If your system is configured with the "noexec" flag where Ollama stores its temporary executable files, you can specify an alternate location by setting OLLAMA\_TMPDIR to a location writable by the user ollama runs as. For example OLLAMA\_TMPDIR=/usr/share/ollama/ ## Linux docker If Ollama initially works on the GPU in a docker container, but then switches to running on CPU after some period of time with errors in the server log reporting GPU discovery failures, this can be resolved by disabling systemd cgroup management in Docker. Edit `/etc/docker/daemon.json` on the host and add `"exec-opts": ["native.cgroupdriver=cgroupfs"]` to the docker configuration. ## NVIDIA GPU Discovery When Ollama starts up, it takes inventory of the GPUs present in the system to determine compatibility and how much VRAM is available. Sometimes this discovery can fail to find your GPUs. In general, running the latest driver
https://github.com/ollama/ollama/blob/main//docs/troubleshooting.mdx
main
ollama
[ 0.011951694265007973, 0.025225885212421417, -0.010181025601923466, 0.0647856667637825, 0.0016688266769051552, -0.15552686154842377, -0.04683705046772957, -0.03886239975690842, 0.05032465234398842, -0.029680440202355385, 0.011829668655991554, -0.008676005527377129, -0.06218002736568451, 0.003970066551119089, 0.026779459789395332, 0.028967605903744698, 0.04670076444745064, -0.05657703056931496, -0.08551836013793945, 0.06322538107633591, 0.016927629709243774, 0.08994060009717941, 0.03649141266942024, 0.03494151681661606, -0.024556882679462433, 0.009959309361875057, -0.039475105702877045, -0.046566661447286606, 0.008296055719256401, -0.046988531947135925, 0.058027539402246475, 0.006839731242507696, -0.03766639903187752, -0.0300449151545763, 0.1787358671426773, 0.03675991669297218, 0.01445267628878355, -0.10876493155956268, -0.0958988144993782, -0.03734907880425453, 0.08947396278381348, 0.03853902220726013, -0.04535159096121788, 0.018823644146323204, -0.05919904634356499, -0.095283642411232, 0.002022321103140712, -0.08821612596511841, -0.015995167195796967, 0.03382684290409088, -0.053673308342695236, -0.002126006642356515, 0.019151760265231133, -0.013690025545656681, 0.04472694173455238, 0.045576222240924835, -0.017628438770771027, -0.05513710156083107, 0.016449246555566788, 0.03663163259625435, -0.03863787651062012, 0.04107356816530228, -0.04229484498500824, -0.02507770247757435, 0.03897471725940704, -0.05403856188058853, 0.010606365278363228, -0.022692246362566948, -0.01033446379005909, -0.005400438327342272, -0.0023215455003082752, 0.07361585646867752, 0.05647099018096924, 0.006694517098367214, 0.017768627032637596, -0.04537620395421982, 0.05479176342487335, -0.019016249105334282, -0.044120173901319504, 0.02401534467935562, -0.015662262216210365, -0.052186012268066406, 0.006532719824463129, 0.007262894418090582, 0.04300147667527199, 0.013751731254160404, -0.060735296458005905, 0.015577157959342003, 0.07720349729061127, 0.046543847769498825, 0.013489117845892906, -0.05796990171074867, -0.03279801085591316, -0.056180913001298904, 0.06110339239239693, -0.10045009851455688, 0.01198331918567419, 0.04066168889403343, 0.05495268478989601, 0.05480339750647545, -0.03510894998908043, 0.030160823836922646, 0.018623773008584976, 0.06427974998950958, -0.004632960073649883, -0.011114143766462803, 0.08159156888723373, 0.051306210458278656, -0.046496424823999405, 0.05632976070046425, 0.059789884835481644, -0.11860869824886322, 0.06127094849944115, 0.07165221124887466, -0.011744506657123566, 0.014355894178152084, -0.02274923399090767, -0.05500879883766174, -0.051178280264139175, 0.002556683262810111, 0.027456333860754967, -0.07968077808618546, 0.06486445665359497, 0.021115845069289207, -0.004510125145316124, 0.12527643144130707, 0.016689009964466095, 3.573960167270621e-33, 0.07618701457977295, -0.10073956102132797, 0.026327140629291534, 0.021357038989663124, 0.059710416942834854, 0.08719682693481445, 0.025263139978051186, -0.04736451059579849, 0.02240063063800335, 0.0347265750169754, -0.10140930861234665, 0.06768113374710083, -0.012859780341386795, 0.03246179223060608, 0.04078046604990959, -0.036684002727270126, 0.012255721725523472, 0.019052373245358467, -0.030573684722185135, 0.005328891798853874, 0.11619961261749268, 0.03392970189452171, -0.057838164269924164, -0.06960699707269669, -0.017137225717306137, 0.028522729873657227, -0.08070561289787292, -0.07131505757570267, -0.008517708629369736, 0.02819441258907318, 0.15306483209133148, 0.024017032235860825, -0.017412854358553886, -0.0208462942391634, 0.0029829558916389942, 0.012206052429974079, -0.006070590578019619, 0.006204674951732159, -0.11255301535129547, -0.047447264194488525, -0.07508738338947296, -0.0031164593528956175, -0.034192778170108795, 0.015181600116193295, -0.025599069893360138, -0.061653707176446915, -0.09482969343662262, -0.007455564569681883, 0.0391923189163208, 0.04374269023537636, -0.0192638598382473, 0.03174883499741554, -0.07794751226902008, 0.06826946884393692, 0.039817508310079575, 0.009954655542969704, 0.04917678236961365, -0.0869019627571106, 0.09046240150928497, 0.03676168993115425, -0.06050952523946762, 0.031455181539058685, 0.009590285830199718, -0.0865694135427475, -0.006071269977837801, 0.016547786071896553, 0.10497768223285675, 0.05539097264409065, -0.04774541035294533, 0.030724773183465004, -0.05828658863902092, -0.04064808413386345, 0.006478128023445606, 0.07998467236757278, 0.03282541409134865, 0.008853103965520859, -0.01353422924876213, -0.025640197098255157, -0.11287365108728409, 0.0025040116161108017, 0.05835836008191109, 0.007178871426731348, 0.020172497257590294, -0.013348652981221676, 0.016469202935695648, -0.021033473312854767, -0.010132214054465294, 0.04787767678499222, 0.003937747795134783, 0.07563918828964233, 0.06690368801355362, 0.031163925305008888, 0.014575369656085968, 0.0037856718990951777, -0.08161499351263046, -5.984134274795129e-33, 0.005595506634563208, 0.0345970094203949, -0.008660517632961273, -0.02686774544417858, -0.037424325942993164, 0.012966318055987358, -0.035669226199388504, 0.045831844210624695, -0.03951500728726387, -0.054864343255758286, -0.03378235548734665, 0.028248701244592667, 0.037137337028980255, 0.11321226507425308, 0.033504363149404526, 0.017073560506105423, -0.04736803472042084, 0.028216920793056488, 0.026413289830088615, 0.014326374977827072, -0.005230220500379801, 0.009441813454031944, 0.0051708645187318325, 0.01831977628171444, 0.016540847718715668, -0.01474651601165533, 0.0674523413181305, -0.05530742555856705, -0.05490802600979805, -0.031989142298698425, -0.0061803823336958885, 0.07844312489032745, -0.019748369231820107, 0.044847939163446426, -0.007921364158391953, 0.04457443207502365, -0.05554957315325737, 0.011991516686975956, -0.028692016378045082, -0.027044855058193207, 0.04739196598529816, -0.024374710395932198, -0.015940174460411072, -0.02261415123939514, -0.14357715845108032, 0.033854495733976364, -0.03441598266363144, 0.0027428925968706608, -0.0028529746923595667, 0.026175938546657562, 0.03870757296681404, -0.033641885966062546, 0.033149901777505875, 0.03596268594264984, 0.0501907616853714, -0.02139105089008808, 0.004001540597528219, -0.07459542900323868, -0.1071193665266037, 0.016579119488596916, 0.10405281186103821, 0.0034080345649272203, -0.024554861709475517, -0.0192373339086771, -0.026663992553949356, -0.04990747943520546, 0.013197050429880619, 0.023521700873970985, 0.007123897783458233, -0.036498479545116425, -0.03713203966617584, -0.016508422791957855, -0.022865694016218185, 0.0711112841963768, 0.05401776358485222, 0.03866681456565857, -0.16033004224300385, -0.0998019129037857, 0.018877623602747917, 0.040325600653886795, -0.055273838341236115, 0.02007869817316532, 0.024008678272366524, -0.04050185903906822, -0.012836244888603687, -0.017347335815429688, 0.05772612616419792, 0.025311188772320747, 0.032324161380529404, 0.024852270260453224, 0.02523300237953663, -0.034055326133966446, -0.06395083665847778, 0.09963901340961456, 0.01844342052936554, -4.839564482495007e-8, -0.07073060423135757, -0.059307925403118134, -0.003023590659722686, 0.02991933561861515, 0.014747054316103458, -0.02708800509572029, 0.0608905591070652, 0.05814773216843605, -0.08875194936990738, 0.026763297617435455, 0.004067271016538143, 0.047013744711875916, -0.05197301134467125, -0.1111893579363823, 0.006691891234368086, 0.03003665618598461, -0.005603460129350424, -0.041229572147130966, 0.013471418060362339, -0.1377832442522049, 0.024182962253689766, -0.01733669638633728, 0.02284703403711319, 0.011407047510147095, -0.1112605407834053, -0.030585572123527527, -0.005961781367659569, 0.09567172080278397, -0.07298395782709122, -0.10313767194747925, 0.035237137228250504, -0.009678537957370281, 0.010619126260280609, -0.05109775811433792, -0.09416680037975311, 0.01955508440732956, 0.028748521581292152, -0.03070187009871006, -0.02053803764283657, -0.02799133211374283, -0.03228563442826271, -0.023511873558163643, 0.03725522756576538, -0.0884174108505249, -0.006500127725303173, 0.07115061581134796, 0.0018887072801589966, 0.03697466105222702, -0.04873017966747284, -0.03598209097981453, 0.04234802722930908, -0.04930208995938301, 0.08291180431842804, 0.09060202538967133, 0.009009633213281631, -0.11236252635717392, -0.03441597521305084, -0.027020378038287163, 0.004594387952238321, 0.02971505932509899, 0.05085364356637001, -0.030594782903790474, 0.04155692085623741, 0.021391484886407852 ]
0.029257
and add `"exec-opts": ["native.cgroupdriver=cgroupfs"]` to the docker configuration. ## NVIDIA GPU Discovery When Ollama starts up, it takes inventory of the GPUs present in the system to determine compatibility and how much VRAM is available. Sometimes this discovery can fail to find your GPUs. In general, running the latest driver will yield the best results. ### Linux NVIDIA Troubleshooting If you are using a container to run Ollama, make sure you've set up the container runtime first as described in [docker](./docker) Sometimes the Ollama can have difficulties initializing the GPU. When you check the server logs, this can show up as various error codes, such as "3" (not initialized), "46" (device unavailable), "100" (no device), "999" (unknown), or others. The following troubleshooting techniques may help resolve the problem - If you are using a container, is the container runtime working? Try `docker run --gpus all ubuntu nvidia-smi` - if this doesn't work, Ollama won't be able to see your NVIDIA GPU. - Is the uvm driver loaded? `sudo nvidia-modprobe -u` - Try reloading the nvidia\_uvm driver - `sudo rmmod nvidia\_uvm` then `sudo modprobe nvidia\_uvm` - Try rebooting - Make sure you're running the latest nvidia drivers If none of those resolve the problem, gather additional information and file an issue: - Set `CUDA\_ERROR\_LEVEL=50` and try again to get more diagnostic logs - Check dmesg for any errors `sudo dmesg | grep -i nvrm` and `sudo dmesg | grep -i nvidia` ## AMD GPU Discovery On linux, AMD GPU access typically requires `video` and/or `render` group membership to access the `/dev/kfd` device. If permissions are not set up correctly, Ollama will detect this and report an error in the server log. When running in a container, in some Linux distributions and container runtimes, the ollama process may be unable to access the GPU. Use `ls -lnd /dev/kfd /dev/dri /dev/dri/\*` on the host system to determine the \*\*numeric\*\* group IDs on your system, and pass additional `--group-add ...` arguments to the container so it can access the required devices. For example, in the following output `crw-rw---- 1 0 44 226, 0 Sep 16 16:55 /dev/dri/card0` the group ID column is `44` If you are experiencing problems getting Ollama to correctly discover or use your GPU for inference, the following may help isolate the failure. - `AMD\_LOG\_LEVEL=3` Enable info log levels in the AMD HIP/ROCm libraries. This can help show more detailed error codes that can help troubleshoot problems - `OLLAMA\_DEBUG=1` During GPU discovery additional information will be reported - Check dmesg for any errors from amdgpu or kfd drivers `sudo dmesg | grep -i amdgpu` and `sudo dmesg | grep -i kfd` ## Multiple AMD GPUs If you experience gibberish responses when models load across multiple AMD GPUs on Linux, see the following guide. - https://rocm.docs.amd.com/projects/radeon/en/latest/docs/install/native\_linux/mgpu.html#mgpu-known-issues-and-limitations ## Windows Terminal Errors Older versions of Windows 10 (e.g., 21H1) are known to have a bug where the standard terminal program does not display control characters correctly. This can result in a long string of strings like `←[?25h←[?25l` being displayed, sometimes erroring with `The parameter is incorrect` To resolve this problem, please update to Win 10 22H1 or newer.
https://github.com/ollama/ollama/blob/main//docs/troubleshooting.mdx
main
ollama
[ -0.006611411459743977, 0.011120551265776157, -0.05625554919242859, 0.055859677493572235, -0.017256448045372963, -0.08611318469047546, -0.08840566128492355, -0.010657834820449352, -0.05008772015571594, -0.051279470324516296, 0.00234357756562531, -0.09265340864658356, -0.09175977110862732, 0.05063389241695404, 0.0431189127266407, 0.019595887511968613, 0.11480969935655594, -0.025688519701361656, -0.033305488526821136, 0.06679200381040573, -0.03351017087697983, 0.015163959003984928, 0.015104405581951141, 0.015150414779782295, -0.03650037944316864, -0.011518467217683792, -0.05314401909708977, -0.08015970885753632, 0.022461311891674995, 0.007220024708658457, 0.04506989195942879, 0.024873847141861916, 0.033860329538583755, 0.03552381694316864, 0.1148461177945137, 0.03757103160023689, -0.05131153762340546, -0.13157425820827484, -0.0628918930888176, -0.09691929072141647, 0.01727096363902092, 0.016120823100209236, -0.05450110882520676, 0.07593419402837753, 0.010298597626388073, -0.02937290631234646, 0.04267466068267822, -0.02214055508375168, 0.014901955612003803, 0.016207987442612648, -0.009359927847981453, -0.016790347173810005, 0.03670614957809448, -0.04138270393013954, -0.029301991686224937, 0.05818643793463707, -0.06523056328296661, -0.0713006779551506, 0.07653515040874481, -0.023530801758170128, 0.024693062528967857, -0.019841087982058525, 0.0011034542694687843, 0.03215736150741577, 0.023687811568379402, -0.016786793246865273, 0.04882311448454857, -0.06950421631336212, -0.03408963233232498, -0.00023883525864221156, 0.10037044435739517, 0.07542642951011658, 0.016597874462604523, -0.001061797607690096, 0.0050777471624314785, 0.08376754820346832, 0.03235088661313057, -0.012751182541251183, -0.008990105241537094, -0.004338861908763647, -0.009345052763819695, 0.032530348747968674, 0.013956737704575062, -0.028125645592808723, 0.0462823212146759, 0.015056411735713482, 0.015831835567951202, 0.044282831251621246, 0.06147674098610878, -0.09430801868438721, -0.015583132393658161, 0.022220764309167862, -0.044112905859947205, -0.053018923848867416, 0.12898804247379303, -0.07800927758216858, -0.029820634052157402, -0.008812978863716125, -0.06244881823658943, 0.05867336317896843, -0.01859108731150627, 0.0010225630830973387, 0.015068992041051388, 0.09018594771623611, -0.05871865525841713, 0.04077345132827759, 0.028852267190814018, 0.07198905199766159, -0.12955063581466675, 0.02430558204650879, 0.05106325447559357, -0.011321424506604671, 0.031079120934009552, 0.06704483926296234, -0.022002600133419037, 0.0007387904915958643, -0.04377398267388344, -0.057961057871580124, -0.02756119892001152, -0.04761737585067749, -0.050587233155965805, -0.07416290789842606, 0.0554085411131382, -0.05601400509476662, -0.02855989709496498, 0.12275799363851547, -0.06839733570814133, 4.3148584608885695e-33, 0.04931779205799103, -0.11178518831729889, 0.06355531513690948, -0.024382663890719414, 0.07182937860488892, 0.03603638708591461, 0.01634705625474453, -0.05715923383831978, -0.002718592993915081, 0.00844068918377161, -0.08049573004245758, 0.08723212778568268, 0.021157698705792427, 0.049766674637794495, 0.04136297106742859, -0.04800922051072121, -0.02394137717783451, 0.024902092292904854, 0.007543236017227173, 0.02956615388393402, 0.06274039298295975, 0.06450861692428589, -0.026477443054318428, -0.054662592709064484, -0.06830932199954987, 0.03172239288687706, -0.08859030902385712, -0.017601627856492996, 0.03922540694475174, 0.040658872574567795, 0.07657226920127869, -0.022017089650034904, -0.04021933302283287, -0.004234280437231064, 0.03441215306520462, 0.006545731797814369, 0.025973191484808922, 0.02655387856066227, -0.03808251768350601, 0.03387666866183281, -0.042205724865198135, 0.026456577703356743, 0.02740487828850746, -0.04030255600810051, -0.06255871802568436, 0.0023401938378810883, -0.04454030841588974, -0.009541952982544899, 0.01705569587647915, 0.056524138897657394, -0.039949484169483185, 0.005252846051007509, -0.09916581958532333, -0.027522839605808258, 0.019406190142035484, -0.046169836074113846, -0.029637936502695084, 0.015444120392203331, 0.09508413076400757, -0.031030423939228058, -0.09657164663076401, -0.020247770473361015, -0.03435767441987991, -0.08538927137851715, -0.046969663351774216, 0.004836827050894499, -0.01032054703682661, 0.06161527335643768, -0.07876193523406982, 0.0023034310434013605, -0.027801677584648132, 0.012094016186892986, -0.0031069519463926554, 0.07559303939342499, 0.10344306379556656, 0.009533929638564587, 0.04586974158883095, -0.005552937742322683, -0.1059945672750473, -0.03613888472318649, 0.018823886290192604, 0.04178207740187645, 0.047822993248701096, -0.008469386026263237, -0.023783866316080093, -0.0521124042570591, -0.019075779244303703, 0.09062813222408295, -0.05896401405334473, 0.044054046273231506, 0.019306110218167305, 0.03183119371533394, 0.049786604940891266, 0.068623848259449, 0.0014430423034355044, -5.9171178724868116e-33, 0.01824362203478813, -0.020319683477282524, 0.05785110965371132, -0.006806463934481144, 0.07671637833118439, -0.0018831847701221704, -0.021914426237344742, -0.050690650939941406, 0.025929028168320656, -0.0692087858915329, -0.016609858721494675, 0.09822986274957657, 0.04314512014389038, 0.11479675024747849, -0.028114812448620796, -0.02752086892724037, -0.02740676887333393, -0.01643931306898594, 0.04156346991658211, 0.011937535367906094, -0.006293484941124916, 0.010799500159919262, -0.026663009077310562, 0.04170645400881767, 0.01885746419429779, 0.052137985825538635, 0.05335870757699013, -0.057939622551202774, -0.006074353586882353, -0.027412259951233864, 0.006745260674506426, 0.055577754974365234, -0.029988877475261688, 0.09919236600399017, 0.08073727786540985, 0.06423357129096985, 0.024749547243118286, -0.008095079101622105, -0.09428802132606506, -0.0017424395773559809, 0.049984272569417953, 0.009648483246564865, 0.039920564740896225, -0.013721453957259655, -0.02097739651799202, 0.05020355060696602, 0.0017071865731850266, -0.02352309785783291, -0.10515817999839783, 0.043757364153862, -0.015561726875603199, -0.013507994823157787, 0.021358441561460495, 0.040366195142269135, 0.07264037430286407, -0.019271619617938995, 0.08910582959651947, -0.0463651642203331, -0.04869074001908302, 0.0074045052751898766, 0.09240439534187317, -0.013835745863616467, -0.03498999774456024, -0.03474492207169533, -0.03548988699913025, -0.08266572654247284, -0.013196605257689953, 0.08120343089103699, -0.004052032716572285, 0.01465151272714138, -0.07789698988199234, -0.03568829223513603, -0.04676144942641258, 0.003229644848033786, -0.0618852898478508, 0.06840498745441437, -0.07427998632192612, -0.09439617395401001, 0.08609351515769958, 0.021388530731201172, -0.0221693217754364, -0.07809542864561081, 0.058699242770671844, 0.013586178421974182, 0.03592948615550995, 0.022407034412026405, 0.14278766512870789, -0.01767217181622982, 0.09170319885015488, 0.007747145835310221, -0.06887150555849075, -0.10918086767196655, -0.008513854816555977, 0.13462167978286743, 0.016774320974946022, -5.03941883778225e-8, 0.011415131390094757, -0.008001974783837795, 0.01417522318661213, 0.07489412277936935, 0.036480385810136795, -0.07149206101894379, -0.00028501564520411193, -0.0379643477499485, -0.027833430096507072, 0.006681797094643116, 0.02535141073167324, -0.024297310039401054, -0.03196265548467636, -0.059709589928388596, -0.006826736498624086, 0.03895873203873634, -0.05327952280640602, 0.017844902351498604, 0.0347050242125988, -0.048593007028102875, -0.04614149406552315, -0.03816255182027817, 0.01799178496003151, -0.05460750311613083, -0.06378760933876038, -0.05242404714226723, 0.049622442573308945, -0.02417127788066864, -0.05559396371245384, -0.07035522162914276, -0.04112765192985535, 0.0033537843264639378, -0.020284432917833328, 0.014852994121611118, -0.05905497819185257, -0.0410529188811779, 0.056983932852745056, 0.03206796571612358, 0.09680847078561783, -0.07870922237634659, 0.03520452231168747, 0.029950924217700958, 0.006795655470341444, -0.0956096276640892, 0.0036667687818408012, 0.07524265348911285, 0.011020150035619736, 0.012634080834686756, -0.06636624783277512, 0.035422950983047485, 0.02861480414867401, -0.0010708133922889829, -0.0620327927172184, 0.08741895109415054, 0.0018424491863697767, -0.08962798863649368, -0.11562567949295044, 0.01784553937613964, 0.008153989911079407, -0.032197579741477966, 0.0064927577041089535, -0.016921114176511765, -0.025179779157042503, 0.03658517077565193 ]
-0.006582
Ollama's web search API can be used to augment models with the latest information to reduce hallucinations and improve accuracy. Web search is provided as a REST API with deeper tool integrations in the Python and JavaScript libraries. This also enables models like OpenAI’s gpt-oss models to conduct long-running research tasks. ## Authentication For access to Ollama's web search API, create an [API key](https://ollama.com/settings/keys). A free Ollama account is required. ## Web search API Performs a web search for a single query and returns relevant results. ### Request `POST https://ollama.com/api/web\_search` - `query` (string, required): the search query string - `max\_results` (integer, optional): maximum results to return (default 5, max 10) ### Response Returns an object containing: - `results` (array): array of search result objects, each containing: - `title` (string): the title of the web page - `url` (string): the URL of the web page - `content` (string): relevant content snippet from the web page ### Examples Ensure OLLAMA\_API\_KEY is set or it must be passed in the Authorization header. #### cURL Request ```bash curl https://ollama.com/api/web\_search \ --header "Authorization: Bearer $OLLAMA\_API\_KEY" \ -d '{ "query":"what is ollama?" }' ``` \*\*Response\*\* ```json { "results": [ { "title": "Ollama", "url": "https://ollama.com/", "content": "Cloud models are now available..." }, { "title": "What is Ollama? Introduction to the AI model management tool", "url": "https://www.hostinger.com/tutorials/what-is-ollama", "content": "Ariffud M. 6min Read..." }, { "title": "Ollama Explained: Transforming AI Accessibility and Language ...", "url": "https://www.geeksforgeeks.org/artificial-intelligence/ollama-explained-transforming-ai-accessibility-and-language-processing/", "content": "Data Science Data Science Projects Data Analysis..." } ] } ``` #### Python library ```python import ollama response = ollama.web\_search("What is Ollama?") print(response) ``` \*\*Example output\*\* ```python results = [ { "title": "Ollama", "url": "https://ollama.com/", "content": "Cloud models are now available in Ollama..." }, { "title": "What is Ollama? Features, Pricing, and Use Cases - Walturn", "url": "https://www.walturn.com/insights/what-is-ollama-features-pricing-and-use-cases", "content": "Our services..." }, { "title": "Complete Ollama Guide: Installation, Usage & Code Examples", "url": "https://collabnix.com/complete-ollama-guide-installation-usage-code-examples", "content": "Join our Discord Server..." } ] ``` More Ollama [Python example](https://github.com/ollama/ollama-python/blob/main/examples/web-search.py) #### JavaScript Library ```tsx import { Ollama } from "ollama"; const client = new Ollama(); const results = await client.webSearch("what is ollama?"); console.log(JSON.stringify(results, null, 2)); ``` \*\*Example output\*\* ```json { "results": [ { "title": "Ollama", "url": "https://ollama.com/", "content": "Cloud models are now available..." }, { "title": "What is Ollama? Introduction to the AI model management tool", "url": "https://www.hostinger.com/tutorials/what-is-ollama", "content": "Ollama is an open-source tool..." }, { "title": "Ollama Explained: Transforming AI Accessibility and Language Processing", "url": "https://www.geeksforgeeks.org/artificial-intelligence/ollama-explained-transforming-ai-accessibility-and-language-processing/", "content": "Ollama is a groundbreaking..." } ] } ``` More Ollama [JavaScript example](https://github.com/ollama/ollama-js/blob/main/examples/websearch/websearch-tools.ts) ## Web fetch API Fetches a single web page by URL and returns its content. ### Request `POST https://ollama.com/api/web\_fetch` - `url` (string, required): the URL to fetch ### Response Returns an object containing: - `title` (string): the title of the web page - `content` (string): the main content of the web page - `links` (array): array of links found on the page ### Examples #### cURL Request ```python curl --request POST \ --url https://ollama.com/api/web\_fetch \ --header "Authorization: Bearer $OLLAMA\_API\_KEY" \ --header 'Content-Type: application/json' \ --data '{ "url": "ollama.com" }' ``` \*\*Response\*\* ```json { "title": "Ollama", "content": "[Cloud models](https://ollama.com/blog/cloud-models) are now available in Ollama...", "links": [ "http://ollama.com/", "http://ollama.com/models", "https://github.com/ollama/ollama" ] ``` #### Python SDK ```python from ollama import web\_fetch result = web\_fetch('https://ollama.com') print(result) ``` \*\*Result\*\* ```python WebFetchResponse( title='Ollama', content='[Cloud models](https://ollama.com/blog/cloud-models) are now available in Ollama\n\n\*\*Chat & build with open models\*\*\n\n[Download](https://ollama.com/download) [Explore models](https://ollama.com/models)\n\nAvailable for macOS, Windows, and Linux', links=['https://ollama.com/', 'https://ollama.com/models', 'https://github.com/ollama/ollama'] ) ``` #### JavaScript SDK ```tsx import { Ollama } from "ollama"; const client = new Ollama(); const fetchResult = await client.webFetch("https://ollama.com"); console.log(JSON.stringify(fetchResult, null, 2)); ``` \*\*Result\*\* ```json { "title": "Ollama", "content": "[Cloud models](https://ollama.com/blog/cloud-models) are now available
https://github.com/ollama/ollama/blob/main//docs/capabilities/web-search.mdx
main
ollama
[ -0.11430098116397858, 0.01571500115096569, -0.034217625856399536, 0.07934592664241791, -0.03103749081492424, -0.1142132580280304, -0.0934114083647728, 0.02261880598962307, -0.016371874138712883, -0.06611230969429016, -0.008288624696433544, 0.03658484295010567, 0.011986950412392616, -0.04484745115041733, 0.09359172731637955, 0.030791228637099266, 0.05288953706622124, 0.03941916674375534, -0.06405162811279297, -0.10148164629936218, 0.1245165690779686, 0.049041397869586945, 0.08225102722644806, -0.033761728554964066, -0.03269469365477562, -0.04905257374048233, -0.030013147741556168, -0.04427653178572655, 0.012028057128190994, -0.022487038746476173, 0.04032335802912712, -0.04306281730532646, -0.009016966447234154, 0.07686340808868408, -0.012626668438315392, -0.010435463860630989, -0.0654248520731926, -0.11441298574209213, -0.024594774469733238, -0.03238493204116821, 0.020061824470758438, 0.04045091196894646, -0.06551603972911835, -0.024145161733031273, 0.04201943427324295, -0.073189377784729, -0.06436335295438766, -0.03221064805984497, 0.013440354727208614, 0.01586083695292473, -0.1337609887123108, -0.0672542005777359, -0.02989833429455757, -0.014408656395971775, 0.03427349776029587, 0.018728161230683327, -0.009937184862792492, -0.11669627577066422, 0.0033736105542629957, -0.03336673974990845, 0.07390978932380676, -0.016536805778741837, -0.032635338604450226, 0.0024083792231976986, 0.00021316486527211964, -0.05995508283376694, 0.013878149911761284, -0.029716813936829567, 0.07331375032663345, -0.0624789260327816, 0.025248507037758827, 0.030829651281237602, -0.03579350560903549, 0.0353953018784523, 0.018758272752165794, -0.031130142509937286, 0.017178749665617943, 0.012034947983920574, -0.0022303115110844374, 0.0651378482580185, -0.02832283265888691, -0.06165972724556923, -0.0041233450174331665, 0.07641135901212692, 0.08324212580919266, -0.05338098853826523, -0.0023386201355606318, 0.05171247944235802, 0.1350078135728836, -0.031890496611595154, 0.009013837203383446, -0.06329894810914993, -0.037848472595214844, -0.06210892274975777, 0.023167433217167854, -0.011724568903446198, 0.04780563339591026, -0.07873272895812988, -0.02750113606452942, 0.07400382310152054, -0.005710127297788858, -0.037523072212934494, -0.030175376683473587, -0.026256782934069633, -0.046039994806051254, 0.03596482425928116, 0.09541266411542892, 0.11431590467691422, -0.02781628631055355, 0.028036655858159065, -0.019839663058519363, -0.056211527436971664, 0.08673829585313797, -0.0656326413154602, -0.02158237434923649, 0.04134800657629967, -0.02213253267109394, 0.00968589261174202, 0.057750314474105835, 0.06529325246810913, 0.0429784432053566, 0.03838612511754036, 0.06180255487561226, -0.023448185995221138, 0.033059995621442795, 0.09780031442642212, -0.05125444754958153, 4.068378968698229e-33, 0.11822012066841125, 0.058274488896131516, 0.03620985150337219, -0.0518975704908371, -0.02224527858197689, 0.06642021238803864, 0.05510462075471878, -0.008503658697009087, -0.04006759077310562, -0.04355735704302788, -0.07618297636508942, 0.13341860473155975, -0.029903000220656395, 0.02352273464202881, 0.030711732804775238, 0.023538442328572273, -0.005210720933973789, 0.03936105594038963, 0.048600222915410995, 0.04551805928349495, 0.06743238866329193, -0.03234805539250374, 0.04071018844842911, 0.03912915661931038, -0.010312392376363277, 0.016094114631414413, -0.05852464586496353, -0.008092089556157589, -0.06379806250333786, 0.0374738946557045, 0.043874502182006836, 0.014065408147871494, -0.11198250204324722, -0.017685173079371452, 0.05911272391676903, 0.043530914932489395, -0.05184986814856529, -0.03578486293554306, -0.04354050010442734, -0.04304617643356323, -0.07257287949323654, 0.031053967773914337, 0.013501763343811035, -0.062223147600889206, -0.08652369678020477, -0.008990836329758167, -0.09689991176128387, 0.012649518437683582, 0.07275515049695969, 0.01415229495614767, -0.051589202135801315, 0.08299414068460464, -0.10526949912309647, -0.016465002670884132, -0.005689508747309446, 0.02908661775290966, 0.06269445270299911, 0.027692312374711037, 0.07871922850608826, 0.01027004886418581, 0.023595547303557396, -0.06955579668283463, 0.010756206698715687, -0.05053005740046501, -0.04752722382545471, 0.0006042508757673204, 0.027278151363134384, 0.03761729598045349, 0.024756373837590218, 0.06478851288557053, 0.014549755491316319, 0.0034020368475466967, -0.011785782873630524, 0.013089261017739773, -0.01108903344720602, -0.07213140279054642, 0.055041469633579254, -0.052417341619729996, 0.0196297038346529, -0.022065913304686546, 0.08222983032464981, -0.009626619517803192, 0.033358242362737656, -0.010527145117521286, 0.04166075587272644, -0.03310420736670494, 0.007020618766546249, 0.0002663599152583629, -0.05461174249649048, -0.031463172286748886, -0.00445584999397397, 0.01773170568048954, -0.03709091991186142, -0.008366294205188751, -0.004039591643959284, -4.078576749533597e-33, -0.012733316980302334, -0.07553347200155258, 0.04453042522072792, 0.027596864849328995, 0.02473650872707367, -0.08819268643856049, 0.017635688185691833, 0.040412817150354385, 0.016265392303466797, 0.025721576064825058, 0.03409234434366226, -0.007687549572438002, 0.08798707276582718, -0.00316192046739161, 0.05165458843111992, -0.009963746182620525, -0.07227876037359238, -0.06805668771266937, -0.0014253024710342288, 0.04517534002661705, -0.07667887955904007, 0.03836893290281296, -0.08279981464147568, -0.022942734882235527, 0.02035224810242653, 0.0026933548506349325, -0.013958333991467953, -0.02677689865231514, -0.0742601677775383, -0.028048068284988403, -0.001634776359423995, 0.03550422936677933, -0.09152654558420181, 0.031225115060806274, -0.03471207618713379, 0.06687089800834656, 0.041591349989175797, 0.01995125412940979, -0.027123767882585526, 0.08629312366247177, 0.052452582865953445, -0.013676801696419716, 0.030634906142950058, -0.04619051143527031, -0.031063305214047432, 0.02450498379766941, -0.09076432883739471, 0.10090333968400955, -0.03222522884607315, -0.005929772276431322, 0.07381746172904968, 0.05966925993561745, -0.05319105461239815, -0.021372264251112938, 0.04960351064801216, -0.0702836737036705, -0.017503585666418076, -0.032255321741104126, -0.04610200971364975, 0.011348821222782135, -0.011652898974716663, -0.034602388739585876, -0.0073016732931137085, 0.10884085297584534, -0.025739364326000214, -0.04193180426955223, -0.02190351113677025, 0.0015935379778966308, -0.058280181139707565, -0.015358693897724152, -0.05404825508594513, -0.04895169660449028, 0.0732588842511177, 0.027100753039121628, 0.021981975063681602, 0.024082964286208153, -0.09333334863185883, 0.03349151089787483, 0.04755755513906479, -0.007402455434203148, -0.05612767115235329, 0.00872916541993618, 0.10958380997180939, 0.03981446847319603, 0.02410731464624405, -0.007654588669538498, 0.0367908738553524, 0.04884439706802368, -0.0032832769211381674, 0.017924442887306213, -0.0735374391078949, -0.05739954113960266, -0.03947852551937103, 0.07456132024526596, 0.04554828256368637, -4.914099349662138e-8, -0.06991951912641525, 0.009934400208294392, -0.010456705465912819, 0.0671861320734024, 0.015956569463014603, 0.033967070281505585, 0.03459012508392334, 0.07872890681028366, -0.00967341661453247, 0.008125821128487587, 0.09457976371049881, 0.08506228029727936, -0.029173079878091812, 0.0018432933138683438, -0.036442141979932785, 0.07213028520345688, 0.04887131229043007, -0.0377880297601223, 0.010792461223900318, -0.08069970458745956, 0.017587147653102875, 0.01183514203876257, 0.04682915657758713, 0.009744931943714619, 0.06880496442317963, 0.01803669147193432, -0.08269555866718292, 0.1258048117160797, -0.029367942363023758, -0.043271809816360474, -0.000540430482942611, -0.06994009763002396, 0.05809776112437248, -0.04624379426240921, 0.011797270737588406, -0.004697313532233238, -0.020847858861088753, -0.02165425568819046, -0.08163102716207504, 0.009343750774860382, 0.06716975569725037, 0.06349550187587738, 0.02002260647714138, -0.009631103835999966, 0.06773056834936142, 0.08081699162721634, 0.04518648982048035, -0.07660216838121414, -0.0012641989160329103, -0.020317234098911285, -0.02018667943775654, -0.10190513730049133, -0.007125670090317726, 0.040552061051130295, -0.06907548755407333, -0.04595975950360298, -0.05045098066329956, -0.03552843630313873, -0.01754150725901127, 0.012803453020751476, 0.11656933277845383, -0.026519345119595528, 0.03804217278957367, 0.03314705938100815 ]
0.091264
with open models\*\*\n\n[Download](https://ollama.com/download) [Explore models](https://ollama.com/models)\n\nAvailable for macOS, Windows, and Linux', links=['https://ollama.com/', 'https://ollama.com/models', 'https://github.com/ollama/ollama'] ) ``` #### JavaScript SDK ```tsx import { Ollama } from "ollama"; const client = new Ollama(); const fetchResult = await client.webFetch("https://ollama.com"); console.log(JSON.stringify(fetchResult, null, 2)); ``` \*\*Result\*\* ```json { "title": "Ollama", "content": "[Cloud models](https://ollama.com/blog/cloud-models) are now available in Ollama...", "links": [ "https://ollama.com/", "https://ollama.com/models", "https://github.com/ollama/ollama" ] } ``` ## Building a search agent Use Ollama’s web search API as a tool to build a mini search agent. This example uses Alibaba’s Qwen 3 model with 4B parameters. ```bash ollama pull qwen3:4b ``` ```python from ollama import chat, web\_fetch, web\_search available\_tools = {'web\_search': web\_search, 'web\_fetch': web\_fetch} messages = [{'role': 'user', 'content': "what is ollama's new engine"}] while True: response = chat( model='qwen3:4b', messages=messages, tools=[web\_search, web\_fetch], think=True ) if response.message.thinking: print('Thinking: ', response.message.thinking) if response.message.content: print('Content: ', response.message.content) messages.append(response.message) if response.message.tool\_calls: print('Tool calls: ', response.message.tool\_calls) for tool\_call in response.message.tool\_calls: function\_to\_call = available\_tools.get(tool\_call.function.name) if function\_to\_call: args = tool\_call.function.arguments result = function\_to\_call(\*\*args) print('Result: ', str(result)[:200]+'...') # Result is truncated for limited context lengths messages.append({'role': 'tool', 'content': str(result)[:2000 \* 4], 'tool\_name': tool\_call.function.name}) else: messages.append({'role': 'tool', 'content': f'Tool {tool\_call.function.name} not found', 'tool\_name': tool\_call.function.name}) else: break ``` \*\*Result\*\* ``` Thinking: Okay, the user is asking about Ollama's new engine. I need to figure out what they're referring to. Ollama is a company that develops large language models, so maybe they've released a new model or an updated version of their existing engine.... Tool calls: [ToolCall(function=Function(name='web\_search', arguments={'max\_results': 3, 'query': 'Ollama new engine'}))] Result: results=[WebSearchResult(content='# New model scheduling\n\n## September 23, 2025\n\nOllama now includes a significantly improved model scheduling system. Ahead of running a model, Ollama’s new engine Thinking: Okay, the user asked about Ollama's new engine. Let me look at the search results. First result is from September 23, 2025, talking about new model scheduling. It mentions improved memory management, reduced crashes, better GPU utilization, and multi-GPU performance. Examples show speed improvements and accurate memory reporting. Supported models include gemma3, llama4, qwen3, etc... Content: Ollama has introduced two key updates to its engine, both released in 2025: 1. \*\*Enhanced Model Scheduling (September 23, 2025)\*\* - \*\*Precision Memory Management\*\*: Exact memory allocation reduces out-of-memory crashes and optimizes GPU utilization. - \*\*Performance Gains\*\*: Examples show significant speed improvements (e.g., 85.54 tokens/s vs 52.02 tokens/s) and full GPU layer utilization. - \*\*Multi-GPU Support\*\*: Improved efficiency across multiple GPUs, with accurate memory reporting via tools like `nvidia-smi`. - \*\*Supported Models\*\*: Includes `gemma3`, `llama4`, `qwen3`, `mistral-small3.2`, and more. 2. \*\*Multimodal Engine (May 15, 2025)\*\* - \*\*Vision Support\*\*: First-class support for vision models, including `llama4:scout` (109B parameters), `gemma3`, `qwen2.5vl`, and `mistral-small3.1`. - \*\*Multimodal Tasks\*\*: Examples include identifying animals in multiple images, answering location-based questions from videos, and document scanning. These updates highlight Ollama's focus on efficiency, performance, and expanded capabilities for both text and vision tasks. ``` ### Context length and agents Web search results can return thousands of tokens. It is recommended to increase the context length of the model to at least ~32000 tokens. Search agents work best with full context length. [Ollama's cloud models](https://docs.ollama.com/cloud) run at the full context length. ## MCP Server You can enable web search in any MCP client through the [Python MCP server](https://github.com/ollama/ollama-python/blob/main/examples/web-search-mcp.py). ### Cline Ollama's web search can be integrated with Cline easily using the MCP server configuration. `Manage MCP Servers` > `Configure MCP Servers` > Add the following configuration: ```json { "mcpServers": { "web\_search\_and\_fetch": { "type": "stdio", "command": "uv", "args": ["run", "path/to/web-search-mcp.py"], "env": { "OLLAMA\_API\_KEY": "your\_api\_key\_here" } } } } ``` ![Cline MCP Configuration](/images/cline-mcp.png) ### Codex Ollama works well with OpenAI's Codex tool. Add the following configuration to `~/.codex/config.toml` ```python [mcp\_servers.web\_search] command = "uv"
https://github.com/ollama/ollama/blob/main//docs/capabilities/web-search.mdx
main
ollama
[ -0.07065140455961227, 0.013745056465268135, 0.0064282952807843685, 0.07596945762634277, -0.006786528509110212, -0.06569711118936539, -0.06714356690645218, 0.02949276752769947, 0.06495554000139236, -0.04360588639974594, 0.0031580114737153053, 0.011450626887381077, -0.03133699297904968, -0.010515542700886726, 0.0781296044588089, 0.06266578286886215, -0.0073697855696082115, 0.005353409331291914, -0.0386495478451252, -0.027877919375896454, 0.08581875264644623, 0.026514343917369843, 0.01894162967801094, -0.02806541882455349, 0.001337445224635303, -0.03666650131344795, -0.007419918663799763, 0.03144147992134094, 0.031544316560029984, -0.017226628959178925, 0.05352649837732315, -0.10658732056617737, -0.056753505021333694, 0.02380828745663166, 0.08391778916120529, 0.017498835921287537, -0.017434528097510338, -0.15254969894886017, 0.04487098008394241, -0.000678503536619246, 0.1031234860420227, 0.04418211802840233, -0.06441149860620499, -0.08642381429672241, 0.1076873242855072, -0.09639687091112137, -0.0230641458183527, -0.03636888414621353, 0.05487511679530144, 0.022330336272716522, -0.10966062545776367, -0.05688449740409851, -0.03438733145594597, 0.008399604819715023, 0.05633016303181648, 0.06082689017057419, -0.05321177840232849, -0.04331149160861969, 0.022488383576273918, 0.02569548785686493, 0.036733727902173996, -0.06485852599143982, -0.008381503634154797, 0.03750409930944443, 0.022321593016386032, -0.03091888502240181, -0.05532065033912659, 0.06809262931346893, -0.014657020568847656, -0.040289510041475296, -0.010601766407489777, 0.012336335144937038, 0.036684390157461166, 0.027029098942875862, -0.02400640770792961, -0.08274801075458527, 0.05500848591327667, 0.07319905608892441, -0.024430153891444206, 0.0652584657073021, -0.011620660312473774, -0.07560493052005768, 0.0010439119068905711, 0.057091135531663895, 0.015879694372415543, 0.0707249715924263, -0.009311921894550323, 0.006072147283703089, 0.044190555810928345, -0.06531774252653122, -0.03522016480565071, -0.034569744020700455, 0.009628493338823318, -0.02083089016377926, -0.005092719569802284, 0.03983493894338608, 0.03462154418230057, -0.017003407701849937, -0.02947840839624405, 0.07949584722518921, -0.031156549230217934, -0.039685383439064026, 0.03709883242845535, 0.026888353750109673, -0.033947836607694626, 0.01177133247256279, 0.06268437206745148, 0.07590407133102417, -0.05831080675125122, 0.003412064630538225, -0.00781903974711895, 0.028693215921521187, -0.006659355480223894, -0.02424536645412445, -0.08734653145074844, -0.040050849318504333, -0.032758407294750214, -0.04303334280848503, 0.08052275329828262, 0.02469521202147007, 0.11518104374408722, -0.02599245123565197, 0.020133748650550842, 0.045360732823610306, 0.021315358579158783, 0.023713085800409317, 0.04391408711671829, 3.753375502694642e-33, 0.11155989021062851, -0.001823998405598104, 0.05434489995241165, -0.028500834479928017, 0.08806393295526505, -0.026610052213072777, 0.06307870894670486, -0.07102964073419571, -0.08554770797491074, -0.02423125132918358, -0.1149415448307991, 0.07033107429742813, -0.047372255474328995, -0.03505820780992508, 0.0014756510499864817, -0.006158940494060516, -0.011887417174875736, 0.03363716974854469, 0.08596193790435791, 0.08540979027748108, 0.05605528876185417, 0.012897077947854996, 0.05200616270303726, 0.02028662897646427, -0.06635390222072601, 0.02077176608145237, -0.028499608859419823, 0.02371615171432495, -0.09811466187238693, 0.01905728504061699, 0.14970289170742035, -0.012426626868546009, -0.013173193670809269, -0.036360252648591995, 0.03451450541615486, 0.017659269273281097, -0.05088237300515175, -0.015152227133512497, -0.09115391969680786, -0.07447666674852371, 0.01986381970345974, 0.0061842575669288635, -0.0367162860929966, -0.000011901097423105966, -0.10632707178592682, -0.02224910445511341, -0.0273763258010149, -0.10009387135505676, 0.0021168217062950134, -0.035255782306194305, -0.07087944447994232, 0.05707009881734848, -0.040666546672582626, -0.04846250265836716, 0.0257113054394722, 0.013584147207438946, 0.015559732913970947, -0.03751895949244499, 0.0829756110906601, 0.011250979267060757, -0.053034890443086624, 0.01425524614751339, 0.030685707926750183, -0.09441115707159042, -0.013689553365111351, -0.010670053772628307, -0.010801061056554317, 0.03370402008295059, -0.017784783616662025, 0.03088395483791828, -0.025793027132749557, 0.021998442709445953, 0.018042713403701782, 0.03076452575623989, -0.005988165736198425, -0.06258506327867508, -0.10288158804178238, -0.05369167402386665, -0.006144301034510136, -0.05138823390007019, 0.04144825041294098, -0.061810966581106186, -0.023025531321763992, 0.02854286879301071, 0.017428457736968994, 0.02151898667216301, 0.016200950369238853, -0.013878966681659222, 0.012965754605829716, 0.025198688730597496, 0.0017527126474305987, 0.012346955947577953, -0.007524384651333094, -0.07454273849725723, -0.05013199523091316, -4.6283128457429636e-33, 0.09021930396556854, -0.02141604758799076, -0.024981243535876274, -0.01955961249768734, -0.00567159429192543, -0.00025339823332615197, 0.051459237933158875, 0.12331714481115341, -0.005033425986766815, 0.012651830911636353, 0.03765912726521492, 0.018267503008246422, 0.04179263487458229, 0.005703578237444162, 0.08505409955978394, -0.005545115564018488, -0.021503599360585213, -0.08866219222545624, -0.006257510278373957, -0.0664418488740921, -0.0016191224567592144, -0.0054862662218511105, -0.03891809657216072, 0.0006163287907838821, 0.032178208231925964, 0.01778382621705532, -0.024059705436229706, 0.030839309096336365, -0.08448538929224014, -0.0259938295930624, -0.021867400035262108, 0.07122371345758438, -0.08435144275426865, 0.0728406012058258, -0.015700209885835648, 0.07736002653837204, 0.008542588911950588, 0.0797455906867981, 0.05409727990627289, 0.05868447199463844, 0.03010997734963894, -0.08300327509641647, -0.031012872233986855, -0.02119889296591282, -0.007570724934339523, 0.011052053421735764, -0.035297270864248276, 0.10720419138669968, -0.005021472927182913, -0.07141423225402832, 0.0617545060813427, -0.014345950447022915, -0.04628780111670494, -0.014616088941693306, 0.06846613436937332, -0.01974242739379406, -0.022466372698545456, -0.11618581414222717, -0.02704031579196453, 0.007266797125339508, 0.013812261633574963, -0.15399445593357086, -0.019076695665717125, 0.02490353211760521, -0.010394462384283543, -0.09369988739490509, -0.0675460696220398, -0.020876191556453705, -0.017652591690421104, -0.011122303083539009, -0.11747252941131592, -0.014605018310248852, 0.05246628075838089, 0.0035852110013365746, 0.09247209876775742, -0.02670968510210514, -0.09903914481401443, 0.017940906807780266, 0.0994381383061409, 0.04577915370464325, -0.04660963639616966, 0.03769174590706825, 0.035390742123126984, 0.024972833693027496, 0.0805514007806778, -0.028862908482551575, 0.038817305117845535, 0.05974730849266052, -0.025903988629579544, -0.027845516800880432, -0.05172867327928543, 0.035681940615177155, -0.014834797941148281, 0.09489060193300247, 0.022226091474294662, -4.799658270826512e-8, -0.1107679009437561, -0.019677089527249336, -0.017628297209739685, 0.021767249330878258, -0.05247790366411209, 0.02923782542347908, 0.045667048543691635, -0.03618844226002693, 0.030631141737103462, -0.010125716216862202, 0.007967808283865452, 0.08005134016275406, -0.038844674825668335, 0.006359797436743975, -0.08001429587602615, 0.04640266299247742, 0.0014765631640329957, 0.043891508132219315, 0.024408480152487755, -0.02310287021100521, 0.047817129641771317, 0.007931694388389587, 0.03612077236175537, -0.0007813084521330893, 0.09061222523450851, -0.01444104965776205, -0.07870865613222122, 0.0628017857670784, -0.05075626075267792, -0.006098119542002678, -0.01707731932401657, -0.035254109650850296, 0.04575806483626366, -0.029062427580356598, -0.032007407397031784, -0.011268077418208122, 0.0016258294926956296, 0.008787523955106735, -0.010977453552186489, 0.002220017835497856, 0.12183152139186859, 0.05755184218287468, -0.012556325644254684, 0.00048669942771084607, 0.06153404712677002, 0.07324930280447006, 0.0625930204987526, -0.0020805667154490948, 0.02173471264541149, 0.010494507849216461, -0.0036722731310874224, -0.10480432212352753, -0.019707929342985153, 0.01786336861550808, -0.1271315962076187, -0.11739446967840195, -0.031081287190318108, -0.043852806091308594, -0.04749109223484993, 0.027856377884745598, 0.07883412390947342, -0.011564794927835464, 0.04884001985192299, 0.023186560720205307 ]
0.07339
> Add the following configuration: ```json { "mcpServers": { "web\_search\_and\_fetch": { "type": "stdio", "command": "uv", "args": ["run", "path/to/web-search-mcp.py"], "env": { "OLLAMA\_API\_KEY": "your\_api\_key\_here" } } } } ``` ![Cline MCP Configuration](/images/cline-mcp.png) ### Codex Ollama works well with OpenAI's Codex tool. Add the following configuration to `~/.codex/config.toml` ```python [mcp\_servers.web\_search] command = "uv" args = ["run", "path/to/web-search-mcp.py"] env = { "OLLAMA\_API\_KEY" = "your\_api\_key\_here" } ``` ![Codex MCP Configuration](/images/codex-mcp.png) ### Goose Ollama can integrate with Goose via its MCP feature. ![Goose MCP Configuration 1](/images/goose-mcp-1.png) ![Goose MCP Configuration 2](/images/goose-mcp-2.png) ### Other integrations Ollama can be integrated into most of the tools available either through direct integration of Ollama's API, Python / JavaScript libraries, OpenAI compatible API, and MCP server integration.
https://github.com/ollama/ollama/blob/main//docs/capabilities/web-search.mdx
main
ollama
[ -0.04255656525492668, 0.01574365608394146, -0.003144487738609314, 0.030693596228957176, 0.01153378002345562, -0.09999629855155945, -0.05623004585504532, 0.049540240317583084, -0.01732780784368515, -0.05964232236146927, 0.05466850847005844, -0.012350518256425858, 0.04915313422679901, 0.024544410407543182, 0.14541691541671753, 0.042028289288282394, -0.029502561315894127, 0.007665677927434444, 0.039844807237386703, -0.02063606120646, 0.06827971339225769, 0.022692427039146423, 0.09692054986953735, -0.05203423276543617, -0.10636518150568008, 0.024672474712133408, 0.010790149681270123, -0.051987312734127045, -0.03524668142199516, 0.011302562430500984, 0.0684114471077919, -0.04120660573244095, -0.012975282967090607, 0.0065254755318164825, 0.14732110500335693, 0.10505013912916183, -0.030111314728856087, -0.09480427950620651, -0.06495705246925354, -0.004496841691434383, 0.09567516297101974, 0.051588717848062515, 0.01050783134996891, -0.054367545992136, -0.031025102362036705, -0.09031875431537628, 0.022609815001487732, -0.07266206294298172, -0.0035632867366075516, -0.03486999496817589, -0.11942528933286667, -0.030961425974965096, -0.06332223862409592, -0.03769128397107124, 0.08699629455804825, 0.04293222725391388, -0.06166887655854225, -0.03443777561187744, -0.0031035002321004868, -0.0338248610496521, 0.030249115079641342, -0.004905224312096834, -0.029494062066078186, -0.008418550714850426, -0.006236659362912178, 0.022902008146047592, 0.03129158169031143, -0.057467419654130936, 0.07476136088371277, -0.09360683709383011, 0.005327997729182243, 0.00294951768592, -0.0028316103853285313, -0.0190898347645998, -0.01223775465041399, 0.019666556268930435, 0.10103077441453934, 0.06695783138275146, 0.003952946048229933, -0.0402790904045105, -0.019542237743735313, -0.06950778514146805, -0.012565866112709045, 0.03526400402188301, 0.062475934624671936, 0.01210806705057621, -0.017565632238984108, -0.032813381403684616, 0.10841582715511322, -0.004103131126612425, 0.0494052991271019, -0.06675980985164642, -0.10271593183279037, -0.06341876834630966, 0.06993842124938965, 0.010000835172832012, 0.018558667972683907, -0.03252137824892998, -0.06100675091147423, 0.07840151339769363, -0.017936166375875473, -0.049833305180072784, 0.0327364020049572, 0.03903288394212723, -0.0014084047870710492, 0.01963067427277565, 0.07955674082040787, 0.06933160871267319, -0.03406842052936554, 0.03556949272751808, 0.009547867812216282, -0.046862367540597916, 0.05839718505740166, -0.03233495354652405, 0.005811626091599464, 0.06873723864555359, -0.019947785884141922, 0.0015957456780597568, 0.00663941353559494, 0.04435442015528679, 0.006665166933089495, -0.04884745180606842, -0.05659865960478783, 0.005041508469730616, 0.001961703645065427, 0.07553394138813019, -0.03622325137257576, 6.908905598820607e-34, 0.11006303131580353, -0.05190429091453552, 0.07344325631856918, -0.04909273236989975, 0.03646032512187958, -0.009549473412334919, 0.08338968455791473, -0.07520358264446259, -0.04712631553411484, -0.05882815644145012, -0.07588034123182297, 0.048336442559957504, -0.08377078175544739, 0.07258674502372742, -0.02174636535346508, -0.028803089633584023, -0.013685133308172226, 0.0400628037750721, 0.07655374705791473, 0.04146081209182739, -0.020064210519194603, 0.03786569833755493, 0.052697498351335526, -0.006365407258272171, -0.09632880240678787, 0.029328353703022003, -0.0920255109667778, -0.057511936873197556, 0.04163161665201187, 0.014020965434610844, 0.10021623969078064, -0.0034771275240927935, -0.05481351166963577, 0.01210442278534174, -0.01847035624086857, -0.03675312548875809, -0.07329311966896057, 0.007180607877671719, -0.11475138366222382, 0.01876768283545971, -0.05801527574658394, 0.05702153965830803, -0.028478113934397697, -0.008709552697837353, -0.051456306129693985, -0.03962891548871994, -0.0906258374452591, -0.004801862873136997, 0.008126279339194298, -0.01178711373358965, -0.03098689392209053, 0.03298032656311989, -0.0669042244553566, -0.015994761139154434, 0.053648144006729126, -0.05517711490392685, 0.03475784510374069, -0.039719726890325546, 0.04062429070472717, -0.09494919329881668, -0.0030550984665751457, 0.009853617288172245, 0.05547399818897247, -0.018587863072752953, 0.049716852605342865, 0.010284282267093658, 0.012362396344542503, 0.047464653849601746, -0.022848155349493027, -0.0009532223339192569, 0.04218482971191406, 0.04998260736465454, -0.021166400983929634, 0.0018470584182068706, 0.029906902462244034, -0.05786805599927902, 0.006776577327400446, -0.024594323709607124, -0.002985889557749033, 0.03028557077050209, 0.04172876849770546, -0.011651191860437393, 0.0017674040282145143, 0.009868270717561245, -0.0003653677995316684, 0.05423475429415703, 0.019530650228261948, 0.021654028445482254, 0.05702749267220497, -0.007144025061279535, 0.035197556018829346, 0.019017169252038002, -0.01797192171216011, -0.038884907960891724, -0.07391762733459473, -1.6602538947639982e-33, 0.043130286037921906, -0.046544283628463745, 0.025382203981280327, 0.006596598774194717, -0.03168587014079094, -0.05957907810807228, 0.028426574543118477, 0.016265781596302986, 0.004059259779751301, -0.018358778208494186, 0.021831104531884193, -0.03393959999084473, 0.018906136974692345, -0.054003965109586716, -0.000624530017375946, -0.01431223377585411, -0.008593226782977581, 0.0672665610909462, 0.01067062746733427, 0.03855809569358826, -0.03953402489423752, 0.027136890217661858, -0.036023858934640884, 0.026370685547590256, 0.02988795004785061, 0.010483619756996632, 0.022136079147458076, -0.016283031553030014, -0.11446630954742432, -0.06908197700977325, -0.025712084025144577, 0.10637083649635315, -0.08627618849277496, 0.08346249908208847, -0.016337696462869644, 0.06324753165245056, 0.03737591207027435, 0.06243592128157616, 0.0037871322128921747, 0.08388842642307281, 0.08022134751081467, -0.02727208286523819, -0.03374593332409859, 0.02479991316795349, -0.05285412073135376, -0.04097467288374901, 0.0048785642720758915, 0.05658593028783798, -0.055271945893764496, 0.054156623780727386, 0.007086853496730328, -0.011103673838078976, -0.055913861840963364, -0.08258583396673203, 0.003650099504739046, 0.02953845076262951, 0.015905125066637993, 0.012365251779556274, -0.050229642540216446, -0.002044069580733776, 0.00578491622582078, -0.09956182539463043, -0.030047040432691574, 0.02458169125020504, -0.02675369754433632, 0.007715371437370777, -0.06354403495788574, 0.04964679479598999, -0.038397856056690216, -0.06998959928750992, -0.13221053779125214, -0.08341015130281448, 0.10247321426868439, 0.02939808927476406, 0.10137515515089035, 0.05706871300935745, -0.05077299103140831, 0.053093526512384415, 0.09064044803380966, 0.04959755763411522, -0.056904394179582596, 0.0427977554500103, 0.01714344136416912, 0.040589720010757446, 0.005868509877473116, 0.011081294156610966, 0.055486660450696945, 0.06163891777396202, 0.025974314659833908, -0.021060239523649216, -0.023497965186834335, -0.02052929438650608, 0.0496821328997612, 0.08500830084085464, 0.12660615146160126, -4.54729942589438e-8, -0.03908978030085564, -0.05223440006375313, -0.05819004774093628, 0.06915974617004395, -0.013037688098847866, 0.05823482200503349, 0.0018007736653089523, -0.02073349431157112, 0.029940323904156685, 0.0017318562604486942, 0.06666864454746246, 0.07611445337533951, -0.06936059147119522, -0.01738154888153076, -0.07507295161485672, 0.061713818460702896, 0.02798042632639408, 0.022869087755680084, 0.014903818257153034, -0.10122901201248169, -0.02173502743244171, -0.05299802124500275, 0.05160694569349289, 0.0281000304967165, -0.0006685167318210006, 0.0018062571762129664, -0.07615925371646881, 0.054546043276786804, -0.09723817557096481, -0.050803959369659424, 0.0479273647069931, -0.09905347228050232, 0.021410610526800156, -0.021747909486293793, 0.01192579884082079, -0.026778653264045715, -0.006310204043984413, -0.055056534707546234, -0.05623706057667732, 0.005955724511295557, -0.01403396762907505, 0.03487040475010872, -0.018720990046858788, -0.0698925256729126, 0.05849512293934822, 0.08072739839553833, 0.04088478162884712, 0.07968627661466599, -0.08415723592042923, 0.023981917649507523, -0.02360326610505581, -0.09910592436790466, 0.07186289876699448, 0.0353546105325222, 0.03231171891093254, -0.07829488813877106, 0.06154526397585869, -0.030793018639087677, -0.04496971145272255, 0.034830473363399506, 0.0074018738232553005, -0.04551824927330017, -0.004771985113620758, -0.005162036512047052 ]
0.018315
Structured outputs let you enforce a JSON schema on model responses so you can reliably extract structured data, describe images, or keep every reply consistent. ## Generating structured JSON ```shell curl -X POST http://localhost:11434/api/chat -H "Content-Type: application/json" -d '{ "model": "gpt-oss", "messages": [{"role": "user", "content": "Tell me about Canada in one line"}], "stream": false, "format": "json" }' ``` ```python from ollama import chat response = chat( model='gpt-oss', messages=[{'role': 'user', 'content': 'Tell me about Canada.'}], format='json' ) print(response.message.content) ``` ```javascript import ollama from 'ollama' const response = await ollama.chat({ model: 'gpt-oss', messages: [{ role: 'user', content: 'Tell me about Canada.' }], format: 'json' }) console.log(response.message.content) ``` ## Generating structured JSON with a schema Provide a JSON schema to the `format` field. It is ideal to also pass the JSON schema as a string in the prompt to ground the model's response. ```shell curl -X POST http://localhost:11434/api/chat -H "Content-Type: application/json" -d '{ "model": "gpt-oss", "messages": [{"role": "user", "content": "Tell me about Canada."}], "stream": false, "format": { "type": "object", "properties": { "name": {"type": "string"}, "capital": {"type": "string"}, "languages": { "type": "array", "items": {"type": "string"} } }, "required": ["name", "capital", "languages"] } }' ``` Use Pydantic models and pass `model\_json\_schema()` to `format`, then validate the response: ```python from ollama import chat from pydantic import BaseModel class Country(BaseModel): name: str capital: str languages: list[str] response = chat( model='gpt-oss', messages=[{'role': 'user', 'content': 'Tell me about Canada.'}], format=Country.model\_json\_schema(), ) country = Country.model\_validate\_json(response.message.content) print(country) ``` Serialize a Zod schema with `zodToJsonSchema()` and parse the structured response: ```javascript import ollama from 'ollama' import { z } from 'zod' import { zodToJsonSchema } from 'zod-to-json-schema' const Country = z.object({ name: z.string(), capital: z.string(), languages: z.array(z.string()), }) const response = await ollama.chat({ model: 'gpt-oss', messages: [{ role: 'user', content: 'Tell me about Canada.' }], format: zodToJsonSchema(Country), }) const country = Country.parse(JSON.parse(response.message.content)) console.log(country) ``` ## Example: Extract structured data Define the objects you want returned and let the model populate the fields: ```python from ollama import chat from pydantic import BaseModel class Pet(BaseModel): name: str animal: str age: int color: str | None favorite\_toy: str | None class PetList(BaseModel): pets: list[Pet] response = chat( model='gpt-oss', messages=[{'role': 'user', 'content': 'I have two cats named Luna and Loki...'}], format=PetList.model\_json\_schema(), ) pets = PetList.model\_validate\_json(response.message.content) print(pets) ``` ## Example: Vision with structured outputs Vision models accept the same `format` parameter, enabling deterministic descriptions of images: ```python from ollama import chat from pydantic import BaseModel from typing import Literal, Optional class Object(BaseModel): name: str confidence: float attributes: str class ImageDescription(BaseModel): summary: str objects: list[Object] scene: str colors: list[str] time\_of\_day: Literal['Morning', 'Afternoon', 'Evening', 'Night'] setting: Literal['Indoor', 'Outdoor', 'Unknown'] text\_content: Optional[str] = None response = chat( model='gemma3', messages=[{ 'role': 'user', 'content': 'Describe this photo and list the objects you detect.', 'images': ['path/to/image.jpg'], }], format=ImageDescription.model\_json\_schema(), options={'temperature': 0}, ) image\_description = ImageDescription.model\_validate\_json(response.message.content) print(image\_description) ``` ## Tips for reliable structured outputs - Define schemas with Pydantic (Python) or Zod (JavaScript) so they can be reused for validation. - Lower the temperature (e.g., set it to `0`) for more deterministic completions. - Structured outputs work through the OpenAI-compatible API via `response\_format`
https://github.com/ollama/ollama/blob/main//docs/capabilities/structured-outputs.mdx
main
ollama
[ -0.0353856235742569, 0.07860638201236725, 0.0246784295886755, 0.06421861797571182, 0.012775180861353874, -0.13591212034225464, -0.003446189220994711, -0.006492525339126587, 0.043206583708524704, -0.06518012285232544, -0.012981902807950974, -0.01761712320148945, -0.05752546340227127, 0.09049654006958008, 0.09277236461639404, 0.01171543262898922, -0.01296257134526968, -0.033437520265579224, -0.05156254768371582, -0.08228279650211334, 0.05162381753325462, 0.0403841957449913, 0.07900622487068176, 0.03336936980485916, -0.008523042313754559, 0.022005343809723854, 0.017379870638251305, 0.004573535174131393, -0.032560795545578, -0.009989876300096512, 0.05963796004652977, -0.05945517122745514, -0.004193930886685848, 0.08046508580446243, 0.02804243005812168, 0.0818880945444107, 0.041822802275419235, -0.0932290330529213, 0.03531854227185249, 0.016130240634083748, 0.0320168063044548, 0.054204270243644714, -0.05349642038345337, -0.06582518666982651, 0.08395517617464066, -0.09435668587684631, -0.06470786035060883, -0.014674956910312176, -0.01564478874206543, 0.0566319078207016, -0.06985921412706375, 0.023961644619703293, -0.0717545673251152, 0.04554670676589012, 0.0822978988289833, 0.06812139600515366, -0.0774720087647438, -0.014111972413957119, -0.02662529982626438, -0.06581082195043564, -0.008810675702989101, -0.05921996757388115, -0.07419921457767487, 0.024750497192144394, -0.025428231805562973, -0.030029011890292168, -0.06121509522199631, 0.06520981341600418, 0.012384241446852684, -0.025117797777056694, 0.011930008418858051, -0.0009099830640479922, -0.05550114065408707, -0.006085589062422514, -0.007459686137735844, -0.03403879329562187, 0.056871164590120316, -0.011890862137079239, -0.03138506039977074, 0.07427025586366653, -0.008341868408024311, -0.04077134653925896, 0.020502351224422455, 0.06301556527614594, 0.010135331191122532, -0.015672937035560608, -0.014661534689366817, 0.04861024394631386, -0.026357049122452736, 0.012483451515436172, -0.07096831500530243, -0.06003711372613907, 0.0753881186246872, 0.038690656423568726, 0.04256560653448105, 0.018053093925118446, 0.07421014457941055, -0.09318318217992783, -0.0263234730809927, 0.10876960307359695, 0.010631137527525425, -0.07321271300315857, 0.07975999265909195, -0.029303686693310738, -0.0019822032190859318, 0.01717362366616726, -0.021263903006911278, 0.04945535212755203, -0.06652706861495972, 0.025382567197084427, -0.03415202349424362, -0.04825584962964058, -0.01524394191801548, 0.010900412686169147, -0.0386810265481472, -0.02836577035486698, -0.019365152344107628, -0.02363932877779007, -0.015242082998156548, 0.03503097966313362, 0.12004409730434418, -0.030978649854660034, 0.025965334847569466, 0.06441572308540344, 0.04694238305091858, 0.010027026757597923, 0.03679695352911949, 4.560244008648676e-33, 0.052921004593372345, -0.035279545933008194, 0.059194207191467285, 0.02070024609565735, 0.014469540677964687, 0.07781854271888733, 0.006278372369706631, -0.05540480092167854, -0.05698708817362785, -0.03000781685113907, -0.08267982304096222, 0.08395598083734512, -0.010383835062384605, 0.06238681450486183, -0.033748917281627655, 0.04665098339319229, -0.004908221773803234, 0.0437709279358387, 0.08184829354286194, 0.0887838825583458, 0.01401528250426054, 0.029009411111474037, 0.014077283442020416, 0.017376195639371872, 0.005355124827474356, -0.048289474099874496, -0.02333536185324192, -0.09679913520812988, -0.1448456346988678, 0.011726563796401024, 0.032437846064567566, -0.02213611640036106, 0.051355116069316864, -0.021248415112495422, 0.09443638473749161, 0.014247875660657883, 0.03426579013466835, -0.06360512971878052, -0.09410923719406128, -0.021513480693101883, 0.002182756317779422, -0.008686085231602192, -0.0016800030134618282, -0.006282640155404806, -0.01636173203587532, -0.00011330583947710693, -0.046120818704366684, -0.024292711168527603, -0.05374257266521454, 0.02684640698134899, -0.014029772020876408, 0.0950310230255127, -0.027154287323355675, 0.027735115960240364, 0.010290269739925861, -0.06880535185337067, 0.043744657188653946, -0.012180699035525322, 0.07192663848400116, -0.05549514293670654, 0.01732039637863636, 0.002412898698821664, 0.0048819659277796745, -0.03893766552209854, 0.01569751650094986, -0.03292616084218025, -0.06714822351932526, 0.05967298895120621, -0.040261268615722656, 0.03205794468522072, -0.039025355130434036, 0.05559274181723595, -0.04398180916905403, 0.00719313882291317, -0.031029008328914642, -0.014267750084400177, 0.004893481265753508, 0.015600549057126045, 0.02877393551170826, 0.021272581070661545, 0.06242631748318672, -0.032715875655412674, 0.005914261564612389, -0.019637415185570717, -0.03446103632450104, 0.027871839702129364, 0.07231668382883072, -0.04294082522392273, -0.039130255579948425, 0.048877421766519547, -0.11346594989299774, 0.004517632070928812, -0.024591514840722084, -0.0427534393966198, -0.007703686133027077, -4.968343688501511e-33, 0.01221449114382267, 0.008890199474990368, 0.026874063536524773, -0.055577028542757034, 0.02374679408967495, -0.04847840592265129, 0.07121160626411438, 0.10169780999422073, 0.07738716155290604, -0.010594217106699944, -0.011286189779639244, -0.06935036927461624, 0.05162327364087105, -0.014544499106705189, 0.07153426855802536, 0.012269976548850536, -0.08369525521993637, -0.06296546012163162, 0.021110128611326218, -0.013105697929859161, -0.05912567675113678, 0.02191140502691269, -0.04866170883178711, 0.06766705960035324, 0.025471678003668785, -0.0009709679870866239, 0.007314401213079691, -0.0655495822429657, -0.0657893717288971, -0.01762593351304531, -0.03547320142388344, 0.013170847669243813, -0.04017675295472145, 0.03820391744375229, -0.028087183833122253, 0.05552014708518982, 0.05960758030414581, 0.06804026663303375, -0.04366476088762283, 0.07185658812522888, 0.07243389636278152, -0.022423414513468742, -0.08202770352363586, 0.005049804225564003, -0.019629932940006256, 0.009026741608977318, -0.031473517417907715, 0.04045269638299942, -0.06294024735689163, 0.034606993198394775, 0.05060756579041481, -0.019282007589936256, -0.0030120564624667168, 0.026922333985567093, 0.03337797522544861, -0.10769953578710556, 0.00222132820636034, -0.047505103051662445, -0.04325366020202637, -0.054546717554330826, -0.009901675395667553, -0.09149401634931564, 0.011351346969604492, 0.022490685805678368, 0.0588531568646431, -0.14104613661766052, -0.03696581348776817, -0.06337054818868637, 0.010513764806091785, -0.016974227502942085, -0.02087261527776718, -0.09037039428949356, -0.007281546015292406, 0.001595897483639419, 0.12920916080474854, 0.02222507819533348, -0.10137104988098145, -0.04332921281456947, 0.028704918920993805, 0.052069537341594696, -0.05198294296860695, -0.02442924864590168, 0.09504129737615585, 0.12216509878635406, 0.1066880002617836, -0.017191508784890175, 0.05979597941040993, 0.02539275772869587, 0.007774007506668568, 0.036642350256443024, -0.028923161327838898, 0.01842305436730385, -0.03249045088887215, 0.05636096000671387, 0.04559013247489929, -4.881917448074091e-8, -0.13538159430027008, -0.10581604391336441, -0.11186642199754715, 0.08550451695919037, -0.06472989171743393, 0.06815653294324875, 0.05781101807951927, -0.040388595312833786, 0.03477154299616814, -0.01647469401359558, 0.04532340541481972, 0.04456669092178345, -0.08209986239671707, -0.09035725891590118, 0.014521721750497818, 0.06290193647146225, -0.06698227673768997, 0.042820047587156296, 0.0034253725316375494, -0.0003688898868858814, 0.06824954599142075, 0.03522755205631256, -0.0016027884557843208, 0.014993030577898026, -0.0061223446391522884, -0.030443113297224045, -0.03428121656179428, 0.053394075483083725, -0.05545799061655998, -0.00778092909604311, -0.0012671705335378647, -0.10224144160747528, 0.040736693888902664, -0.01772877760231495, 0.043925896286964417, -0.10249102115631104, 0.03767737001180649, -0.02988864667713642, 0.0013473962899297476, 0.028408143669366837, 0.05344506725668907, 0.06062259525060654, -0.09536820650100708, 0.0036622900515794754, 0.0659838542342186, -0.0017846765695139766, 0.012469504959881306, -0.0225552748888731, -0.0014972529606893659, 0.025092894211411476, -0.03057277388870716, -0.06172294542193413, -0.024770529940724373, 0.04480520635843277, -0.038858018815517426, -0.07922227680683136, 0.030146470293402672, -0.014240843243896961, -0.002739056246355176, 0.019995739683508873, 0.07714179903268814, 0.054309867322444916, 0.060274284332990646, -0.008143523707985878 ]
-0.000351
Streaming allows you to render text as it is produced by the model. Streaming is enabled by default through the REST API, but disabled by default in the SDKs. To enable streaming in the SDKs, set the `stream` parameter to `True`. ## Key streaming concepts 1. Chatting: Stream partial assistant messages. Each chunk includes the `content` so you can render messages as they arrive. 1. Thinking: Thinking-capable models emit a `thinking` field alongside regular content in each chunk. Detect this field in streaming chunks to show or hide reasoning traces before the final answer arrives. 1. Tool calling: Watch for streamed `tool\_calls` in each chunk, execute the requested tool, and append tool outputs back into the conversation. ## Handling streamed chunks It is necessary to accumulate the partial fields in order to maintain the history of the conversation. This is particularly important for tool calling where the thinking, tool call from the model, and the executed tool result must be passed back to the model in the next request. ```python from ollama import chat stream = chat( model='qwen3', messages=[{'role': 'user', 'content': 'What is 17 Γ— 23?'}], stream=True, ) in\_thinking = False content = '' thinking = '' for chunk in stream: if chunk.message.thinking: if not in\_thinking: in\_thinking = True print('Thinking:\n', end='', flush=True) print(chunk.message.thinking, end='', flush=True) # accumulate the partial thinking thinking += chunk.message.thinking elif chunk.message.content: if in\_thinking: in\_thinking = False print('\n\nAnswer:\n', end='', flush=True) print(chunk.message.content, end='', flush=True) # accumulate the partial content content += chunk.message.content # append the accumulated fields to the messages for the next request new\_messages = [{ role: 'assistant', thinking: thinking, content: content }] ``` ```javascript import ollama from 'ollama' async function main() { const stream = await ollama.chat({ model: 'qwen3', messages: [{ role: 'user', content: 'What is 17 Γ— 23?' }], stream: true, }) let inThinking = false let content = '' let thinking = '' for await (const chunk of stream) { if (chunk.message.thinking) { if (!inThinking) { inThinking = true process.stdout.write('Thinking:\n') } process.stdout.write(chunk.message.thinking) // accumulate the partial thinking thinking += chunk.message.thinking } else if (chunk.message.content) { if (inThinking) { inThinking = false process.stdout.write('\n\nAnswer:\n') } process.stdout.write(chunk.message.content) // accumulate the partial content content += chunk.message.content } } // append the accumulated fields to the messages for the next request new\_messages = [{ role: 'assistant', thinking: thinking, content: content }] } main().catch(console.error) ```
https://github.com/ollama/ollama/blob/main//docs/capabilities/streaming.mdx
main
ollama
[ -0.03611624240875244, -0.012033410370349884, -0.010673731565475464, 0.023737262934446335, 0.031636014580726624, -0.0956764966249466, 0.003301618853583932, 0.0032725417986512184, 0.08369556814432144, -0.050677552819252014, -0.034579288214445114, -0.04331526532769203, -0.06273860484361649, 0.032315343618392944, 0.08347874879837036, 0.001234347582794726, 0.11381382495164871, -0.08113500475883484, -0.06842491030693054, -0.0880870521068573, 0.08610022813081741, 0.021450484171509743, 0.05110320448875427, 0.02574903517961502, 0.023454410955309868, -0.005062850657850504, 0.028851700946688652, 0.020415514707565308, 0.047334738075733185, -0.011998199857771397, 0.064949631690979, -0.0062861256301403046, -0.02633323334157467, 0.05985467880964279, 0.004636635072529316, 0.05897153913974762, 0.023062437772750854, -0.05806417018175125, -0.06639823317527771, -0.02582612633705139, 0.034799590706825256, -0.021839095279574394, -0.08694277703762054, -0.05073586851358414, 0.02518649585545063, -0.08724315464496613, -0.05733661726117134, -0.02680124156177044, 0.01894383318722248, 0.014417633414268494, -0.08910620957612991, -0.018224919214844704, -0.01622556522488594, 0.1575600802898407, 0.017927315086126328, 0.04866853356361389, -0.015213800594210625, -0.01673359051346779, -0.02737678959965706, 0.006831154227256775, -0.07215839624404907, -0.018801579251885414, 0.01895536482334137, -0.01068168319761753, -0.029276099056005478, -0.024716287851333618, -0.0365678109228611, 0.08855172246694565, 0.04784631356596947, 0.012302849441766739, -0.00867477897554636, 0.004518036264926195, -0.026169270277023315, -0.0155925452709198, -0.007238189689815044, -0.03363485261797905, 0.06873822957277298, -0.0015104251215234399, -0.04756278544664383, -0.03775642439723015, -0.025018487125635147, -0.006503356620669365, 0.0428481362760067, 0.03386147692799568, -0.008781070820987225, 0.003464681329205632, -0.01830943115055561, 0.05880912393331528, -0.018731728196144104, 0.004988742060959339, -0.05988483130931854, -0.08776379376649857, 0.019528763368725777, -0.01277575921267271, 0.0037452420219779015, 0.0536646842956543, 0.023176195099949837, -0.041059888899326324, -0.009351233951747417, 0.03702162578701973, 0.007306112442165613, -0.0027506814803928137, 0.04857973754405975, -0.07698345929384232, -0.019081534817814827, -0.04395126923918724, 0.0885591059923172, 0.07714396715164185, -0.04025498777627945, -0.0357280932366848, -0.02031814120709896, -0.03747441992163658, 0.0433429479598999, 0.042558882385492325, 0.07576963305473328, 0.028819365426898003, -0.004714008420705795, -0.02179867960512638, -0.008154607377946377, 0.05377238616347313, 0.07057870179414749, -0.012987392954528332, -0.0147491954267025, 0.07212227582931519, 0.10915490239858627, 0.0351497083902359, 0.08951321244239807, 4.204312400743349e-33, 0.09899981319904327, -0.017754897475242615, 0.003723869565874338, 0.04632756859064102, 0.04401855543255806, 0.08267805725336075, 0.05054985359311104, -0.06016722321510315, -0.03160007297992706, -0.026211682707071304, -0.04779285565018654, 0.04438822716474533, -0.025266550481319427, 0.04024042561650276, 0.009989905171096325, -0.058797143399715424, -0.11151845008134842, 0.035956282168626785, 0.02374253049492836, 0.0617234967648983, -0.002481411676853895, -0.032277632504701614, -0.021823560819029808, 0.01153890322893858, 0.014465817250311375, 0.047723203897476196, -0.00411693612113595, -0.08590029925107956, -0.04467231035232544, 0.015583185479044914, -0.07879368960857391, 0.026421232149004936, 0.0030985779594630003, -0.005969980265945196, 0.04856409877538681, -0.02985794097185135, -0.022831838577985764, -0.051858462393283844, -0.029807398095726967, -0.04561501368880272, 0.006564093753695488, -0.010006713680922985, -0.03155802935361862, -0.08497435599565506, -0.13617759943008423, -0.026739101856946945, -0.07728652656078339, 0.05829036980867386, -0.04039072245359421, -0.021727101877331734, 0.05532819405198097, 0.051429759711027145, 0.04373312368988991, -0.006302107125520706, -0.003884748090058565, -0.04969634860754013, 0.05697675794363022, -0.029128046706318855, 0.1024838462471962, -0.006838112138211727, 0.006663904525339603, -0.01821441575884819, -0.02477971650660038, 0.008844401687383652, 0.037131376564502716, 0.04358244314789772, -0.01209319569170475, 0.024328911677002907, 0.02738839201629162, -0.06695626676082611, -0.09370383620262146, 0.016351087018847466, 0.006507952697575092, 0.03571389988064766, -0.02344595454633236, 0.013433054089546204, -0.04384440556168556, -0.04214025288820267, 0.04641543701291084, 0.06729010492563248, 0.06165356561541557, -0.04028231278061867, -0.024031836539506912, -0.05116267874836922, 0.010142100043594837, -0.020080940797924995, 0.015858110040426254, -0.10706592351198196, -0.044889822602272034, -0.004251237493008375, -0.09488211572170258, 0.0037146620452404022, 0.08554013073444366, -0.03864632919430733, -0.04148677736520767, -4.307134360977713e-33, 0.05137469992041588, 0.01395979430526495, -0.06487055867910385, 0.02010728418827057, 0.05763828381896019, -0.008140916004776955, 0.0453387014567852, 0.04995661973953247, 0.05667978897690773, -0.04441630095243454, -0.08714280277490616, -0.05658741295337677, -0.027069270610809326, 0.007715987507253885, 0.05273507907986641, -0.04611320421099663, -0.03448423743247986, -0.045356061309576035, 0.061118513345718384, -0.013862144201993942, -0.05428457260131836, -0.06838524341583252, -0.02455715276300907, -0.02002996951341629, 0.02509392984211445, 0.009192457422614098, 0.035282768309116364, 0.020259706303477287, -0.020468400791287422, -0.04853733628988266, 0.04074739292263985, -0.013425929471850395, -0.0514708086848259, -0.041732847690582275, -0.03714193031191826, 0.029347090050578117, 0.11202991753816605, -0.02298206463456154, -0.005570624954998493, 0.03281407430768013, 0.13737063109874725, -0.029942253604531288, -0.07615934312343597, 0.017365917563438416, -0.008578128181397915, 0.036907486617565155, -0.12495439499616623, 0.014927932992577553, -0.09485998749732971, 0.0024282694794237614, 0.07694141566753387, 0.008779788389801979, -0.03721168637275696, 0.013880805112421513, -0.032415784895420074, -0.07789547741413116, 0.0436587817966938, -0.012047460302710533, -0.03624889999628067, -0.07209939509630203, -0.03955459222197533, -0.058207228779792786, 0.030940376222133636, -0.034525785595178604, 0.040383193641901016, -0.04478885978460312, 0.018246524035930634, 0.007053257431834936, 0.011487221345305443, -0.059810541570186615, 0.04451886564493179, -0.13087357580661774, 0.02222476154565811, 0.061963677406311035, 0.1366368532180786, 0.04444212093949318, -0.10439466685056686, -0.08042480796575546, 0.008656607009470463, 0.025532633066177368, -0.038122158497571945, -0.03558767959475517, 0.0743260458111763, 0.08637499809265137, 0.03168186917901039, 0.023936811834573746, 0.030042001977562904, 0.09007838368415833, -0.046525318175554276, -0.036200426518917084, 0.00014372789883054793, 0.006148557178676128, -0.024593735113739967, 0.1476767212152481, 0.03304818272590637, -5.1311634052808586e-8, -0.08352179080247879, -0.0879046767950058, -0.016790160909295082, 0.0642419382929802, -0.02872188575565815, 0.01711687445640564, 0.010293182916939259, 0.003623558906838298, 0.053172044456005096, -0.037166643887758255, 0.024631990119814873, -0.03912585228681564, -0.007460193708539009, -0.059547048062086105, 0.03535362705588341, 0.05631789565086365, 0.041062820702791214, -0.04826844111084938, -0.007871701382100582, -0.07774384319782257, 0.10327228903770447, 0.01985207386314869, -0.04939709231257439, 0.07882698625326157, -0.03118155710399151, 0.021145431324839592, -0.005382159724831581, 0.10303821414709091, -0.05615638941526413, -0.04796992987394333, 0.029638681560754776, -0.013504981063306332, 0.04290612041950226, 0.02784605138003826, 0.06880255788564682, -0.030384715646505356, 0.011719207279384136, -0.0412028543651104, 0.03306476026773453, 0.10934553295373917, 0.02037590742111206, 0.04078863561153412, -0.05502316728234291, -0.06634438782930374, 0.07278456538915634, 0.025194017216563225, -0.048106398433446884, -0.10234413295984268, -0.039107795804739, 0.059987034648656845, -0.04294620454311371, -0.03593573346734047, -0.019574571400880814, 0.06362735480070114, 0.03415520489215851, -0.09798949956893921, 0.04214563965797424, -0.04072364419698715, -0.010165817104279995, 0.032752398401498795, 0.08824647217988968, 0.13329683244228363, 0.04094763845205307, 0.022920992225408554 ]
0.08423
Embeddings turn text into numeric vectors you can store in a vector database, search with cosine similarity, or use in RAG pipelines. The vector length depends on the model (typically 384–1024 dimensions). ## Recommended models - [embeddinggemma](https://ollama.com/library/embeddinggemma) - [qwen3-embedding](https://ollama.com/library/qwen3-embedding) - [all-minilm](https://ollama.com/library/all-minilm) ## Generate embeddings Generate embeddings directly from the command line: ```shell ollama run embeddinggemma "Hello world" ``` You can also pipe text to generate embeddings: ```shell echo "Hello world" | ollama run embeddinggemma ``` Output is a JSON array. ```shell curl -X POST http://localhost:11434/api/embed \ -H "Content-Type: application/json" \ -d '{ "model": "embeddinggemma", "input": "The quick brown fox jumps over the lazy dog." }' ``` ```python import ollama single = ollama.embed( model='embeddinggemma', input='The quick brown fox jumps over the lazy dog.' ) print(len(single['embeddings'][0])) # vector length ``` ```javascript import ollama from 'ollama' const single = await ollama.embed({ model: 'embeddinggemma', input: 'The quick brown fox jumps over the lazy dog.', }) console.log(single.embeddings[0].length) // vector length ``` The `/api/embed` endpoint returns L2‑normalized (unit‑length) vectors. ## Generate a batch of embeddings Pass an array of strings to `input`. ```shell curl -X POST http://localhost:11434/api/embed \ -H "Content-Type: application/json" \ -d '{ "model": "embeddinggemma", "input": [ "First sentence", "Second sentence", "Third sentence" ] }' ``` ```python import ollama batch = ollama.embed( model='embeddinggemma', input=[ 'The quick brown fox jumps over the lazy dog.', 'The five boxing wizards jump quickly.', 'Jackdaws love my big sphinx of quartz.', ] ) print(len(batch['embeddings'])) # number of vectors ``` ```javascript import ollama from 'ollama' const batch = await ollama.embed({ model: 'embeddinggemma', input: [ 'The quick brown fox jumps over the lazy dog.', 'The five boxing wizards jump quickly.', 'Jackdaws love my big sphinx of quartz.', ], }) console.log(batch.embeddings.length) // number of vectors ``` ## Tips - Use cosine similarity for most semantic search use cases. - Use the same embedding model for both indexing and querying.
https://github.com/ollama/ollama/blob/main//docs/capabilities/embeddings.mdx
main
ollama
[ -0.02541196532547474, 0.005719808395951986, -0.03444680571556091, -0.0212832260876894, -0.04352036491036415, -0.01705872267484665, -0.09840095788240433, 0.05137601122260094, 0.06281999498605728, -0.03904338553547859, 0.019591188058257103, -0.02888694405555725, 0.046031173318624496, 0.034919947385787964, 0.02495865896344185, 0.05375849828124046, 0.030325552448630333, 0.07196509838104248, -0.07693008333444595, -0.09971898049116135, 0.035691093653440475, 0.08758235722780228, 0.07065950334072113, -0.02865069918334484, 0.002008567564189434, 0.004618040286004543, -0.026190580800175667, 0.06526943296194077, 0.02795170620083809, -0.049802783876657486, 0.10507863759994507, -0.003283269004896283, 0.044268589466810226, 0.023432310670614243, 0.03974257409572601, 0.1035815104842186, -0.00887063704431057, -0.06357602775096893, -0.10793783515691757, -0.026017889380455017, 0.0743379220366478, 0.02899159863591194, -0.0856456533074379, -0.02198873460292816, 0.03924507275223732, -0.05939220264554024, -0.09565763175487518, -0.026038870215415955, -0.016611400991678238, -0.007155226077884436, -0.04758511856198311, -0.08069435507059097, -0.038843438029289246, 0.06882061064243317, -0.04730154573917389, -0.019069315865635872, -0.05081171914935112, -0.047086142003536224, 0.018224934116005898, -0.0015114523703232408, -0.033676330000162125, 0.010331331752240658, 0.0654292106628418, 0.030561961233615875, 0.03774487227201462, -0.07733546197414398, 0.001739440718665719, 0.04792916029691696, -0.024979356676340103, 0.01809706725180149, -0.08237560093402863, -0.01764402724802494, -0.12277955561876297, 0.028815556317567825, -0.03772560879588127, 0.04983581230044365, 0.09131251275539398, 0.007560127414762974, -0.04230658710002899, -0.015015596523880959, -0.006228039972484112, -0.010095964185893536, 0.007844923995435238, 0.03147144615650177, 0.03737355023622513, 0.07275868952274323, 0.046929676085710526, 0.027830839157104492, 0.0032476370688527822, -0.044453028589487076, -0.027826355770230293, -0.06220301613211632, -0.001968144904822111, -0.014625356532633305, 0.03629860281944275, -0.009565707296133041, 0.07223982363939285, 0.0332668274641037, -0.011815443634986877, 0.06464942544698715, 0.03558060899376869, -0.027078716084361076, 0.06140424311161041, 0.013872473500669003, -0.027234341949224472, -0.004925128538161516, 0.07914713025093079, 0.04364384710788727, -0.01567632518708706, -0.05815432220697403, -0.019191090017557144, -0.04390890523791313, 0.0012589305406436324, -0.051209691911935806, 0.030153760686516762, -0.034639373421669006, 0.046897608786821365, -0.03561275079846382, 0.03699560463428497, 0.04142944887280464, 0.035803213715553284, -0.0031035656575113535, -0.014296937733888626, 0.01932672969996929, -0.0021920446306467056, 0.06011461094021797, 0.01715075969696045, 7.421687091375998e-33, 0.08781055361032486, 0.035606883466243744, 0.05165654420852661, 0.06617163866758347, 0.03558436408638954, 0.06486207991838455, 0.02980833314359188, 0.03682444617152214, -0.07928109914064407, -0.008271114900708199, -0.07174285501241684, 0.08117729425430298, 0.018380027264356613, 0.06435748189687729, -0.0034911632537841797, -0.013232997618615627, -0.035300545394420624, -0.02493751421570778, 0.058068644255399704, 0.021186022087931633, 0.006068038754165173, -0.029921358451247215, -0.005848178640007973, 0.0032875596079975367, -0.027927488088607788, -0.02278175577521324, 0.034320250153541565, -0.11029097437858582, -0.08984579890966415, -0.001712367287836969, -0.014111372642219067, -0.08311203122138977, -0.006712725386023521, -0.052161186933517456, 0.011607573367655277, -0.002675780560821295, -0.02786252275109291, -0.02441933937370777, -0.08920139074325562, -0.019677894189953804, 0.019307458773255348, -0.029934143647551537, -0.013017630204558372, -0.05768975242972374, -0.05023181438446045, 0.002536946441978216, -0.014298055320978165, -0.007330078165978193, -0.04376966133713722, -0.040062516927719116, 0.07811081409454346, 0.05181851610541344, -0.022097589448094368, -0.045220326632261276, 0.07547855377197266, -0.03950013965368271, 0.00882098637521267, -0.06947820633649826, 0.06064242869615555, 0.03143310546875, -0.03697247430682182, 0.03717174753546715, 0.03981562703847885, 0.022686291486024857, 0.023826749995350838, -0.02252299152314663, 0.010156473144888878, -0.01157013326883316, -0.011173313483595848, 0.13315218687057495, -0.011767388321459293, 0.04043739661574364, -0.020315535366535187, 0.04346079379320145, 0.031066464260220528, -0.03665437176823616, -0.026976203545928, -0.11930482089519501, 0.004509099759161472, 0.06907914578914642, 0.022870982065796852, -0.061846595257520676, 0.022655809298157692, -0.05853170156478882, 0.007144310511648655, -0.15439242124557495, 0.06498273462057114, -0.1121143102645874, 0.008589668199419975, -0.042613763362169266, 0.005438283551484346, -0.034497376531362534, -0.024147916585206985, -0.0463566780090332, 0.009350457228720188, -6.270690777508817e-33, 0.059797994792461395, 0.033959340304136276, -0.024136969819664955, 0.04257578030228615, -0.012279363349080086, -0.03140242025256157, 0.026998067274689674, 0.1396370530128479, -0.06667300313711166, -0.05912572517991066, -0.07490544021129608, -0.003952655475586653, 0.07352620363235474, -0.028066691011190414, 0.05413911119103432, -0.0037635574117302895, -0.06705978512763977, -0.07444249838590622, 0.06992002576589584, 0.02625231258571148, -0.0367351658642292, -0.024098144844174385, 0.02547972835600376, 0.0691247433423996, 0.06989146769046783, 0.0484822578728199, 0.09518981724977493, -0.03634641692042351, -0.0850687175989151, -0.06304901093244553, -0.040563978254795074, -0.026101434603333473, -0.06252103298902512, 0.03390933945775032, -0.11231505125761032, 0.02668549120426178, 0.06725554168224335, 0.057737451046705246, 0.032180484384298325, -0.00042738919728435576, 0.05255318805575371, 0.029830150306224823, -0.04012903943657875, -0.04358876869082451, -0.057869236916303635, 0.03498440608382225, -0.11011621356010437, 0.051826465874910355, 0.024366294965147972, -0.02047262340784073, 0.007146654650568962, 0.02187543362379074, -0.04855087026953697, 0.02285439893603325, 0.05143904313445091, -0.10542281717061996, -0.07353425770998001, -0.018191494047641754, -0.02655140310525894, 0.014799386262893677, 0.017308706417679787, -0.08259229362010956, 0.03219268471002579, -0.013488078489899635, -0.010163910686969757, -0.10181181132793427, -0.0015744732227176428, -0.017885642126202583, -0.08312264829874039, -0.03940272331237793, -0.008687594905495644, -0.02468796633183956, 0.020387761294841766, 0.07546498626470566, 0.037321388721466064, -0.02080286480486393, -0.03902224451303482, -0.003928566817194223, 0.05013703554868698, -0.004459865391254425, 0.017223116010427475, -0.007651322986930609, 0.06381011009216309, 0.04208075627684593, 0.065994031727314, 0.05376241356134415, 0.019852792844176292, 0.1044389009475708, 0.008570720441639423, 0.020869269967079163, -0.029103722423315048, 0.11250187456607819, -0.02765217423439026, 0.10102078318595886, 0.08259408175945282, -5.4235528068602434e-8, -0.0349709615111351, -0.08208287507295609, -0.020610392093658447, 0.014383829198777676, -0.11415689438581467, 0.04929516464471817, 0.026621170341968536, -0.02375360205769539, 0.0177406445145607, 0.00010107135312864557, 0.05795931816101074, 0.014056522399187088, -0.06422557681798935, 0.0015885799657553434, -0.03546053171157837, 0.09836455434560776, -0.014918146654963493, -0.0495065376162529, 0.07116232067346573, -0.017243873327970505, 0.022990712895989418, 0.1238153800368309, 0.0070166075602173805, -0.01679364964365959, -0.020256076008081436, -0.04332287237048149, -0.03969480097293854, 0.0833064541220665, -0.004324287176132202, -0.09080691635608673, 0.04026249796152115, -0.0012175390729680657, 0.044675346463918686, -0.05614222213625908, -0.05117318779230118, -0.044669438153505325, -0.013018135912716389, -0.05905279517173767, -0.038641076534986496, -0.008164559490978718, 0.08010949194431305, 0.06896571069955826, -0.006705138366669416, -0.11884181946516037, 0.10271310806274414, 0.040706392377614975, 0.08560530096292496, -0.04884376749396324, -0.030845530331134796, 0.01163098681718111, 0.06345869600772858, -0.0818813219666481, 0.023952608928084373, 0.04672598838806152, -0.022699899971485138, -0.0660523921251297, 0.0028671687468886375, -0.007022501900792122, 0.05688260495662689, 0.023831434547901154, -0.03697312995791435, -0.009734918363392353, 0.10583475232124329, 0.0030338477808982134 ]
0.041888
Vision models accept images alongside text so the model can describe, classify, and answer questions about what it sees. ## Quick start ```shell ollama run gemma3 ./image.png whats in this image? ``` ## Usage with Ollama's API Provide an `images` array. SDKs accept file paths, URLs or raw bytes while the REST API expects base64-encoded image data. ```shell # 1. Download a sample image curl -L -o test.jpg "https://upload.wikimedia.org/wikipedia/commons/3/3a/Cat03.jpg" # 2. Encode the image IMG=$(base64 < test.jpg | tr -d '\n') # 3. Send it to Ollama curl -X POST http://localhost:11434/api/chat \ -H "Content-Type: application/json" \ -d '{ "model": "gemma3", "messages": [{ "role": "user", "content": "What is in this image?", "images": ["'"$IMG"'"] }], "stream": false }' ``` ```python from ollama import chat # from pathlib import Path # Pass in the path to the image path = input('Please enter the path to the image: ') # You can also pass in base64 encoded image data # img = base64.b64encode(Path(path).read\_bytes()).decode() # or the raw bytes # img = Path(path).read\_bytes() response = chat( model='gemma3', messages=[ { 'role': 'user', 'content': 'What is in this image? Be concise.', 'images': [path], } ], ) print(response.message.content) ``` ```javascript import ollama from 'ollama' const imagePath = '/absolute/path/to/image.jpg' const response = await ollama.chat({ model: 'gemma3', messages: [ { role: 'user', content: 'What is in this image?', images: [imagePath] } ], stream: false, }) console.log(response.message.content) ```
https://github.com/ollama/ollama/blob/main//docs/capabilities/vision.mdx
main
ollama
[ -0.009291601367294788, 0.04830854758620262, 0.018439846113324165, 0.06088364124298096, 0.03799691051244736, -0.1305568367242813, -0.035608939826488495, -0.01102954987436533, 0.075391486287117, -0.03980186954140663, 0.03214477002620697, -0.02161143533885479, -0.006961123552173376, 0.058688320219516754, 0.09175637364387512, 0.05116035416722298, -0.00540140038356185, -0.006719677709043026, -0.061266545206308365, -0.015049762092530727, 0.07067441195249557, -0.017954964190721512, 0.11350628733634949, -0.04187412187457085, -0.04527493193745613, 0.026476535946130753, 0.0015865023015066981, 0.003775733057409525, 0.01947609893977642, -0.10305237770080566, 0.03429795429110527, -0.04543325677514076, 0.017034711316227913, 0.0905565395951271, 0.031570494174957275, 0.09115263819694519, 0.06664498895406723, -0.10799258202314377, -0.03096671961247921, -0.004557558335363865, 0.05609918385744095, 0.027987845242023468, -0.029862383380532265, -0.0717395544052124, 0.06155872717499733, -0.05140410363674164, 0.0030784353148192167, -0.058672890067100525, -0.03501603752374649, -0.03954225033521652, -0.09431220591068268, -0.08590275794267654, -0.07703567296266556, 0.09102358669042587, -0.017418289557099342, 0.033009059727191925, -0.09202369302511215, -0.006052189040929079, 0.024026915431022644, 0.04688950628042221, 0.028528718277812004, -0.005153781734406948, -0.00968343485146761, 0.026834862306714058, 0.010394799523055553, -0.033764492720365524, -0.027029016986489296, -0.027484865859150887, 0.0032752519473433495, -0.09970002621412277, -0.004070830997079611, -0.011750230565667152, -0.006294593680649996, 0.007758773863315582, -0.013045424595475197, 0.008496907539665699, 0.11949480324983597, 0.009003783576190472, 0.02837575227022171, -0.06505442410707474, 0.013712477870285511, -0.029064832255244255, 0.050281111150979996, 0.0805831179022789, 0.08268924802541733, 0.0782151073217392, -0.08888143301010132, 0.05699567496776581, -0.009849620051681995, -0.06228455901145935, -0.03667626157402992, -0.07349645346403122, -0.03497634455561638, 0.0142197972163558, 0.08649908751249313, -0.009319420903921127, 0.00986586231738329, -0.04765332490205765, -0.07540263235569, 0.08135922253131866, 0.019141923636198044, -0.060940708965063095, 0.04004034027457237, 0.01723962277173996, 0.013882520608603954, 0.019422348588705063, 0.1069147139787674, 0.03972993046045303, -0.002902459120377898, 0.02247649058699608, 0.003307332517579198, -0.07677215337753296, -0.003951989579945803, -0.014466825872659683, -0.04265768826007843, -0.027127893641591072, -0.092730313539505, -0.019634027034044266, 0.0032220713328570127, -0.00043423904571682215, 0.047659289091825485, -0.05563684180378914, -0.017504610121250153, 0.00016727976617403328, 0.030346812680363655, -0.016795674338936806, 0.012146132066845894, 5.415772837938968e-33, 0.05515504628419876, 0.003729343879967928, 0.053751904517412186, 0.038413938134908676, 0.057767994701862335, 0.028741730377078056, -0.014503453858196735, -0.056685857474803925, -0.09608802944421768, -0.03324934467673302, -0.09075064957141876, 0.01090383343398571, -0.03405402600765228, 0.10425693541765213, 0.03630368411540985, 0.006132997572422028, -0.04585748910903931, 0.05148743838071823, 0.07578935474157333, 0.05171583965420723, 0.0014006872661411762, -0.00960152130573988, -0.0352126769721508, -0.0018217036267742515, -0.0428115539252758, 0.028521355241537094, 0.002665773266926408, -0.10786248743534088, 0.008135391399264336, 0.01753099448978901, 0.03266638144850731, 0.016028866171836853, 0.01864790916442871, 0.009092765860259533, 0.05242835357785225, -0.03512956574559212, -0.0015841107815504074, 0.012749139219522476, -0.09556736052036285, 0.02205590531229973, 0.039543721824884415, 0.004569725599139929, -0.01876612938940525, 0.01661858521401882, -0.08670338243246078, -0.00811667088419199, -0.061754122376441956, -0.005953142419457436, -0.039286330342292786, 0.009576975367963314, -0.019959326833486557, 0.030030256137251854, -0.022748980671167374, -0.04913835972547531, 0.022390328347682953, -0.05195573344826698, 0.019978728145360947, -0.06155434623360634, 0.020523404702544212, -0.014719780534505844, 0.014879119582474232, 0.029439778998494148, 0.010988963767886162, -0.0004020425258204341, 0.04064297676086426, -0.04646357148885727, -0.009559553116559982, -0.011774254031479359, -0.08308174461126328, 0.02552136406302452, -0.03640231490135193, 0.05041489377617836, -0.025238603353500366, -0.003519575810059905, -0.04028456658124924, -0.03769659996032715, -0.0188777893781662, 0.04183700308203697, 0.018595341593027115, 0.06758760660886765, 0.04869727045297623, -0.06944223493337631, 0.02108066901564598, -0.07118634134531021, -0.024135427549481392, 0.06714370846748352, 0.0466858372092247, -0.09077518433332443, 0.0016754118259996176, 0.008936327882111073, 0.035791508853435516, 0.04562511667609215, -0.05005132406949997, -0.0468548983335495, -0.012906770221889019, -4.749750595732522e-33, 0.060191117227077484, 0.07988086342811584, -0.03433607891201973, 0.017892776057124138, 0.010582547634840012, 0.01776265911757946, 0.11536848545074463, 0.07092267274856567, 0.033436693251132965, -0.028814056888222694, -0.00292213074862957, 0.027624156326055527, -0.04041793942451477, -0.028265077620744705, 0.028361346572637558, -0.09856060892343521, -0.051677167415618896, -0.08899769186973572, 0.007097562775015831, -0.0361865758895874, -0.058850593864917755, 0.05059463903307915, -0.04694818705320358, 0.1042138859629631, -0.0010874569416046143, 0.08454912900924683, 0.016234155744314194, 0.00752848107367754, -0.0674302726984024, -0.019351636990904808, -0.014465182088315487, -0.0005558732664212584, -0.031991008669137955, 0.03492796793580055, -0.0015674857422709465, 0.017770005390048027, 0.014291489496827126, 0.048236604779958725, -0.009299192577600479, 0.03535299003124237, 0.07159415632486343, -0.08036468923091888, -0.09607956558465958, 0.015380865894258022, -0.017365647479891777, -0.026579895988106728, 0.00022811032249592245, 0.026948463171720505, -0.029505064710974693, 0.04957593232393265, 0.054219190031290054, -0.04612760245800018, -0.053040679544210434, 0.02120107039809227, 0.05030358210206032, -0.016682209447026253, -0.059592850506305695, -0.023313166573643684, -0.00495646707713604, -0.014216845855116844, 0.05184689536690712, -0.06394924223423004, 0.002532410202547908, -0.02947116456925869, -0.021284092217683792, -0.07951290160417557, -0.05584828928112984, -0.04600304737687111, -0.021391844376921654, 0.010491703636944294, -0.03906610608100891, -0.05269830673933029, 0.024188661947846413, 0.04148302227258682, 0.12515820562839508, 0.0009663230739533901, -0.05556577071547508, 0.006315876264125109, 0.054734211415052414, -0.0036302045919001102, -0.09295704215765, -0.03799523040652275, 0.05390297621488571, 0.14113330841064453, 0.13307899236679077, 0.058883339166641235, 0.01286544743925333, 0.007009128108620644, 0.025583915412425995, -0.02165323495864868, -0.01862345077097416, 0.04484940320253372, 0.010999554768204689, 0.11341611295938492, 0.06931685656309128, -5.1555897329080835e-8, -0.042543377727270126, -0.08146877586841583, -0.0665203109383583, 0.009706474840641022, -0.0942813903093338, 0.012468908913433552, 0.0006619891501031816, -0.035322800278663635, 0.03592981398105621, -0.03232412785291672, 0.04872419685125351, 0.03541843220591545, -0.0672454684972763, -0.04651927202939987, -0.04369634389877319, 0.0653637945652008, 0.0010322489542886615, 0.0221412293612957, 0.020527126267552376, -0.053802844136953354, 0.012687531299889088, -0.012113836593925953, -0.024233723059296608, -0.010374282486736774, -0.0017706878716126084, -0.0073733520694077015, -0.0724271908402443, 0.08047730475664139, -0.0777977854013443, -0.07469477504491806, 0.05454251170158386, -0.03811677172780037, 0.06544498354196548, -0.01916860230267048, 0.010668544098734856, -0.02286844328045845, 0.011481734924018383, -0.041643787175416946, -0.03131510689854622, -0.03895194083452225, 0.12081246823072433, 0.02279803156852722, 0.0016000551404431462, -0.059756990522146225, 0.06541214138269424, 0.05702516809105873, 0.11387033760547638, -0.08248457312583923, -0.061364516615867615, 0.009023947641253471, 0.0025795341935008764, -0.06248285621404648, 0.00010755778930615634, 0.11935729533433914, -0.03420918434858322, -0.16222035884857178, 0.08928684145212173, -0.0140606090426445, -0.00994298979640007, 0.11264421045780182, 0.10977979004383087, 0.015886984765529633, 0.053615547716617584, -0.007385441102087498 ]
0.116425
Ollama supports tool calling (also known as function calling) which allows a model to invoke tools and incorporate their results into its replies. ## Calling a single tool Invoke a single tool and include its response in a follow-up request. Also known as "single-shot" tool calling. ```shell curl -s http://localhost:11434/api/chat -H "Content-Type: application/json" -d '{ "model": "qwen3", "messages": [{"role": "user", "content": "What is the temperature in New York?"}], "stream": false, "tools": [ { "type": "function", "function": { "name": "get\_temperature", "description": "Get the current temperature for a city", "parameters": { "type": "object", "required": ["city"], "properties": { "city": {"type": "string", "description": "The name of the city"} } } } } ] }' ``` \*\*Generate a response with a single tool result\*\* ```shell curl -s http://localhost:11434/api/chat -H "Content-Type: application/json" -d '{ "model": "qwen3", "messages": [ {"role": "user", "content": "What is the temperature in New York?"}, { "role": "assistant", "tool\_calls": [ { "type": "function", "function": { "index": 0, "name": "get\_temperature", "arguments": {"city": "New York"} } } ] }, {"role": "tool", "tool\_name": "get\_temperature", "content": "22Β°C"} ], "stream": false }' ``` Install the Ollama Python SDK: ```bash # with pip pip install ollama -U # with uv uv add ollama ``` ```python from ollama import chat def get\_temperature(city: str) -> str: """Get the current temperature for a city Args: city: The name of the city Returns: The current temperature for the city """ temperatures = { "New York": "22Β°C", "London": "15Β°C", "Tokyo": "18Β°C", } return temperatures.get(city, "Unknown") messages = [{"role": "user", "content": "What is the temperature in New York?"}] # pass functions directly as tools in the tools list or as a JSON schema response = chat(model="qwen3", messages=messages, tools=[get\_temperature], think=True) messages.append(response.message) if response.message.tool\_calls: # only recommended for models which only return a single tool call call = response.message.tool\_calls[0] result = get\_temperature(\*\*call.function.arguments) # add the tool result to the messages messages.append({"role": "tool", "tool\_name": call.function.name, "content": str(result)}) final\_response = chat(model="qwen3", messages=messages, tools=[get\_temperature], think=True) print(final\_response.message.content) ``` Install the Ollama JavaScript library: ```bash # with npm npm i ollama # with bun bun i ollama ``` ```typescript import ollama from 'ollama' function getTemperature(city: string): string { const temperatures: Record = { 'New York': '22Β°C', 'London': '15Β°C', 'Tokyo': '18Β°C', } return temperatures[city] ?? 'Unknown' } const tools = [ { type: 'function', function: { name: 'get\_temperature', description: 'Get the current temperature for a city', parameters: { type: 'object', required: ['city'], properties: { city: { type: 'string', description: 'The name of the city' }, }, }, }, }, ] const messages = [{ role: 'user', content: "What is the temperature in New York?" }] const response = await ollama.chat({ model: 'qwen3', messages, tools, think: true, }) messages.push(response.message) if (response.message.tool\_calls?.length) { // only recommended for models which only return a single tool call const call = response.message.tool\_calls[0] const args = call.function.arguments as { city: string } const result = getTemperature(args.city) // add the tool result to the messages messages.push({ role: 'tool', tool\_name: call.function.name, content: result }) // generate the final response const finalResponse = await ollama.chat({ model: 'qwen3', messages, tools, think: true }) console.log(finalResponse.message.content) } ``` ## Parallel tool calling Request multiple tool calls in parallel, then send all tool responses back to the model. ```shell curl -s http://localhost:11434/api/chat -H "Content-Type: application/json" -d '{ "model": "qwen3", "messages": [{"role": "user", "content": "What are the current weather conditions and temperature in New York and London?"}], "stream": false, "tools": [ { "type": "function", "function": { "name": "get\_temperature", "description": "Get the current temperature for a city", "parameters": { "type": "object", "required": ["city"], "properties": { "city": {"type": "string", "description": "The name of the city"} } } } }, { "type": "function", "function": { "name": "get\_conditions", "description": "Get the
https://github.com/ollama/ollama/blob/main//docs/capabilities/tool-calling.mdx
main
ollama
[ -0.06712688505649567, 0.06637024879455566, -0.03370159864425659, 0.09558677673339844, -0.060826871544122696, -0.12835513055324554, -0.03697986528277397, -0.010882753878831863, 0.04811714589595795, -0.01849771849811077, -0.023539278656244278, -0.06637947261333466, -0.055387288331985474, 0.00987360067665577, 0.1458408236503601, 0.06553782522678375, 0.003426966955885291, -0.06495335698127747, -0.027354540303349495, -0.08061635494232178, 0.07003892958164215, 0.08465900272130966, 0.005669379141181707, 0.012435651384294033, -0.018031513318419456, -0.057272788137197495, -0.018817558884620667, 0.041793014854192734, -0.046693552285432816, 0.03054797276854515, 0.06089458242058754, -0.013846799731254578, -0.031883083283901215, 0.042638957500457764, 0.02756933495402336, 0.06471800059080124, 0.047295477241277695, -0.0676446408033371, -0.016756253316998482, 0.025158224627375603, 0.0500459261238575, -0.008290576748549938, -0.07255186140537262, -0.1358896940946579, 0.03207947313785553, -0.10033106058835983, -0.07769420742988586, 0.017814351245760918, -0.01628737710416317, 0.034346804022789, -0.03734278306365013, -0.08513330668210983, -0.025032317265868187, 0.054116588085889816, 0.004743712954223156, 0.03243045508861542, -0.07330307364463806, -0.00036903610453009605, -0.026192402467131615, -0.025542058050632477, 0.01114565134048462, -0.009696092456579208, -0.0788383036851883, 0.03536023199558258, 0.0028009871020913124, -0.060904696583747864, -0.06748433411121368, 0.05769753456115723, 0.0075415815226733685, -0.048343122005462646, 0.04363103583455086, -0.03363656997680664, -0.05115009844303131, -0.0314507819712162, 0.0590810663998127, -0.02396582067012787, 0.020165007561445236, -0.012791778892278671, -0.02239975705742836, 0.01369046326726675, -0.007558937184512615, -0.0414632111787796, -0.016521621495485306, 0.068290114402771, 0.03306819126009941, 0.08476752787828445, 0.021904388442635536, 0.05956656485795975, 0.08571150153875351, -0.003915692679584026, -0.05062460899353027, -0.03912036120891571, -0.03989981859922409, -0.03846534714102745, 0.00286285812035203, 0.02909611538052559, 0.0339212492108345, -0.08363509178161621, -0.026696568354964256, 0.07758169621229172, -0.02079148404300213, -0.08524299412965775, 0.03033970668911934, -0.03717714175581932, 0.024572614580392838, 0.005792779847979546, 0.009063249453902245, 0.007161259651184082, -0.02387302555143833, 0.06641733646392822, -0.07341791689395905, -0.05094726383686066, 0.06151750311255455, -0.03516064211726189, 0.016337120905518532, -0.005372914951294661, 0.0298620518296957, -0.025758912786841393, 0.03442098945379257, 0.009208635427057743, 0.1039009541273117, -0.022678084671497345, -0.016176261007785797, 0.04621824994683266, 0.08404207974672318, 0.0787055715918541, 0.053068917244672775, 2.1712837170656716e-33, 0.13803280889987946, -0.0035341510083526373, 0.03204939141869545, 0.07636390626430511, 0.026484820991754532, 0.031213484704494476, 0.06574170291423798, -0.033762991428375244, -0.040558185428380966, -0.047480374574661255, -0.056947771459817886, 0.10552172362804413, 0.014246252365410328, 0.008149653673171997, -0.025972573086619377, 0.038856279104948044, 0.0071452343836426735, 0.06567464023828506, 0.10372798889875412, 0.06481723487377167, -0.014701119624078274, -0.011538330465555191, -0.011380360461771488, 0.06691312044858932, 0.044797271490097046, 0.021470054984092712, 0.04149860143661499, 0.010854263789951801, -0.09570739418268204, -0.0006090195383876562, 0.0852934941649437, 0.006705930456519127, -0.03688874840736389, -0.021500661969184875, 0.032029613852500916, 0.006267227232456207, -0.0290695670992136, -0.03003021515905857, -0.060726333409547806, 0.0001506471453467384, -0.012328196316957474, -0.009461640380322933, -0.0685400441288948, -0.015729140490293503, -0.06550678610801697, -0.02598685584962368, -0.10049421340227127, -0.03742258995771408, 0.04795541614294052, 0.001996660837903619, -0.005907842423766851, 0.035202402621507645, 0.0176912359893322, 0.026868579909205437, 0.03984680771827698, -0.02793768048286438, 0.03030334785580635, -0.020205384120345116, 0.060280632227659225, -0.026989305391907692, -0.051365241408348083, 0.0240468829870224, -0.0050238328985869884, -0.08141280710697174, 0.07717645168304443, -0.032357506453990936, 0.04262926056981087, 0.10009118914604187, -0.010457594878971577, 0.04463493078947067, -0.010071959346532822, 0.029800161719322205, -0.030034415423870087, 0.014969703741371632, 0.022498181089758873, -0.04020510986447334, 0.013272509910166264, -0.007558629848062992, 0.06227773800492287, 0.022383106872439384, 0.07279316335916519, -0.05818955972790718, 0.018881428986787796, 0.0011712121777236462, 0.05418546870350838, -0.009150167927145958, 0.03767382353544235, -0.04354294389486313, -0.04530166834592819, 0.02010619454085827, -0.055235281586647034, 0.018078578636050224, -0.06729491055011749, -0.010521029122173786, -0.04788239672780037, -2.227309063522808e-33, -0.0014074969803914428, -0.0692424476146698, -0.007525734603404999, 0.04766387864947319, 0.012871903367340565, -0.0307974461466074, 0.038245659321546555, -0.016451520845294, 0.061063252389431, 0.03890077397227287, -0.046286094933748245, -0.04919947311282158, 0.05743381753563881, -0.011636302806437016, 0.09917154908180237, 0.009458092972636223, -0.1181105449795723, -0.1302575021982193, 0.014138675294816494, 0.017133519053459167, -0.10679811239242554, -0.013807736337184906, -0.018504329025745392, 0.014932848513126373, -0.0643768459558487, -0.07656033337116241, -0.011772282421588898, -0.05632343143224716, -0.06697676330804825, -0.06138370558619499, -0.03741290047764778, 0.006588989403098822, -0.05219876021146774, 0.03559669852256775, -0.019466128200292587, 0.0560702383518219, 0.10797759145498276, 0.06791737675666809, 0.015538699924945831, 0.0312691330909729, 0.04523251950740814, -0.044739656150341034, -0.07457667589187622, -0.039757221937179565, -0.04231270030140877, 0.03689994663000107, -0.026978759095072746, 0.021411877125501633, -0.11126171052455902, 0.019883183762431145, 0.06420546770095825, 0.017353840172290802, -0.08173346519470215, 0.060397595167160034, -0.015187802724540234, -0.07940500229597092, 0.021089131012558937, -0.0649973675608635, -0.07101213932037354, -0.02385852113366127, -0.006540682166814804, -0.1091291755437851, 0.02335890755057335, 0.047864269465208054, 0.009570314548909664, -0.07610417902469635, 0.046933863312006, -0.07840455323457718, 0.0007889270782470703, -0.021013017743825912, 0.012411436066031456, -0.044098954647779465, 0.0562129020690918, -0.016368631273508072, 0.10584326833486557, -0.053225044161081314, -0.0582648441195488, -0.03737245872616768, 0.0387488454580307, 0.07223613560199738, -0.026537533849477768, 0.02161368355154991, 0.08379251509904861, 0.06519376486539841, 0.07786054164171219, -0.008798664435744286, 0.027900561690330505, 0.07819431275129318, -0.00003774029028136283, 0.04283705726265907, 0.019373271614313126, 0.0026705788914114237, -0.026009811088442802, 0.08867096900939941, 0.027988936752080917, -5.480844578187316e-8, -0.058620523661375046, -0.004627136047929525, -0.03673487529158592, 0.08784308284521103, -0.05712498724460602, 0.0426996685564518, 0.043276235461235046, -0.0026106550358235836, 0.053518183529376984, 0.019512485712766647, 0.04422994703054428, 0.09748906642198563, 0.010362501256167889, 0.01201142743229866, -0.01096681784838438, -0.020069092512130737, -0.016741255298256874, 0.020299434661865234, -0.008100300095975399, -0.06044711545109749, 0.08571974188089371, 0.06622736901044846, -0.0007173061603680253, -0.003329454455524683, 0.0785958468914032, -0.04351724311709404, -0.10215278714895248, 0.05792945623397827, -0.06212691590189934, -0.05932670086622238, -0.058187007904052734, -0.06806100904941559, 0.048238273710012436, -0.03499221056699753, 0.03932686150074005, -0.045069288462400436, 0.013107161968946457, 0.041115909814834595, -0.03164094313979149, 0.01818087510764599, 0.09708181023597717, 0.08085579425096512, -0.09424193948507309, -0.02618502452969551, 0.054201576858758926, 0.01181084755808115, 0.0030477154068648815, -0.06369224935770035, 0.004696814808994532, -0.004272958263754845, -0.019432494416832924, -0.06209944188594818, 0.04659174382686615, 0.07023344933986664, -0.09903823584318161, -0.07122216373682022, -0.008263238705694675, -0.06459850072860718, 0.01806572824716568, 0.04249299317598343, 0.04121983423829079, 0.006801813840866089, 0.03530894219875336, 0.05103957653045654 ]
0.113585
"stream": false, "tools": [ { "type": "function", "function": { "name": "get\_temperature", "description": "Get the current temperature for a city", "parameters": { "type": "object", "required": ["city"], "properties": { "city": {"type": "string", "description": "The name of the city"} } } } }, { "type": "function", "function": { "name": "get\_conditions", "description": "Get the current weather conditions for a city", "parameters": { "type": "object", "required": ["city"], "properties": { "city": {"type": "string", "description": "The name of the city"} } } } } ] }' ``` \*\*Generate a response with multiple tool results\*\* ```shell curl -s http://localhost:11434/api/chat -H "Content-Type: application/json" -d '{ "model": "qwen3", "messages": [ {"role": "user", "content": "What are the current weather conditions and temperature in New York and London?"}, { "role": "assistant", "tool\_calls": [ { "type": "function", "function": { "index": 0, "name": "get\_temperature", "arguments": {"city": "New York"} } }, { "type": "function", "function": { "index": 1, "name": "get\_conditions", "arguments": {"city": "New York"} } }, { "type": "function", "function": { "index": 2, "name": "get\_temperature", "arguments": {"city": "London"} } }, { "type": "function", "function": { "index": 3, "name": "get\_conditions", "arguments": {"city": "London"} } } ] }, {"role": "tool", "tool\_name": "get\_temperature", "content": "22Β°C"}, {"role": "tool", "tool\_name": "get\_conditions", "content": "Partly cloudy"}, {"role": "tool", "tool\_name": "get\_temperature", "content": "15Β°C"}, {"role": "tool", "tool\_name": "get\_conditions", "content": "Rainy"} ], "stream": false }' ``` ```python from ollama import chat def get\_temperature(city: str) -> str: """Get the current temperature for a city Args: city: The name of the city Returns: The current temperature for the city """ temperatures = { "New York": "22Β°C", "London": "15Β°C", "Tokyo": "18Β°C" } return temperatures.get(city, "Unknown") def get\_conditions(city: str) -> str: """Get the current weather conditions for a city Args: city: The name of the city Returns: The current weather conditions for the city """ conditions = { "New York": "Partly cloudy", "London": "Rainy", "Tokyo": "Sunny" } return conditions.get(city, "Unknown") messages = [{'role': 'user', 'content': 'What are the current weather conditions and temperature in New York and London?'}] # The python client automatically parses functions as a tool schema so we can pass them directly # Schemas can be passed directly in the tools list as well response = chat(model='qwen3', messages=messages, tools=[get\_temperature, get\_conditions], think=True) # add the assistant message to the messages messages.append(response.message) if response.message.tool\_calls: # process each tool call for call in response.message.tool\_calls: # execute the appropriate tool if call.function.name == 'get\_temperature': result = get\_temperature(\*\*call.function.arguments) elif call.function.name == 'get\_conditions': result = get\_conditions(\*\*call.function.arguments) else: result = 'Unknown tool' # add the tool result to the messages messages.append({'role': 'tool', 'tool\_name': call.function.name, 'content': str(result)}) # generate the final response final\_response = chat(model='qwen3', messages=messages, tools=[get\_temperature, get\_conditions], think=True) print(final\_response.message.content) ``` ```typescript import ollama from 'ollama' function getTemperature(city: string): string { const temperatures: { [key: string]: string } = { "New York": "22Β°C", "London": "15Β°C", "Tokyo": "18Β°C" } return temperatures[city] || "Unknown" } function getConditions(city: string): string { const conditions: { [key: string]: string } = { "New York": "Partly cloudy", "London": "Rainy", "Tokyo": "Sunny" } return conditions[city] || "Unknown" } const tools = [ { type: 'function', function: { name: 'get\_temperature', description: 'Get the current temperature for a city', parameters: { type: 'object', required: ['city'], properties: { city: { type: 'string', description: 'The name of the city' }, }, }, }, }, { type: 'function', function: { name: 'get\_conditions', description: 'Get the current weather conditions for a city', parameters: { type: 'object', required: ['city'], properties: { city: { type: 'string', description: 'The name of the city' }, }, }, }, } ] const messages = [{ role: 'user', content: 'What are the current weather conditions and temperature in New York and London?' }] const response = await ollama.chat({ model: 'qwen3', messages, tools, think:
https://github.com/ollama/ollama/blob/main//docs/capabilities/tool-calling.mdx
main
ollama
[ -0.03177408128976822, 0.10090915113687515, 0.005042571574449539, 0.06075725331902504, -0.0412621796131134, -0.06675764918327332, -0.0067392135970294476, -0.024514010176062584, -0.01168968714773655, 0.017954936251044273, -0.03407605364918709, -0.15120677649974823, 0.029727458953857422, -0.001149514107964933, 0.1185414269566536, 0.06711708009243011, -0.0520000122487545, -0.0609506331384182, -0.0667560026049614, -0.08525173366069794, 0.06077888607978821, 0.03883524611592293, -0.0166033785790205, -0.05046384409070015, -0.048491351306438446, 0.024418212473392487, -0.004468643572181463, -0.0037112273275852203, -0.05386297404766083, 0.05805445462465286, 0.023741263896226883, -0.029830409213900566, -0.07779765129089355, 0.061118025332689285, 0.07048709690570831, 0.06222670152783394, 0.009219584055244923, -0.018108483403921127, 0.008059966377913952, 0.04609053581953049, 0.05195843428373337, -0.015639925375580788, -0.04281686618924141, -0.13621611893177032, 0.030219193547964096, -0.0411301851272583, -0.04896869882941246, 0.001685638795606792, 0.0033757081255316734, -0.013814586214721203, -0.02923888899385929, -0.03499549254775047, -0.05238206312060356, 0.0022220213431864977, 0.027633696794509888, -0.0215192548930645, -0.0815010815858841, 0.040952425450086594, -0.03583019971847534, -0.14237874746322632, 0.03576871007680893, -0.08736764639616013, -0.04039601981639862, -0.001055391039699316, 0.0032932835165411234, -0.05811700224876404, -0.08233162015676498, 0.0614045187830925, 0.0376313142478466, -0.012919527478516102, -0.0033081902656704187, 0.005019731353968382, -0.09171099960803986, -0.050639327615499496, 0.06738121062517166, 0.01831715553998947, 0.010703475214540958, -0.017108647152781487, -0.02998136170208454, -0.03756630793213844, -0.050644584000110626, -0.052792273461818695, -0.0467897392809391, 0.05403408780694008, -0.03126388415694237, 0.06760392338037491, 0.024415140971541405, -0.0032346767839044333, 0.02654380351305008, -0.0022294041700661182, -0.08256550133228302, -0.045560531318187714, -0.0019999679643660784, -0.009998202323913574, 0.02555418573319912, 0.059192731976509094, -0.0036385098937898874, -0.06911838054656982, 0.00819595716893673, 0.04695319011807442, 0.006460284814238548, -0.07685409486293793, 0.10473757237195969, -0.04377838596701622, 0.06342078000307083, -0.01828717067837715, -0.06581701338291168, 0.01705237850546837, -0.038703128695487976, 0.02110876329243183, -0.054620712995529175, 0.07139653712511063, -0.020114777609705925, -0.0031505071092396975, -0.009514372795820236, 0.055701903998851776, 0.021252909675240517, -0.043890513479709625, 0.030694374814629555, 0.05800091475248337, 0.12783975899219513, -0.0010780233424156904, -0.025912726297974586, 0.024737263098359108, 0.06242465227842331, -0.04030364379286766, 0.0744810476899147, 2.4487016695566777e-33, 0.05571611225605011, -0.0829293429851532, 0.007237642537802458, 0.019502446055412292, 0.04812305048108101, 0.036458440124988556, 0.06879904866218567, 0.00643111253157258, -0.01136908307671547, -0.013917768374085426, -0.06978444010019302, 0.041378527879714966, -0.02438070997595787, -0.004566114395856857, -0.03452127054333687, -0.0044902958907186985, 0.038202736526727676, 0.064761683344841, 0.05206657201051712, 0.05695631727576256, -0.006575229577720165, -0.010371132753789425, -0.009388387203216553, 0.0035217662807554007, -0.006044233683496714, -0.06220037490129471, 0.05057874694466591, -0.010350126773118973, -0.09058030694723129, -0.03969826176762581, 0.03395235911011696, -0.0038161426782608032, 0.03898776322603226, 0.008981388062238693, 0.007848545908927917, 0.038624975830316544, 0.0365065336227417, -0.018400942906737328, -0.02212304063141346, 0.002481618197634816, -0.06562083214521408, -0.031173251569271088, -0.03704281151294708, -0.0048605287447571754, 0.022809559479355812, -0.04837580770254135, -0.07265417277812958, -0.051225896924734116, -0.017717203125357628, 0.005207208450883627, -0.006723351776599884, 0.05117626115679741, 0.0396016463637352, 0.013436906039714813, 0.038398079574108124, -0.04395628347992897, -0.013064679689705372, 0.03314700350165367, -0.00998162291944027, -0.04355969652533531, -0.06262525171041489, 0.030996674671769142, -0.0017606728943064809, -0.037777405232191086, 0.169295534491539, 0.010251897387206554, 0.08621909469366074, 0.15643210709095, 0.01638062670826912, 0.021964242681860924, 0.011302005499601364, 0.028059929609298706, 0.013120654970407486, -0.021144835278391838, 0.05849066004157066, -0.046648696064949036, 0.0647592693567276, -0.01051714550703764, 0.017088454216718674, 0.020452231168746948, 0.02006503753364086, 0.0026749076787382364, -0.025814080610871315, 0.04975790157914162, -0.001011701999232173, 0.08525247126817703, 0.010381299071013927, -0.05958722159266472, -0.0413191094994545, -0.04764861613512039, -0.08169858902692795, 0.021172916516661644, -0.07349226623773575, -0.10563315451145172, -0.016511455178260803, -3.1484863135706475e-33, 0.0508209764957428, -0.08025474101305008, 0.018573956564068794, 0.030815312638878822, 0.04877728596329689, -0.027883602306246758, 0.036127425730228424, -0.06473837047815323, 0.06097489967942238, 0.06263051927089691, -0.02110816352069378, -0.0884564220905304, 0.011807015165686607, -0.06585406512022018, 0.03407714143395424, 0.05278920754790306, -0.0732293650507927, -0.08966397494077682, 0.05645030364394188, 0.012682379223406315, -0.08924929797649384, 0.032291196286678314, -0.00957422237843275, 0.049968525767326355, -0.09191589802503586, -0.10342247039079666, -0.046741876751184464, -0.04051815718412399, -0.0612809844315052, 0.012635736726224422, -0.003288786858320236, 0.003891956526786089, -0.04154117777943611, 0.09104567021131516, -0.005951824132353067, -0.013947932049632072, 0.09639757126569748, 0.10746217519044876, -0.003046962432563305, 0.09325709193944931, -0.014705794863402843, 0.0160734374076128, -0.03946634754538536, -0.04744464531540871, 0.04390804469585419, 0.031626831740140915, 0.03466910496354103, -0.0014632678357884288, -0.09887268394231796, 0.02086227759718895, 0.05737673118710518, -0.004823744762688875, -0.1281442791223526, 0.06893879920244217, -0.03270941972732544, -0.10975780338048935, -0.0017802465008571744, -0.08501241356134415, -0.04582136124372482, -0.037977270781993866, -0.04010327160358429, -0.018026776611804962, 0.016708821058273315, 0.07141613960266113, 0.04350244253873825, -0.05538036674261093, 0.0016330135986208916, -0.09054617583751678, -0.0093464944511652, -0.05409840866923332, 0.0006730870227329433, -0.06172565370798111, 0.025247450917959213, -0.008667274378240108, 0.08356312662363052, -0.022424036636948586, 0.00850621610879898, 0.007364447694271803, 0.04266776517033577, 0.10739398747682571, -0.0348815955221653, 0.0463247075676918, 0.012308645993471146, 0.1261025220155716, 0.01732105016708374, -0.002324997680261731, 0.012810435146093369, 0.06233268603682518, 0.002381819998845458, 0.070116326212883, 0.027621496468782425, 0.007586562540382147, -0.03493071720004082, 0.01878863386809826, -0.009475343860685825, -4.8580979239432054e-8, -0.04881996661424637, 0.03853617236018181, -0.08269529044628143, 0.0683836042881012, -0.025382494553923607, 0.06748726963996887, 0.05103163793683052, 0.015354238450527191, 0.0005867103463970125, -0.032545946538448334, 0.03596792370080948, 0.05065597966313362, -0.024209002032876015, 0.010079695843160152, -0.006291999015957117, -0.07056863605976105, -0.05189299210906029, 0.010108997114002705, 0.005900136660784483, -0.0005827369168400764, 0.12525780498981476, 0.011667952872812748, -0.00046167222899384797, -0.013410468585789204, 0.11356760561466217, 0.03626185655593872, 0.013237589970231056, -0.0050670974887907505, -0.04466455429792404, 0.04929887875914574, -0.062081195414066315, -0.05829133465886116, 0.021646514534950256, -0.01630096323788166, 0.05291741341352463, -0.09356329590082169, 0.020904866978526115, 0.0913938507437706, -0.04282829165458679, 0.04383675009012222, 0.054041218012571335, 0.09066997468471527, -0.07401729375123978, 0.026760026812553406, 0.05752001702785492, -0.06424565613269806, 0.0010395904537290335, 0.01081020850688219, 0.0649743303656578, -0.007328276988118887, -0.051019541919231415, -0.018318746238946915, 0.051190294325351715, 0.030642300844192505, -0.05782904848456383, -0.03124070167541504, 0.024878600612282753, -0.05513398349285126, 0.023502571508288383, -0.0150567926466465, 0.05098468065261841, 0.022943435236811638, 0.0013130578445270658, 0.04951690509915352 ]
0.017405
['city'], properties: { city: { type: 'string', description: 'The name of the city' }, }, }, }, } ] const messages = [{ role: 'user', content: 'What are the current weather conditions and temperature in New York and London?' }] const response = await ollama.chat({ model: 'qwen3', messages, tools, think: true }) // add the assistant message to the messages messages.push(response.message) if (response.message.tool\_calls) { // process each tool call for (const call of response.message.tool\_calls) { // execute the appropriate tool let result: string if (call.function.name === 'get\_temperature') { const args = call.function.arguments as { city: string } result = getTemperature(args.city) } else if (call.function.name === 'get\_conditions') { const args = call.function.arguments as { city: string } result = getConditions(args.city) } else { result = 'Unknown tool' } // add the tool result to the messages messages.push({ role: 'tool', tool\_name: call.function.name, content: result }) } // generate the final response const finalResponse = await ollama.chat({ model: 'qwen3', messages, tools, think: true }) console.log(finalResponse.message.content) } ``` ## Multi-turn tool calling (Agent loop) An agent loop allows the model to decide when to invoke tools and incorporate their results into its replies. It also might help to tell the model that it is in a loop and can make multiple tool calls. ```python from ollama import chat, ChatResponse def add(a: int, b: int) -> int: """Add two numbers""" """ Args: a: The first number b: The second number Returns: The sum of the two numbers """ return a + b def multiply(a: int, b: int) -> int: """Multiply two numbers""" """ Args: a: The first number b: The second number Returns: The product of the two numbers """ return a \* b available\_functions = { 'add': add, 'multiply': multiply, } messages = [{'role': 'user', 'content': 'What is (11434+12341)\*412?'}] while True: response: ChatResponse = chat( model='qwen3', messages=messages, tools=[add, multiply], think=True, ) messages.append(response.message) print("Thinking: ", response.message.thinking) print("Content: ", response.message.content) if response.message.tool\_calls: for tc in response.message.tool\_calls: if tc.function.name in available\_functions: print(f"Calling {tc.function.name} with arguments {tc.function.arguments}") result = available\_functions[tc.function.name](\*\*tc.function.arguments) print(f"Result: {result}") # add the tool result to the messages messages.append({'role': 'tool', 'tool\_name': tc.function.name, 'content': str(result)}) else: # end the loop when there are no more tool calls break # continue the loop with the updated messages ``` ```typescript import ollama from 'ollama' type ToolName = 'add' | 'multiply' function add(a: number, b: number): number { return a + b } function multiply(a: number, b: number): number { return a \* b } const availableFunctions: Record number> = { add, multiply, } const tools = [ { type: 'function', function: { name: 'add', description: 'Add two numbers', parameters: { type: 'object', required: ['a', 'b'], properties: { a: { type: 'integer', description: 'The first number' }, b: { type: 'integer', description: 'The second number' }, }, }, }, }, { type: 'function', function: { name: 'multiply', description: 'Multiply two numbers', parameters: { type: 'object', required: ['a', 'b'], properties: { a: { type: 'integer', description: 'The first number' }, b: { type: 'integer', description: 'The second number' }, }, }, }, }, ] async function agentLoop() { const messages = [{ role: 'user', content: 'What is (11434+12341)\*412?' }] while (true) { const response = await ollama.chat({ model: 'qwen3', messages, tools, think: true, }) messages.push(response.message) console.log('Thinking:', response.message.thinking) console.log('Content:', response.message.content) const toolCalls = response.message.tool\_calls ?? [] if (toolCalls.length) { for (const call of toolCalls) { const fn = availableFunctions[call.function.name as ToolName] if (!fn) { continue } const args = call.function.arguments as { a: number; b: number } console.log(`Calling ${call.function.name} with arguments`, args) const result = fn(args.a, args.b) console.log(`Result: ${result}`) messages.push({ role: 'tool', tool\_name: call.function.name, content: String(result) }) } } else { break
https://github.com/ollama/ollama/blob/main//docs/capabilities/tool-calling.mdx
main
ollama
[ -0.010962681844830513, 0.05859490856528282, 0.02152552269399166, 0.10917231440544128, -0.05931689962744713, -0.088807612657547, 0.04118425399065018, -0.005799668841063976, -0.005146120209246874, -0.05005863308906555, -0.04508697986602783, -0.10115238279104233, -0.11398738622665405, 0.07241512089967728, 0.11601857841014862, 0.10069911926984787, 0.041050150990486145, -0.124480240046978, -0.009427977725863457, -0.03971412777900696, 0.1006387323141098, 0.0668259710073471, 0.07269483804702759, 0.014819726347923279, -0.0144453514367342, -0.05741196125745773, 0.008212831802666187, 0.0014751884154975414, -0.015335245989263058, 0.006296863779425621, 0.08521197736263275, 0.0021615647710859776, 0.0030761510133743286, 0.034719035029411316, 0.05760963261127472, 0.06909292191267014, 0.019547689706087112, -0.08909182250499725, -0.0012964633060619235, 0.033547546714544296, 0.0327419638633728, 0.037023529410362244, -0.08960570394992828, -0.10446984320878983, 0.09748844057321548, -0.09654994308948517, -0.0337848961353302, 0.06278183311223984, 0.05212237313389778, 0.00813167542219162, 0.026317639276385307, -0.044180791825056076, -0.03724043816328049, 0.02244417555630207, 0.058401599526405334, 0.07012111693620682, -0.014188142493367195, -0.03111105039715767, -0.0062645794823765755, -0.052400775253772736, -0.0000315255019813776, -0.02535161003470421, -0.023577986285090446, 0.00903018843382597, 0.019401665776968002, -0.0029579668771475554, -0.016366004943847656, 0.07239332050085068, -0.03667284920811653, 0.011736174114048481, 0.04077332466840744, 0.015566134825348854, 0.014133351854979992, -0.03393636643886566, 0.03280705213546753, -0.04177328944206238, -0.017019854858517647, -0.0052443332970142365, -0.019204502925276756, 0.01706126518547535, -0.012966427020728588, -0.07343024760484695, -0.006853316444903612, 0.05571566894650459, 0.045178309082984924, 0.0461663082242012, -0.036595508456230164, 0.002865903079509735, 0.03843676671385765, -0.047398682683706284, -0.03957870230078697, -0.06482463330030441, -0.03413306176662445, 0.045252423733472824, 0.029972154647111893, 0.04950487241148949, -0.008226873353123665, -0.06731563806533813, -0.03588004410266876, 0.05834095552563667, -0.0543186329305172, -0.08020999282598495, 0.020887907594442368, -0.04809648171067238, -0.007932083681225777, 0.020511342212557793, -0.0010439739562571049, -0.05514407902956009, -0.11649491637945175, 0.0527145080268383, -0.04854733124375343, -0.01381755992770195, 0.05786721408367157, 0.06260887533426285, 0.0427129827439785, -0.04690074548125267, 0.02717326395213604, 0.000540515233296901, 0.02666901797056198, -0.003911469131708145, 0.12723547220230103, -0.0006190754938870668, -0.01239051017910242, 0.07484746724367142, 0.060030657798051834, 0.08161260187625885, 0.06514739245176315, 2.928874214136289e-33, 0.13259103894233704, 0.016168054193258286, 0.0044136266224086285, 0.11923164129257202, 0.051207590848207474, 0.07984128594398499, 0.05065995082259178, -0.05480530112981796, -0.036874864250421524, -0.010911088436841965, -0.04145494103431702, 0.05223231762647629, 0.045378610491752625, -0.07777897268533707, -0.00574828963726759, 0.028649993240833282, -0.0028298236429691315, 0.053476911038160324, 0.06673078238964081, 0.045245666056871414, -0.01992735266685486, 0.01895907148718834, -0.0461735725402832, 0.06396012753248215, 0.04869596287608147, -0.04123762249946594, 0.012138170190155506, 0.01343545038253069, -0.053548663854599, -0.03919453173875809, 0.0606251023709774, 0.02967727743089199, -0.018737465143203735, 0.0571766123175621, 0.041595712304115295, 0.037425655871629715, 0.003988815937191248, -0.011952126398682594, -0.09781746566295624, -0.012467152439057827, 0.013620971702039242, -0.028355054557323456, -0.0331784188747406, -0.04457062855362892, -0.05368960276246071, -0.06798151135444641, -0.06219317391514778, -0.018521292135119438, 0.09963081032037735, 0.015360488556325436, -0.03779130429029465, 0.01667880080640316, -0.017292426899075508, -0.015715332701802254, 0.0643247589468956, -0.02002739906311035, 0.041009481996297836, 0.001860660733655095, 0.052016060799360275, -0.051589954644441605, -0.04863559082150459, -0.006437206175178289, -0.0018125366186723113, -0.04510838910937309, 0.03968096524477005, -0.03410717099905014, -0.011059949174523354, 0.027510158717632294, 0.004493383225053549, -0.007447245065122843, -0.015287479385733604, -0.016571680083870888, -0.0037557173054665327, 0.046820808202028275, -0.003917285241186619, -0.041760873049497604, -0.07206018269062042, 0.0014988693874329329, 0.007344283163547516, -0.00828457623720169, 0.010761040262877941, -0.05613093078136444, -0.03989195078611374, 0.08009909093379974, 0.10408962517976761, -0.017504828050732613, 0.005443088244646788, -0.040203534066677094, 0.02108345739543438, 0.09063183516263962, -0.12120715528726578, -0.021391790360212326, -0.05531058460474014, 0.03913218528032303, -0.04116949066519737, -2.5798850023985218e-33, 0.028100615367293358, -0.03153799846768379, -0.013278497382998466, -0.011120782233774662, -0.03343097120523453, -0.00717875175178051, 0.03544715791940689, -0.01015535369515419, 0.04693073779344559, 0.03466524928808212, -0.04189307987689972, -0.03693792223930359, 0.0924426019191742, -0.018857475370168686, 0.07710590213537216, 0.048915814608335495, -0.09503785520792007, -0.07905649393796921, 0.030216477811336517, -0.006220662500709295, -0.020066598430275917, -0.03242800012230873, -0.04980550333857536, -0.019583767279982567, -0.06601864099502563, -0.01491397526115179, 0.0028566799592226744, -0.07795805484056473, -0.0023312296252697706, -0.0886688157916069, -0.06392372399568558, -0.03571120277047157, -0.04892120137810707, 0.027948949486017227, -0.002926234621554613, 0.02984607219696045, 0.11434518545866013, -0.018956007435917854, -0.019972266629338264, 0.03737632557749748, 0.053688861429691315, -0.04129645973443985, -0.04445868730545044, -0.0686066672205925, -0.0333193875849247, 0.07334411889314651, -0.00555364741012454, -0.04619228467345238, -0.06693380326032639, 0.01377115584909916, 0.09947202354669571, -0.016573019325733185, -0.06354130804538727, 0.05213087052106857, -0.03007906675338745, -0.0947626382112503, 0.03859955817461014, -0.1352533996105194, 0.03264913707971573, -0.003521576290950179, 0.03191173076629639, -0.09729605168104172, 0.07099054008722305, 0.002820465946570039, 0.011811085045337677, -0.08119307458400726, 0.0004119753430131823, -0.03371763229370117, 0.08865435421466827, 0.013861902058124542, -0.0033896123059093952, -0.0830715000629425, 0.039784740656614304, 0.004465297795832157, 0.11077490448951721, -0.025948403403162956, -0.09082202613353729, -0.0727747455239296, 0.037659529596567154, 0.019595474004745483, 0.013289615511894226, -0.022395627573132515, 0.08229473978281021, 0.08466976881027222, -0.026021329686045647, 0.049473781138658524, 0.0950067937374115, 0.11875658482313156, -0.016463611274957657, 0.04265691339969635, 0.018875088542699814, -0.009472351521253586, 0.0046784100122749805, 0.04021646827459335, -0.015329134650528431, -5.104055844640243e-8, -0.10292382538318634, 0.005449187476187944, -0.011220638640224934, 0.014540567062795162, -0.03456507623195648, -0.009743076749145985, 0.047614362090826035, -0.027095258235931396, 0.04385634884238243, 0.014914553612470627, 0.005061429459601641, 0.09438995271921158, 0.03703739121556282, -0.04648301377892494, 0.018399568274617195, -0.044741176068782806, -0.04672281816601753, 0.005587915424257517, 0.0007873080903664231, -0.02814495377242565, 0.12361952662467957, 0.037703368812799454, -0.023858722299337387, 0.026435617357492447, 0.07432833313941956, -0.04164883866906166, -0.056754220277071, 0.047531597316265106, -0.019299399107694626, 0.021920738741755486, -0.04293791204690933, -0.037861596792936325, 0.02519511617720127, 0.014937341213226318, -0.0030602526385337114, -0.06839185208082199, 0.023623229935765266, 0.0025889126118272543, 0.056591637432575226, 0.0618223175406456, 0.05459543690085411, 0.0659991130232811, -0.08906571567058563, -0.0174467321485281, 0.03778143972158432, -0.03094489313662052, -0.015404287725687027, -0.06940361857414246, 0.018237534910440445, 0.004325591493397951, -0.07082679122686386, -0.05312484875321388, -0.008399604819715023, 0.06433840095996857, -0.09959299117326736, -0.09533420950174332, -0.0183076411485672, -0.02453187294304371, -0.005065467674285173, 0.014670205302536488, 0.02754240296781063, -0.020476430654525757, -0.056068383157253265, 0.02706381306052208 ]
0.062033
of toolCalls) { const fn = availableFunctions[call.function.name as ToolName] if (!fn) { continue } const args = call.function.arguments as { a: number; b: number } console.log(`Calling ${call.function.name} with arguments`, args) const result = fn(args.a, args.b) console.log(`Result: ${result}`) messages.push({ role: 'tool', tool\_name: call.function.name, content: String(result) }) } } else { break } } } agentLoop().catch(console.error) ``` ## Tool calling with streaming When streaming, gather every chunk of `thinking`, `content`, and `tool\_calls`, then return those fields together with any tool results in the follow-up request. ```python from ollama import chat def get\_temperature(city: str) -> str: """Get the current temperature for a city Args: city: The name of the city Returns: The current temperature for the city """ temperatures = { 'New York': '22Β°C', 'London': '15Β°C', } return temperatures.get(city, 'Unknown') messages = [{'role': 'user', 'content': "What is the temperature in New York?"}] while True: stream = chat( model='qwen3', messages=messages, tools=[get\_temperature], stream=True, think=True, ) thinking = '' content = '' tool\_calls = [] done\_thinking = False # accumulate the partial fields for chunk in stream: if chunk.message.thinking: thinking += chunk.message.thinking print(chunk.message.thinking, end='', flush=True) if chunk.message.content: if not done\_thinking: done\_thinking = True print('\n') content += chunk.message.content print(chunk.message.content, end='', flush=True) if chunk.message.tool\_calls: tool\_calls.extend(chunk.message.tool\_calls) print(chunk.message.tool\_calls) # append accumulated fields to the messages if thinking or content or tool\_calls: messages.append({'role': 'assistant', 'thinking': thinking, 'content': content, 'tool\_calls': tool\_calls}) if not tool\_calls: break for call in tool\_calls: if call.function.name == 'get\_temperature': result = get\_temperature(\*\*call.function.arguments) else: result = 'Unknown tool' messages.append({'role': 'tool', 'tool\_name': call.function.name, 'content': result}) ``` ```typescript import ollama from 'ollama' function getTemperature(city: string): string { const temperatures: Record = { 'New York': '22Β°C', 'London': '15Β°C', } return temperatures[city] ?? 'Unknown' } const getTemperatureTool = { type: 'function', function: { name: 'get\_temperature', description: 'Get the current temperature for a city', parameters: { type: 'object', required: ['city'], properties: { city: { type: 'string', description: 'The name of the city' }, }, }, }, } async function agentLoop() { const messages = [{ role: 'user', content: "What is the temperature in New York?" }] while (true) { const stream = await ollama.chat({ model: 'qwen3', messages, tools: [getTemperatureTool], stream: true, think: true, }) let thinking = '' let content = '' const toolCalls: any[] = [] let doneThinking = false for await (const chunk of stream) { if (chunk.message.thinking) { thinking += chunk.message.thinking process.stdout.write(chunk.message.thinking) } if (chunk.message.content) { if (!doneThinking) { doneThinking = true process.stdout.write('\n') } content += chunk.message.content process.stdout.write(chunk.message.content) } if (chunk.message.tool\_calls?.length) { toolCalls.push(...chunk.message.tool\_calls) console.log(chunk.message.tool\_calls) } } if (thinking || content || toolCalls.length) { messages.push({ role: 'assistant', thinking, content, tool\_calls: toolCalls } as any) } if (!toolCalls.length) { break } for (const call of toolCalls) { if (call.function.name === 'get\_temperature') { const args = call.function.arguments as { city: string } const result = getTemperature(args.city) messages.push({ role: 'tool', tool\_name: call.function.name, content: result } ) } else { messages.push({ role: 'tool', tool\_name: call.function.name, content: 'Unknown tool' } ) } } } } agentLoop().catch(console.error) ``` This loop streams the assistant response, accumulates partial fields, passes them back together, and appends the tool results so the model can complete its answer. ## Using functions as tools with Ollama Python SDK The Python SDK automatically parses functions as a tool schema so we can pass them directly. Schemas can still be passed if needed. ```python from ollama import chat def get\_temperature(city: str) -> str: """Get the current temperature for a city Args: city: The name of the city Returns: The current temperature for the city """ temperatures = { 'New York': '22Β°C', 'London': '15Β°C', } return temperatures.get(city, 'Unknown') available\_functions = { 'get\_temperature': get\_temperature, } # directly pass the function as part of the tools list response =
https://github.com/ollama/ollama/blob/main//docs/capabilities/tool-calling.mdx
main
ollama
[ -0.05039163678884506, 0.02140321023762226, -0.03468780964612961, 0.1009778305888176, -0.05828124284744263, -0.09448087960481644, 0.07023123651742935, 0.020793607458472252, 0.03465805575251579, -0.02714899182319641, -0.03764001652598381, -0.05112632364034653, -0.046378348022699356, 0.014145960099995136, 0.11020936816930771, 0.022795384749770164, 0.0183193888515234, -0.06673062592744827, -0.04919123277068138, -0.08348918706178665, 0.07790031284093857, 0.0943024754524231, -0.04684804007411003, -0.006751067470759153, -0.02968396432697773, -0.09158299118280411, -0.04728703573346138, 0.017847323790192604, -0.0076866066083312035, 0.01873665489256382, 0.06340198218822479, 0.0522567518055439, -0.0423082672059536, 0.03429344296455383, 0.052269335836172104, 0.10661644488573074, -0.06628838181495667, -0.0734558179974556, -0.02514183335006237, 0.06729116290807724, 0.06064001843333244, 0.01002944353967905, -0.035233668982982635, -0.09431459754705429, 0.027543818578124046, -0.03759666532278061, -0.04370174556970596, 0.030618777498602867, 0.03728869557380676, 0.0016790166264399886, -0.03775497525930405, 0.008001835085451603, -0.020090891048312187, 0.03200976550579071, 0.07161258161067963, 0.04674610495567322, 0.004881503991782665, -0.026344023644924164, 0.008118253201246262, -0.02365875244140625, -0.04945581778883934, 0.02686118893325329, -0.04744238033890724, -0.0223604217171669, -0.029192836955189705, -0.00895574688911438, -0.02770049124956131, 0.031924087554216385, 0.0049185603857040405, 0.06522950530052185, 0.006688972003757954, 0.018259748816490173, 0.015144992619752884, -0.00863976776599884, 0.04772238805890083, -0.06970784068107605, -0.033565863966941833, -0.018239645287394524, -0.0030277615878731012, -0.03641204163432121, 0.022008057683706284, -0.09042128920555115, -0.015759531408548355, 0.07035085558891296, 0.03639986366033554, 0.03260553628206253, 0.06041688844561577, 0.0723198726773262, 0.13120156526565552, -0.02761693298816681, -0.08000286668539047, -0.047775983810424805, -0.02924579195678234, 0.008982890285551548, 0.006043267901986837, 0.057233378291130066, 0.00830815825611353, -0.09968048334121704, -0.021205147728323936, 0.053396761417388916, -0.10139042139053345, -0.0713956281542778, 0.04219787195324898, -0.03412618488073349, -0.00441389437764883, 0.04944787174463272, 0.00039277737960219383, -0.033592984080314636, 0.005549927242100239, 0.04313785955309868, -0.05303438380360603, -0.010461974889039993, 0.060816653072834015, 0.02455817349255085, 0.11440199613571167, -0.010666891001164913, 0.055469006299972534, -0.026372022926807404, 0.03839177265763283, 0.011898464523255825, 0.16348786652088165, 0.061222221702337265, 0.004757388029247522, 0.0834260955452919, 0.05702590197324753, 0.13642030954360962, 0.07420044392347336, 2.6908648934275925e-33, 0.053344689309597015, -0.05412024259567261, 0.011701492592692375, 0.09953593462705612, 0.0294524896889925, 0.037046730518341064, 0.06123894080519676, -0.031059395521879196, -0.03680719435214996, 0.025645917281508446, -0.03496754914522171, 0.08180013298988342, -0.005024217069149017, -0.026094678789377213, 0.03882927447557449, 0.04105575755238533, 0.03959594666957855, 0.05109123885631561, 0.034256190061569214, 0.06950784474611282, 0.00515761086717248, 0.021696778014302254, -0.02545446902513504, 0.05698762461543083, 0.042352814227342606, 0.009046410210430622, -0.019836096093058586, -0.031572483479976654, -0.02576860971748829, -0.0302365031093359, 0.028035467490553856, 0.020293716341257095, -0.01397750899195671, 0.05874861404299736, 0.000631161208730191, 0.009146036580204964, -0.06233614310622215, -0.04517744481563568, -0.06400950998067856, -0.017306245863437653, -0.007484802044928074, 0.017850367352366447, -0.03561639040708542, -0.011988481506705284, -0.0242434311658144, -0.08961810916662216, -0.13937689363956451, 0.04949731007218361, 0.06500612199306488, 0.002029838040471077, -0.008556236512959003, 0.09009285271167755, 0.06633027642965317, 0.0026880705263465643, 0.026196811348199844, -0.0005277418531477451, 0.020468201488256454, 0.022572509944438934, 0.06919761747121811, -0.030227623879909515, -0.04140060022473335, -0.02910984680056572, -0.007288899272680283, -0.007304210681468248, 0.027969740331172943, 0.018989112228155136, 0.008641079999506474, 0.10471199452877045, 0.03026612102985382, 0.020131368190050125, -0.035413552075624466, 0.01911180093884468, -0.05875946208834648, 0.012535340152680874, 0.029213275760412216, -0.0051910835318267345, -0.0098310811445117, -0.12345556169748306, -0.02620222605764866, -0.008045937865972519, 0.06200193986296654, -0.03510182350873947, 0.01314239576458931, 0.03505632281303406, 0.07176249474287033, -0.0005346332909539342, -0.019879093393683434, -0.047903869301080704, 0.0013792000245302916, 0.0545475147664547, -0.1584828495979309, -0.055959027260541916, -0.11792947351932526, 0.03682615980505943, -0.0990898385643959, -3.807007432450909e-33, 0.0031795762479305267, -0.04151877760887146, -0.005867551546543837, 0.06838773936033249, -0.05824633315205574, -0.03930441290140152, 0.01908726990222931, -0.07565368711948395, 0.07200739532709122, 0.002147848019376397, -0.044160936027765274, -0.019656410440802574, 0.03812060505151749, -0.03769276291131973, 0.12848953902721405, 0.010662814602255821, -0.16150325536727905, -0.06593329459428787, 0.03846975415945053, 0.0015048335772007704, -0.07719171792268753, -0.042870234698057175, -0.03255276009440422, -0.008814087137579918, -0.07406309247016907, -0.02377164363861084, 0.019348913803696632, -0.06056312471628189, 0.032807860523462296, -0.09204747527837753, -0.03416432812809944, -0.0052137733437120914, -0.06750752776861191, 0.03785593807697296, 0.013262785971164703, 0.06816042214632034, 0.13117311894893646, 0.0076180798932909966, -0.001762747298926115, 0.022380445152521133, 0.09529516100883484, -0.017922282218933105, -0.005140729248523712, -0.07979331910610199, -0.05398441106081009, 0.02127022296190262, -0.019974472001194954, 0.025165420025587082, -0.019796278327703476, 0.025206193327903748, 0.04947987571358681, -0.010029676370322704, -0.10051224380731583, 0.025676304474473, -0.08876242488622665, -0.04553103446960449, 0.044676877558231354, -0.07277316600084305, -0.04350065067410469, 0.0037647865246981382, 0.013922981917858124, -0.0711914598941803, 0.01968804933130741, 0.03337324783205986, -0.023324361070990562, -0.007748421747237444, -0.06149391084909439, -0.01612599566578865, 0.06349600106477737, -0.02747057005763054, 0.07079025357961655, -0.07319420576095581, 0.021663175895810127, -0.0051216608844697475, 0.03282998874783516, 0.05466113239526749, -0.09515883773565292, -0.05902145057916641, 0.05102056264877319, 0.08046745508909225, 0.01647990196943283, -0.007136930245906115, 0.09347384423017502, 0.020005978643894196, -0.04904109984636307, 0.017340129241347313, 0.06815525144338608, 0.11666712909936905, 0.025727659463882446, -0.06719633936882019, 0.04733128100633621, -0.015135610476136208, -0.017719902098178864, 0.038585517555475235, -0.04900003597140312, -5.3679652722848914e-8, -0.04903911426663399, 0.02658947929739952, -0.005725179798901081, 0.038534265011548996, -0.02537607029080391, 0.00042309320997446775, 0.005589933134615421, -0.03964510187506676, 0.021609749644994736, 0.02313392050564289, 0.04570485278964043, -0.0004809946985915303, 0.03919967636466026, 0.002544319024309516, 0.00146548415068537, -0.019893284887075424, -0.00045923766447231174, -0.0409560464322567, -0.02087409980595112, -0.06081869453191757, 0.032279808074235916, -0.01581912487745285, 0.008281528949737549, 0.013281195424497128, -0.02064218558371067, -0.07280976325273514, -0.09595845639705658, 0.1026032343506813, -0.02209949679672718, 0.01924063079059124, -0.0397675521671772, -0.010307339951395988, 0.0019063232466578484, 0.025709113106131554, 0.0159559715539217, -0.007280129007995129, 0.003805627813562751, -0.007920168340206146, 0.08662467449903488, 0.042604394257068634, 0.038467664271593094, 0.020581839606165886, -0.05739240720868111, -0.01264384388923645, 0.0146842235699296, -0.019806720316410065, -0.017303461208939552, -0.07812536507844925, 0.06812317669391632, -0.0033260162454098463, -0.06331521272659302, -0.015526188537478447, -0.03647739812731743, 0.051118433475494385, -0.04587307199835777, -0.08241695165634155, -0.03296805918216705, -0.055185165256261826, 0.005534306634217501, 0.022835204377770424, -0.06624696403741837, -0.0263181421905756, -0.03176345303654671, 0.05157847702503204 ]
0.091705
temperature for a city Args: city: The name of the city Returns: The current temperature for the city """ temperatures = { 'New York': '22Β°C', 'London': '15Β°C', } return temperatures.get(city, 'Unknown') available\_functions = { 'get\_temperature': get\_temperature, } # directly pass the function as part of the tools list response = chat(model='qwen3', messages=messages, tools=available\_functions.values(), think=True) ```
https://github.com/ollama/ollama/blob/main//docs/capabilities/tool-calling.mdx
main
ollama
[ -0.012166975066065788, 0.03021438792347908, 0.04998432472348213, 0.0878964364528656, -0.01415405236184597, -0.08843937516212463, 0.04956541582942009, -0.036635514348745346, -0.00275485054589808, -0.003349991049617529, 0.011139800772070885, -0.12311141192913055, -0.05189186707139015, 0.008829002268612385, 0.1311761885881424, 0.009251382201910019, -0.013828468509018421, -0.08631744980812073, 0.023826677352190018, -0.07700251042842865, 0.040790002793073654, 0.07845456898212433, -0.02034548856317997, 0.05216542258858681, 0.04513883963227272, -0.04000223055481911, -0.012026842683553696, 0.10704000294208527, -0.04069356247782707, 0.05492250621318817, -0.010550768114626408, 0.026092568412423134, -0.0011623259633779526, 0.02402789518237114, 0.015453263185918331, 0.049962613731622696, -0.042660124599933624, -0.05521456152200699, -0.04928747937083244, 0.04405306652188301, -0.01024289894849062, -0.0268931332975626, -0.01849871687591076, -0.09946988523006439, 0.04969886690378189, -0.016428353264927864, -0.04383281245827675, 0.10506170243024826, 0.06381265819072723, -0.04757042974233627, 0.01833309233188629, 0.05469706282019615, -0.003666795091703534, 0.020304275676608086, 0.0066356356255710125, 0.053896185010671616, -0.06735143065452576, -0.018243465572595596, -0.03209449723362923, -0.05482609570026398, -0.04995488002896309, 0.012714818120002747, -0.07265553623437881, 0.024543767794966698, 0.054294634610414505, -0.055599603801965714, -0.015508633106946945, 0.049862876534461975, 0.0141347860917449, 0.03299366310238838, 0.015399056486785412, -0.03685259073972702, 0.0037316291127353907, -0.07093793153762817, 0.10485975444316864, -0.046191293746232986, 0.0105939581990242, -0.06319493055343628, 0.006677194498479366, 0.03815528005361557, 0.003837686963379383, -0.09634295105934143, 0.030014824122190475, 0.0579768531024456, -0.0006533381529152393, -0.014137743040919304, 0.01818135939538479, 0.06389892846345901, 0.04697192832827568, -0.018669789656996727, -0.06294666975736618, -0.08248221129179001, -0.03624679148197174, 0.045130856335163116, -0.019699707627296448, 0.08552011847496033, 0.08481296896934509, -0.025029128417372704, -0.028014402836561203, -0.034407828003168106, -0.0578702837228775, -0.06120220199227333, 0.04928895831108093, -0.004055963829159737, 0.07452111691236496, 0.02751632034778595, 0.023618075996637344, -0.08755143731832504, 0.007463978137820959, -0.019330540671944618, -0.09942949563264847, 0.04708808660507202, 0.009012654423713684, 0.00702908867970109, 0.06007007136940956, -0.014335953630506992, -0.01909034699201584, -0.007247951813042164, 0.012791462242603302, 0.019615890458226204, 0.10007656365633011, 0.03497284650802612, -0.025645632296800613, 0.06073485314846039, -0.04731455072760582, 0.05437936261296272, 0.032262060791254044, 7.893686093126556e-34, 0.026410123333334923, -0.043338604271411896, 0.02067132480442524, 0.031169086694717407, 0.037531692534685135, 0.005709418095648289, -0.018215598538517952, -0.004190545063465834, -0.02930636890232563, -0.0037860602606087923, -0.035912107676267624, 0.03222999349236488, 0.03103812038898468, -0.04043813794851303, 0.039511680603027344, 0.11916673928499222, 0.004812020342797041, 0.05193065106868744, 0.0944460779428482, 0.09995688498020172, -0.015951847657561302, 0.03025909513235092, -0.010319389402866364, 0.01333592925220728, -0.002392359310761094, 0.010645708069205284, 0.04940379410982132, 0.04306449741125107, -0.06269495189189911, -0.029550228267908096, -0.03266638144850731, -0.005088925361633301, 0.0028854161500930786, 0.010953148826956749, 0.02895820513367653, 0.039547014981508255, -0.00007904449012130499, -0.0020504286512732506, -0.04640887305140495, -0.004875985439866781, 0.025996409356594086, -0.031102582812309265, -0.000016024330761865713, -0.01754065975546837, -0.002513101790100336, 0.006077497731894255, -0.07720008492469788, 0.008464695885777473, 0.019803984090685844, 0.06781511753797531, -0.012934194877743721, 0.018073415383696556, -0.04798509180545807, 0.056081321090459824, -0.031227106228470802, -0.020477449521422386, 0.038970161229372025, 0.01660616137087345, 0.016128774732351303, -0.06703636050224304, -0.06972577422857285, -0.006755942013114691, 0.07768571376800537, -0.07068880647420883, 0.08715959638357162, -0.000273959303740412, 0.004625517874956131, 0.06136453151702881, -0.0021821330301463604, 0.06121125444769859, -0.013019231148064137, 0.034852344542741776, 0.014519521035254002, 0.039399728178977966, 0.03242720291018486, 0.024173231795430183, -0.03699177876114845, -0.06151921674609184, 0.01454715896397829, 0.0024306599516421556, 0.009631204418838024, -0.015862764790654182, -0.05313420668244362, 0.027168679982423782, 0.04781179502606392, -0.06200525164604187, 0.05695457011461258, 0.0029614532832056284, -0.005284804385155439, 0.04421456903219223, -0.12773820757865906, -0.0716058537364006, -0.03538605198264122, 0.03448006883263588, -0.08964335918426514, -1.8917103854798375e-33, 0.008752952329814434, -0.03397729992866516, -0.024769293144345284, 0.004978558514267206, -0.1134132444858551, -0.03205825015902519, 0.08793371170759201, -0.026979539543390274, 0.0673145279288292, 0.03053807094693184, 0.012212071567773819, -0.06755628436803818, 0.06634253263473511, -0.057007644325494766, 0.10943933576345444, 0.0951637327671051, -0.08563633263111115, -0.054874736815690994, -0.02214311994612217, 0.02090681530535221, -0.11073268204927444, -0.04351096600294113, -0.09039563685655594, -0.0010488538537174463, -0.11801626533269882, -0.02128237672150135, 0.010542505420744419, -0.09327249228954315, -0.04724772274494171, -0.0778857097029686, -0.09618443995714188, 0.009810320101678371, -0.08023761957883835, 0.06245269253849983, 0.00023847237753216177, 0.06447850167751312, 0.12949290871620178, -0.06373827904462814, 0.03879854455590248, -0.023014884442090988, 0.04096800088882446, 0.02117098867893219, -0.051668681204319, 0.0058136372826993465, 0.033985696732997894, 0.0900125503540039, -0.04323744401335716, -0.01907944306731224, 0.023957984521985054, -0.005335676949471235, 0.10337669402360916, -0.06702761352062225, -0.08462894707918167, 0.012380867265164852, -0.0685436874628067, -0.04245775192975998, -0.030267374590039253, -0.006124917417764664, -0.012747597880661488, -0.03279034420847893, -0.03108406811952591, -0.1317306011915207, 0.009431503713130951, 0.055806588381528854, -0.0404493510723114, -0.03393849730491638, -0.016532210633158684, -0.009707021526992321, 0.10419303178787231, -0.06591328233480453, 0.06772828102111816, -0.0036958111450076103, 0.07584281265735626, -0.026762207970023155, 0.024635419249534607, 0.0032570341136306524, 0.014225058257579803, -0.011562769301235676, 0.012014285661280155, 0.05325575917959213, 0.04692249000072479, 0.03252542391419411, 0.01990821771323681, 0.07182054221630096, -0.003626002697274089, -0.07468193769454956, 0.07755246013402939, 0.12425468116998672, -0.010458726435899734, -0.052053049206733704, 0.04086124524474144, 0.05088604986667633, -0.057995300740003586, 0.07362072914838791, 0.026076961308717728, -3.8802401292059585e-8, -0.03567219525575638, 0.03633257746696472, -0.0014876873465254903, 0.037843331694602966, -0.04864710941910744, 0.07023098319768906, 0.00694692088291049, -0.01564122922718525, 0.04167359694838524, 0.07113093137741089, 0.06126566231250763, 0.04573795571923256, 0.0316370464861393, 0.009395423345267773, -0.005314819049090147, -0.07831049710512161, -0.04395142197608948, 0.03336687013506889, 0.01034355815500021, -0.06896360218524933, 0.06846058368682861, 0.005182706285268068, -0.055991847068071365, 0.03578722104430199, 0.059432968497276306, -0.030705204233527184, -0.08180958032608032, -0.004553786478936672, -0.03718602657318115, 0.02497360110282898, -0.0491679310798645, -0.04975946247577667, 0.02443074621260166, 0.07776430994272232, 0.0487808883190155, -0.08176974207162857, 0.03358859568834305, 0.061761584132909775, 0.05240471661090851, 0.05034347251057625, 0.008506842888891697, -0.005994056351482868, -0.16474850475788116, -0.026195039972662926, -0.01088310219347477, -0.10963516682386398, -0.025086307898163795, -0.02040216326713562, 0.07040000706911087, 0.031234480440616608, -0.005440623965114355, -0.013128452934324741, -0.0008780453936196864, 0.005229140166193247, -0.01685783639550209, -0.10262878239154816, -0.057404547929763794, 0.00868944637477398, -0.009088900871574879, -0.02132587693631649, -0.02330760285258293, 0.008619459345936775, -0.08635411411523819, 0.033896058797836304 ]
0.025221
Thinking-capable models emit a `thinking` field that separates their reasoning trace from the final answer. Use this capability to audit model steps, animate the model \*thinking\* in a UI, or hide the trace entirely when you only need the final response. ## Supported models - [Qwen 3](https://ollama.com/library/qwen3) - [GPT-OSS](https://ollama.com/library/gpt-oss) \*(use `think` levels: `low`, `medium`, `high` β€” the trace cannot be fully disabled)\* - [DeepSeek-v3.1](https://ollama.com/library/deepseek-v3.1) - [DeepSeek R1](https://ollama.com/library/deepseek-r1) - Browse the latest additions under [thinking models](https://ollama.com/search?c=thinking) ## Enable thinking in API calls Set the `think` field on chat or generate requests. Most models accept booleans (`true`/`false`). GPT-OSS instead expects one of `low`, `medium`, or `high` to tune the trace length. The `message.thinking` (chat endpoint) or `thinking` (generate endpoint) field contains the reasoning trace while `message.content` / `response` holds the final answer. ```shell curl http://localhost:11434/api/chat -d '{ "model": "qwen3", "messages": [{ "role": "user", "content": "How many letter r are in strawberry?" }], "think": true, "stream": false }' ``` ```python from ollama import chat response = chat( model='qwen3', messages=[{'role': 'user', 'content': 'How many letter r are in strawberry?'}], think=True, stream=False, ) print('Thinking:\n', response.message.thinking) print('Answer:\n', response.message.content) ``` ```javascript import ollama from 'ollama' const response = await ollama.chat({ model: 'deepseek-r1', messages: [{ role: 'user', content: 'How many letter r are in strawberry?' }], think: true, stream: false, }) console.log('Thinking:\n', response.message.thinking) console.log('Answer:\n', response.message.content) ``` GPT-OSS requires `think` to be set to `"low"`, `"medium"`, or `"high"`. Passing `true`/`false` is ignored for that model. ## Stream the reasoning trace Thinking streams interleave reasoning tokens before answer tokens. Detect the first `thinking` chunk to render a "thinking" section, then switch to the final reply once `message.content` arrives. ```python from ollama import chat stream = chat( model='qwen3', messages=[{'role': 'user', 'content': 'What is 17 Γ— 23?'}], think=True, stream=True, ) in\_thinking = False for chunk in stream: if chunk.message.thinking and not in\_thinking: in\_thinking = True print('Thinking:\n', end='') if chunk.message.thinking: print(chunk.message.thinking, end='') elif chunk.message.content: if in\_thinking: print('\n\nAnswer:\n', end='') in\_thinking = False print(chunk.message.content, end='') ``` ```javascript import ollama from 'ollama' async function main() { const stream = await ollama.chat({ model: 'qwen3', messages: [{ role: 'user', content: 'What is 17 Γ— 23?' }], think: true, stream: true, }) let inThinking = false for await (const chunk of stream) { if (chunk.message.thinking && !inThinking) { inThinking = true process.stdout.write('Thinking:\n') } if (chunk.message.thinking) { process.stdout.write(chunk.message.thinking) } else if (chunk.message.content) { if (inThinking) { process.stdout.write('\n\nAnswer:\n') inThinking = false } process.stdout.write(chunk.message.content) } } } main() ``` ## CLI quick reference - Enable thinking for a single run: `ollama run deepseek-r1 --think "Where should I visit in Lisbon?"` - Disable thinking: `ollama run deepseek-r1 --think=false "Summarize this article"` - Hide the trace while still using a thinking model: `ollama run deepseek-r1 --hidethinking "Is 9.9 bigger or 9.11?"` - Inside interactive sessions, toggle with `/set think` or `/set nothink`. - GPT-OSS only accepts levels: `ollama run gpt-oss --think=low "Draft a headline"` (replace `low` with `medium` or `high` as needed). Thinking is enabled by default in the CLI and API for supported models.
https://github.com/ollama/ollama/blob/main//docs/capabilities/thinking.mdx
main
ollama
[ -0.07508975267410278, -0.0656646266579628, 0.022271549329161644, 0.046738240867853165, 0.06038306653499603, -0.10059650242328644, 0.005307452287524939, 0.034768957644701004, 0.05851346254348755, -0.04474779963493347, -0.04640760272741318, -0.0236667487770319, -0.05720806121826172, -0.0033300414215773344, 0.007278113160282373, 0.003597614588215947, 0.05843828618526459, 0.017321333289146423, -0.1088113784790039, -0.05897209793329239, 0.03795139864087105, -0.01980501413345337, 0.034608032554388046, -0.017575381323695183, -0.019658628851175308, -0.055265411734580994, 0.01205530483275652, 0.002742842538282275, 0.03875844180583954, -0.023887980729341507, 0.06034253165125847, 0.0051983557641506195, -0.037089623510837555, 0.05037494748830795, 0.017850523814558983, 0.10749942064285278, -0.07846137881278992, -0.0520983524620533, -0.05757855996489525, -0.09130082279443741, -0.04030776396393776, -0.001106042880564928, -0.03365861624479294, -0.026428353041410446, 0.0402979850769043, -0.09502055495977402, -0.010308527387678623, -0.05857085809111595, -0.06658468395471573, -0.03846980258822441, -0.1250961273908615, 0.0012688288697972894, -0.00031316536478698254, 0.01860620081424713, 0.046327266842126846, 0.0248678270727396, 0.05688874423503876, -0.024710867553949356, -0.07492244988679886, -0.07470397651195526, -0.06939637660980225, -0.04305359348654747, -0.035685572773218155, -0.04632754996418953, -0.00972069427371025, 0.07945027947425842, -0.022200601175427437, 0.03984760865569115, 0.07950638234615326, 0.031108712777495384, 0.01169572677463293, 0.019513752311468124, -0.07340513914823532, -0.11710353940725327, 0.040708281099796295, 0.05591253563761711, 0.05733012408018112, 0.012587304227054119, 0.009735289961099625, -0.08771996200084686, -0.012088973075151443, -0.0429149828851223, 0.0026636458933353424, 0.015788178890943527, 0.057714663445949554, 0.01901126094162464, -0.048364993184804916, 0.04337916150689125, 0.054790712893009186, 0.02682461030781269, -0.01481383666396141, -0.05825969949364662, -0.029228495433926582, 0.01112394966185093, 0.11114088445901871, 0.05316367372870445, -0.017542874440550804, -0.07337628304958344, -0.061442676931619644, 0.05797562003135681, -0.03323495015501976, 0.022103622555732727, 0.0669446736574173, 0.02222524955868721, -0.021072354167699814, 0.028924716636538506, 0.09608688950538635, 0.05510176718235016, -0.052913811057806015, -0.021516939625144005, -0.0019657344091683626, 0.022452915087342262, 0.08967601507902145, 0.06741692870855331, 0.023551886901259422, 0.06120402365922928, 0.04681098461151123, 0.058652136474847794, -0.01953313872218132, 0.011787989176809788, 0.022206125780940056, 0.06001153960824013, 0.06214677914977074, -0.05587751790881157, 0.012892412021756172, -0.014295553788542747, -0.021861717104911804, 3.245339333896727e-33, 0.1109214574098587, 0.0025207693688571453, 0.033926524221897125, -0.07697109878063202, 0.08046761155128479, 0.0668005421757698, 0.01929737627506256, -0.013827935792505741, -0.04525632783770561, 0.046363674104213715, -0.04432540759444237, 0.02225923351943493, -0.07926968485116959, -0.00007525533146690577, 0.05782230943441391, -0.01979704573750496, -0.08749137073755264, 0.032242633402347565, -0.022591562941670418, 0.03701377660036087, 0.0806744247674942, -0.03755343332886696, -0.077964648604393, -0.049987003207206726, -0.011540700681507587, 0.03784189745783806, 0.03184416890144348, 0.038248974829912186, -0.0981939360499382, 0.03554128110408783, -0.07710522413253784, -0.006424237973988056, -0.06338773667812347, 0.05883285030722618, -0.023844609037041664, -0.033064957708120346, -0.0494869127869606, -0.025805411860346794, 0.029678119346499443, -0.11286287754774094, 0.021804576739668846, 0.006993388291448355, 0.029617086052894592, -0.054537333548069, -0.07880869507789612, -0.005864948965609074, 0.002340256469324231, 0.0735311433672905, 0.028337977826595306, 0.046382561326026917, 0.07540986686944962, 0.018862567842006683, -0.042825791984796524, -0.12975652515888214, -0.023844532668590546, -0.061296433210372925, 0.0715535432100296, 0.071637362241745, 0.09341347217559814, 0.046801257878541946, 0.05903119966387749, 0.005331862717866898, 0.00004319366053096019, 0.0021327792201191187, 0.013559700921177864, 0.06702293455600739, -0.11480280011892319, 0.03386640548706055, 0.08706726878881454, 0.03749851882457733, -0.06903824210166931, 0.046293701976537704, 0.025579361245036125, 0.022981738671660423, -0.00023843219969421625, -0.08746693283319473, -0.03656559810042381, -0.07565142214298248, 0.0037248420994728804, -0.0445886105298996, 0.056331515312194824, -0.007513829041272402, -0.061058398336172104, 0.0043876925483345985, 0.019971301779150963, -0.004565294366329908, -0.017424369230866432, -0.043867990374565125, -0.07891649007797241, 0.0002299883053638041, -0.025790859013795853, -0.025832172483205795, 0.01350918598473072, -0.03045031800866127, -0.10877388715744019, -2.9107295404763855e-33, 0.013205229304730892, 0.021968046203255653, 0.0045539322309195995, 0.05172019824385643, -0.019428929314017296, -0.06747482717037201, 0.049419645220041275, 0.05350176617503166, 0.02761746011674404, -0.051647890359163284, -0.0011000247905030847, -0.01047471072524786, 0.021129250526428223, 0.020481806248426437, 0.10345888137817383, -0.07592086493968964, -0.07841399312019348, -0.10085058212280273, 0.027206018567085266, 0.02505423128604889, -0.03932990878820419, 0.01314573548734188, -0.13808076083660126, -0.004323022440075874, -0.02107977122068405, 0.02184349112212658, 0.019541434943675995, 0.08436224609613419, -0.020254604518413544, -0.017140217125415802, -0.014326965436339378, 0.01906011439859867, -0.09892428666353226, -0.005767006892710924, -0.0058064707554876804, 0.030033327639102936, 0.06306590884923935, -0.00011163097951794043, -0.042543087154626846, 0.013233205303549767, 0.05369386449456215, -0.02884427085518837, -0.05894634127616882, 0.026260891929268837, -0.06068067625164986, 0.0642707347869873, -0.05104250833392143, 0.05964226648211479, -0.013588851317763329, -0.0413951650261879, 0.04617367312312126, 0.03714696317911148, -0.0030946864280849695, 0.029798613861203194, -0.006668680347502232, 0.026445500552654266, 0.058555010706186295, -0.06509453058242798, -0.0035762470215559006, 0.011250242590904236, 0.007475398480892181, -0.01416462380439043, -0.00945244263857603, -0.008846739307045937, 0.05256878212094307, -0.018525412306189537, -0.022555408999323845, 0.023043068125844002, 0.0299505777657032, -0.00264155981130898, 0.00953628122806549, -0.017895355820655823, 0.027083076536655426, 0.0308979582041502, 0.14691190421581268, 0.042070016264915466, -0.0954076498746872, -0.06612972915172577, 0.04311826452612877, -0.03936527296900749, -0.05540977418422699, -0.05994163453578949, 0.034204207360744476, 0.020705990493297577, 0.0503317266702652, -0.06896799802780151, -0.0750044509768486, 0.1260053664445877, 0.017672300338745117, 0.013384997844696045, -0.06250055879354477, 0.04578544199466705, -0.0032591596245765686, 0.11710605025291443, -0.02610417641699314, -5.375169820354131e-8, -0.0612630769610405, -0.03099600225687027, 0.0490918904542923, 0.08495055139064789, 0.04001202434301376, 0.017076794058084488, 0.023931093513965607, 0.05856775864958763, -0.004747101571410894, 0.004064619075506926, 0.031988438218832016, -0.001964565133675933, -0.07294386625289917, -0.013128424063324928, 0.01850532554090023, 0.007685732562094927, 0.02486347034573555, 0.04283524304628372, -0.050505928695201874, -0.05806660279631615, 0.04423675313591957, 0.015497260726988316, -0.08012817800045013, 0.02142566442489624, 0.019378922879695892, -0.0580194815993309, -0.03383179008960724, 0.08928254246711731, -0.024132438004016876, 0.05229279398918152, 0.02810046635568142, 0.0017018060898408294, 0.06790324300527573, 0.02246803045272827, -0.015483897179365158, 0.08574026823043823, -0.00977175123989582, 0.03770534694194794, 0.02925684116780758, 0.013200948014855385, 0.05744507163763046, 0.007292171474546194, -0.03890683874487877, -0.010704375803470612, 0.04212495684623718, -0.004362089559435844, -0.07359284907579422, -0.10520293563604355, 0.022383209317922592, 0.09710569679737091, -0.04926474019885063, -0.01005486398935318, -0.026923608034849167, 0.08599737286567688, -0.03734314814209938, -0.02749069593846798, 0.025135548785328865, 0.02148476243019104, -0.03424975275993347, 0.055951427668333054, 0.1299445778131485, 0.02835921011865139, -0.0027891425415873528, 0.06155616044998169 ]
0.092024
## Install Install [Cline](https://docs.cline.bot/getting-started/installing-cline) in your IDE. ## Usage with Ollama 1. Open Cline settings > `API Configuration` and set `API Provider` to `Ollama` 2. Select a model under `Model` or type one (e.g. `qwen3`) 3. Update the context window to at least 32K tokens under `Context Window` Coding tools require a larger context window. It is recommended to use a context window of at least 32K tokens. See [Context length](/context-length) for more information.## Connecting to ollama.com 1. Create an [API key](https://ollama.com/settings/keys) from ollama.com 2. Click on `Use custom base URL` and set it to `https://ollama.com` 3. Enter your \*\*Ollama API Key\*\* 4. Select a model from the list ### Recommended Models - `qwen3-coder:480b` - `deepseek-v3.1:671b`
https://github.com/ollama/ollama/blob/main//docs/integrations/cline.mdx
main
ollama
[ -0.0784517228603363, -0.048594363033771515, -0.05388801544904709, -0.020675141364336014, -0.05848460644483566, -0.08580130338668823, -0.027262935414910316, 0.052396032959222794, 0.04219891130924225, -0.02820352278649807, -0.01994885317981243, -0.06540525704622269, 0.016764331609010696, -0.0008362670196220279, 0.11547207087278366, 0.12409517914056778, 0.01248099934309721, 0.011500001884996891, -0.07778224349021912, 0.0103505440056324, 0.11904869228601456, 0.05394385755062103, 0.029256341978907585, -0.02415708638727665, -0.04491804167628288, -0.04221942648291588, 0.024095483124256134, 0.05919784680008888, 0.05434343218803406, -0.036280807107686996, 0.09370595216751099, 0.013971027918159962, -0.017710871994495392, -0.0043556769378483295, 0.11088313162326813, 0.005975606385618448, -0.02696327306330204, -0.11217749863862991, -0.03801526874303818, 0.02234588749706745, 0.08089606463909149, 0.07593955099582672, -0.09686212241649628, -0.02514980174601078, 0.008961353451013565, -0.08667510747909546, 0.006103300955146551, 0.012603341601788998, 0.04964007809758186, -0.033184733241796494, -0.057782597839832306, -0.10527264326810837, -0.026838012039661407, -0.03930981457233429, 0.00970278400927782, 0.020360322669148445, -0.05249353498220444, -0.05182461440563202, 0.02404131554067135, 0.06471503525972366, 0.03976861760020256, 0.0689176619052887, 0.003449114738032222, 0.021358560770750046, -0.029845450073480606, -0.011324445717036724, -0.037255946546792984, 0.015230108052492142, -0.0028551192954182625, -0.05525440722703934, -0.03640403971076012, 0.008046474307775497, -0.05695250257849693, 0.03710690140724182, 0.013679128140211105, -0.009267834946513176, 0.049971017986536026, 0.04839196801185608, -0.032691750675439835, -0.07118462026119232, -0.03790193051099777, -0.03292097523808479, 0.035551607608795166, 0.05935020372271538, 0.1140781044960022, -0.002933159004896879, 0.024539921432733536, 0.04065553471446037, 0.08303960412740707, -0.010654924437403679, 0.0240272656083107, -0.05429678410291672, 0.0036570082884281874, -0.014492001384496689, 0.08559383451938629, -0.004427296109497547, 0.04019841551780701, -0.03059757687151432, -0.03294047340750694, 0.1127215251326561, -0.04737837612628937, -0.01792648434638977, -0.04873938113451004, 0.05063236877322197, -0.058907400816679, 0.02957308478653431, 0.15325526893138885, 0.12709872424602509, -0.09284228831529617, 0.013564669527113438, -0.01576315052807331, -0.05393078178167343, 0.08065410703420639, -0.0361066497862339, 0.006329589057713747, 0.06289473176002502, 0.009240368381142616, 0.015913357958197594, 0.08854596316814423, 0.004954203963279724, 0.02675856463611126, -0.0485166572034359, -0.0335610993206501, 0.00534460972994566, -0.040411464869976044, 0.11015830934047699, -0.001628469442948699, 4.8178491875275646e-33, 0.10226937383413315, 0.06646601855754852, 0.011700836010277271, 0.001708865980617702, 0.02895079180598259, 0.06847397983074188, 0.031040897592902184, -0.0111186308786273, -0.06739583611488342, -0.0779339075088501, -0.0166594497859478, 0.04306749626994133, -0.04185418039560318, -0.02019484154880047, 0.016364436596632004, -0.014889945276081562, -0.03416042774915695, 0.06338441371917725, 0.041447341442108154, 0.000459626957308501, 0.01859954372048378, -0.07077603042125702, -0.019577475264668465, 0.04525492712855339, 0.023297477513551712, 0.08649900555610657, 0.0017427712446078658, -0.021087514236569405, -0.016464276239275932, 0.03518793731927872, 0.06068471819162369, -0.002909054746851325, -0.04842141643166542, -0.02543753571808338, -0.05605187267065048, 0.020204225555062294, -0.062274713069200516, -0.024331489577889442, -0.11076124757528305, -0.02348860539495945, -0.026557033881545067, 0.013517292216420174, -0.03364308178424835, -0.04473906755447388, -0.08740079402923584, -0.012610530480742455, -0.021685322746634483, 0.040633250027894974, 0.0425485260784626, -0.017579335719347, 0.0013386381324380636, 0.017593467608094215, -0.09793076664209366, 0.014521582052111626, -0.022046398371458054, -0.057923831045627594, -0.029644761234521866, -0.0402655154466629, 0.10976157337427139, -0.00002619704719108995, -0.013533389195799828, 0.011420907452702522, -0.023922603577375412, 0.03810524195432663, 0.03955952823162079, 0.023049956187605858, -0.014361911453306675, -0.002183544682338834, 0.013919269666075706, 0.032007671892642975, -0.033942922949790955, 0.00916693452745676, -0.014230020344257355, 0.09709044545888901, -0.02614089660346508, -0.0822485163807869, -0.02280307188630104, -0.021159779280424118, -0.07133208215236664, 0.008032197132706642, 0.06449873745441437, 0.0026458201464265585, 0.044373344630002975, -0.006219523027539253, 0.040082793682813644, -0.065945103764534, 0.037171151489019394, 0.00003087337609031238, -0.07593986392021179, 0.013718764297664165, 0.020251048728823662, -0.020657414570450783, -0.006967483088374138, -0.020075125619769096, -0.09822479635477066, -3.686657382077846e-33, 0.055476073175668716, -0.017293144017457962, 0.045832227915525436, -0.018325602635741234, 0.02050039917230606, -0.024098845198750496, 0.027667082846164703, 0.09729266166687012, -0.021083654835820198, -0.011431651189923286, 0.014926068484783173, -0.013176890090107918, 0.11180994659662247, 0.002502240939065814, 0.05618439242243767, -0.041535183787345886, -0.07007928937673569, -0.06976993381977081, 0.010049154981970787, 0.04686234891414642, -0.043530549854040146, 0.019096393138170242, -0.06618601083755493, 0.006022312678396702, 0.02785407565534115, 0.028668446466326714, -0.07676517963409424, 0.028733495622873306, -0.04280624911189079, -0.03143000975251198, -0.04721071198582649, 0.008025344461202621, -0.09301389008760452, -0.011850908398628235, -0.03759251534938812, 0.07519074529409409, 0.030337665230035782, 0.04244301840662956, -0.01686365343630314, 0.050340380519628525, 0.04239165410399437, -0.059408243745565414, -0.02056330069899559, -0.02307293564081192, -0.04165180027484894, 0.05198277160525322, -0.006522172596305609, -0.01585106924176216, -0.07231292128562927, -0.012394489720463753, 0.030316969379782677, 0.03408435359597206, -0.011106511577963829, -0.02705119363963604, 0.03510807454586029, -0.022414036095142365, 0.04791181907057762, -0.0598977655172348, -0.05382997542619705, -0.03350066393613815, 0.07121729105710983, -0.06831102818250656, 0.015041647478938103, 0.03173988312482834, 0.02475501038134098, -0.08784500509500504, -0.04651941359043121, 0.06229617819190025, -0.050958942621946335, -0.08551418781280518, -0.1265401542186737, -0.07573020458221436, 0.04873687028884888, 0.03908596932888031, 0.040564004331827164, -0.00675496319308877, -0.10848511755466461, -0.01931973360478878, 0.08980700373649597, 0.04028092324733734, -0.06760687381029129, -0.0022055814042687416, 0.09750381857156754, -0.005223175045102835, 0.022713353857398033, 0.0514061339199543, 0.07522615045309067, 0.08029452711343765, 0.004461126402020454, 0.033212579786777496, -0.07232401520013809, 0.014010096900165081, 0.03991370275616646, 0.12081754207611084, 0.05919932201504707, -5.083167664565735e-8, -0.03735225647687912, -0.013457655906677246, 0.0041517228819429874, 0.0263077225536108, -0.05761432647705078, -0.021227378398180008, -0.015981512144207954, 0.04474467784166336, 0.035628631711006165, 0.02432149462401867, 0.01624186523258686, 0.06020556390285492, -0.02512129209935665, 0.04783507436513901, -0.08285363018512726, 0.048400215804576874, -0.013220326043665409, -0.007639689836651087, 0.03930787369608879, -0.07003789395093918, 0.04374655708670616, 0.02176627144217491, 0.0259214099496603, 0.007053920533508062, 0.0633997693657875, -0.09962708503007889, -0.07719801366329193, 0.09053688496351242, -0.04032198712229729, -0.07941218465566635, -0.0029107048176229, -0.02299281395971775, 0.0881899744272232, -0.023257087916135788, -0.08277786523103714, 0.010781259275972843, -0.044153302907943726, -0.0362926684319973, -0.03465156629681587, -0.025828754529356956, 0.11358112841844559, -0.0136842867359519, -0.008083916269242764, -0.08978842943906784, 0.07615666091442108, 0.07141577452421188, 0.03851085528731346, -0.027057837694883347, -0.03359025716781616, -0.00983505416661501, -0.019934358075261116, -0.046497274190187454, 0.08757375925779343, 0.06031171232461929, 0.0010459357872605324, -0.08004022389650345, -0.0748470202088356, -0.0404941588640213, 0.003597693983465433, 0.010580556467175484, 0.0013645902508869767, -0.0224841870367527, 0.048942603170871735, 0.026640601456165314 ]
0.079208
## Install Install [Zed](https://zed.dev/download). ## Usage with Ollama 1. In Zed, click the \*\*star icon\*\* in the bottom-right corner, then select \*\*Configure\*\*.2. Under \*\*LLM Providers\*\*, choose \*\*Ollama\*\* 3. Confirm the \*\*Host URL\*\* is `http://localhost:11434`, then click \*\*Connect\*\* 4. Once connected, select a model under \*\*Ollama\*\*## Connecting to ollama.com 1. Create an [API key](https://ollama.com/settings/keys) on \*\*ollama.com\*\* 2. In Zed, open the \*\*star icon\*\* β†’ \*\*Configure\*\* 3. Under \*\*LLM Providers\*\*, select \*\*Ollama\*\* 4. Set the \*\*API URL\*\* to `https://ollama.com`
https://github.com/ollama/ollama/blob/main//docs/integrations/zed.mdx
main
ollama
[ -0.05509162321686745, 0.024555791169404984, -0.08123525232076645, 0.029139013960957527, -0.03173670172691345, -0.09510696679353714, -0.056498415768146515, -0.03869927302002907, -0.021189728751778603, -0.0019905813969671726, 0.032461125403642654, 0.0055897776037454605, -0.028622932732105255, -0.005603435914963484, 0.07401968538761139, 0.06547436118125916, 0.04328542947769165, -0.03803383186459541, -0.0036513872910290956, 0.02090996690094471, 0.05337714031338692, -0.0038601732812821865, 0.022223379462957382, -0.06624723970890045, -0.007010243833065033, -0.0749962329864502, 0.017428217455744743, 0.08241517096757889, 0.03898409754037857, 0.0045446958392858505, 0.06047586724162102, -0.023534419015049934, -0.11333802342414856, -0.022113105282187462, 0.06099670007824898, -0.05159889906644821, 0.03945227339863777, -0.08372721821069717, -0.10546533018350601, 0.012404999695718288, 0.15571314096450806, 0.05217181518673897, -0.08499022573232651, -0.04657714068889618, -0.0156800989061594, -0.08072400093078613, -0.030716538429260254, 0.013936091214418411, -0.00042101682629436255, -0.059650011360645294, -0.048542268574237823, -0.08077801764011383, -0.02255897969007492, -0.014715705066919327, 0.027983227744698524, 0.041849490255117416, -0.014117257669568062, -0.019956745207309723, 0.004022520966827869, 0.06588400900363922, 0.048886097967624664, -0.0052366359159350395, -0.005637625698000193, 0.01142878457903862, -0.03118571639060974, -0.0007005765801295638, -0.0007318505668081343, 0.019945817068219185, -0.08340148627758026, -0.05890297517180443, -0.0762912780046463, 0.060365330427885056, -0.023468315601348877, -0.02852029539644718, 0.0306281466037035, -0.015112459659576416, 0.019663626328110695, 0.03862752392888069, 0.011493300087749958, -0.03025294467806816, 0.06122743338346481, 0.0001772645628079772, 0.03283317759633064, 0.0436774417757988, 0.03854834660887718, -0.008397419936954975, 0.013334434479475021, 0.03082553669810295, 0.05933183804154396, -0.03970492631196976, -0.03689131885766983, -0.01970011740922928, -0.02499769814312458, -0.0358559712767601, 0.02214568480849266, -0.016484597697854042, 0.017272241413593292, -0.07272524386644363, -0.03173856437206268, 0.07377512007951736, -0.03097933903336525, -0.017798202112317085, 0.0006502236356027424, 0.04809264838695526, -0.08226726204156876, -0.01666327752172947, 0.08999758958816528, 0.17663824558258057, -0.02998637594282627, 0.06372588872909546, -0.0023215427063405514, -0.06858479231595993, 0.06876333802938461, -0.09592191874980927, -0.055305272340774536, 0.04357096552848816, -0.05257861316204071, -0.0002820116642396897, 0.024864139035344124, -0.0299293901771307, -0.007860259152948856, -0.06648758053779602, 0.01371306274086237, -0.0024455867242068052, 0.038802895694971085, 0.11453257501125336, 0.01657746732234955, 2.5888352898540796e-33, 0.11214762181043625, 0.05352135747671127, -0.06378017365932465, 0.013806105591356754, 0.0423458069562912, 0.056609295308589935, 0.07387583702802658, -0.04463360086083412, -0.015624248422682285, -0.06276075541973114, -0.026573175564408302, -0.044400546699762344, -0.01932850107550621, 0.001047023688443005, -0.014312666840851307, -0.016724765300750732, 0.0238617192953825, 0.0436190702021122, 0.06789584457874298, 0.03812321275472641, 0.008122554048895836, 0.009131189435720444, 0.04376758262515068, 0.003313588909804821, 0.025389069691300392, 0.07717849314212799, -0.09079765528440475, 0.042646557092666626, -0.01764165237545967, 0.01305279042571783, 0.22005987167358398, -0.024257609620690346, -0.081185482442379, 0.015964817255735397, 0.041924864053726196, 0.022941291332244873, -0.08284006267786026, -0.05606313422322273, -0.0806034654378891, -0.05103730037808418, -0.007164513226598501, -0.0031868377700448036, -0.085959792137146, -0.002480141818523407, -0.08022670447826385, 0.006373330019414425, -0.03503352031111717, -0.037389785051345825, 0.09978798031806946, -0.03286164999008179, -0.10438468307256699, 0.010611772537231445, -0.11426815390586853, 0.005752257537096739, 0.02447480894625187, 0.05434776097536087, -0.034293949604034424, -0.03994275629520416, 0.06412060558795929, -0.040467970073223114, -0.06321865320205688, 0.005800934974104166, -0.07554880529642105, 0.003877856768667698, -0.00872718170285225, -0.010480623692274094, 0.004393650684505701, -0.03657108545303345, 0.0058958325535058975, 0.010535819455981255, -0.021865779533982277, -0.004445499740540981, 0.0016086051473394036, 0.06723632663488388, -0.08163014054298401, -0.02110942080616951, 0.01103135198354721, -0.029087934643030167, 0.017694156616926193, -0.017805757001042366, 0.025073856115341187, -0.03355395793914795, -0.012380512431263924, -0.005533862393349409, 0.03417310491204262, -0.07019270956516266, 0.004651347175240517, -0.002155931433662772, 0.04456053674221039, 0.006898004096001387, 0.017538882791996002, 0.0435543991625309, 0.037356678396463394, -0.04452652111649513, -0.03759242594242096, -4.436497514285706e-33, -0.011136407032608986, 0.032258834689855576, 0.011781166307628155, -0.018306659534573555, 0.03399460017681122, -0.003640522249042988, 0.029420938342809677, 0.01859991066157818, -0.0196301881223917, 0.0003068469522986561, 0.0989629328250885, 0.04522348940372467, 0.058506712317466736, -0.01006390992552042, 0.04790879786014557, -0.004678767174482346, -0.05757956951856613, -0.09076084941625595, 0.05182354897260666, 0.05317740887403488, -0.044672440737485886, 0.0389222726225853, -0.025858290493488312, -0.02461785078048706, 0.004371990449726582, 0.00020803228835575283, 0.0005462792469188571, -0.046721450984478, -0.08326047658920288, -0.03749030828475952, 0.0011204286711290479, 0.03189525008201599, -0.0812416821718216, 0.020271770656108856, -0.021296735852956772, 0.0920737162232399, 0.03551232069730759, 0.09716237336397171, -0.025844616815447807, 0.021767593920230865, 0.017360949888825417, -0.07959061861038208, -0.06418874114751816, -0.04586658626794815, -0.06041589379310608, 0.006097822450101376, -0.001044494449160993, -0.013043716549873352, -0.11676863580942154, -0.006820240523666143, 0.017157424241304398, 0.01486858818680048, -0.005293660331517458, -0.007805641274899244, 0.049969010055065155, 0.018330655992031097, 0.11141083389520645, -0.022541306912899017, -0.0684482678771019, 0.026219187304377556, 0.12094376236200333, -0.11051172018051147, 0.04210185259580612, 0.08636735379695892, 0.015289404429495335, -0.0190601646900177, 0.025967447087168694, 0.01069524697959423, -0.019799798727035522, -0.054224926978349686, -0.1581522673368454, -0.010346130467951298, 0.029953252524137497, 0.018678506836295128, 0.09927155822515488, -0.03291938826441765, -0.09985929727554321, 0.048860784620046616, 0.02985810860991478, -0.00011000723316101357, -0.019168363884091377, 0.01829976961016655, 0.05341786891222, -0.04775466397404671, 0.021431971341371536, -0.022085700184106827, 0.04860106110572815, 0.06742480397224426, 0.00962108839303255, -0.01791430450975895, -0.1154886782169342, 0.008449042215943336, 0.00036575552076101303, 0.049715250730514526, 0.05870356783270836, -4.824794075375394e-8, -0.06945114582777023, 0.007570088375359774, -0.055588554590940475, -0.01967642456293106, -0.031496480107307434, -0.04094811528921127, 0.0051983012817800045, -0.012027351185679436, 0.023805001750588417, 0.03205358237028122, -0.007153297774493694, 0.11421961337327957, -0.036908265203237534, 0.05115421488881111, -0.08375297486782074, 0.007597819902002811, -0.010270636528730392, 0.005590377375483513, 0.021417684853076935, -0.0048665571957826614, 0.016422320157289505, 0.011559023521840572, 0.014859340153634548, -0.01232538465410471, 0.07328880578279495, -0.06578846275806427, -0.08553837239742279, 0.03830740228295326, 0.0007797661237418652, -0.03410910815000534, -0.012260953895747662, -0.020744092762470245, 0.06105419993400574, -0.1004142016172409, -0.08364232629537582, 0.02187424525618553, -0.04861444607377052, 0.0163527000695467, -0.04934488236904144, -0.03345432132482529, 0.10906720906496048, 0.054382506757974625, 0.05387737601995468, -0.08180660009384155, 0.07714138925075531, 0.04887184873223305, 0.02610759623348713, -0.00776297552511096, 0.020487496629357338, 0.050325438380241394, -0.046549517661333084, -0.04402826726436615, 0.06763887405395508, -0.0014810218708589673, -0.023540006950497627, -0.08325637876987457, -0.07736670970916748, -0.034092821180820465, -0.036550045013427734, 0.04897293448448181, 0.0429779514670372, 0.0003505843924358487, 0.0472712367773056, 0.01200712751597166 ]
0.006202
## Install Install [XCode](https://developer.apple.com/xcode/) ## Usage with Ollama Ensure Apple Intelligence is setup and the latest XCode version is v26.0 1. Click \*\*XCode\*\* in top left corner > \*\*Settings\*\*2. Select \*\*Locally Hosted\*\*, enter port \*\*11434\*\* and click \*\*Add\*\*3. Select the \*\*star icon\*\* on the top left corner and click the \*\*dropdown\*\*4. Click \*\*My Account\*\* and select your desired model ## Connecting to ollama.com directly 1. Create an [API key](https://ollama.com/settings/keys) from ollama.com 2. Select \*\*Internet Hosted\*\* and enter URL as `https://ollama.com` 3. Enter your \*\*Ollama API Key\*\* and click \*\*Add\*\*
https://github.com/ollama/ollama/blob/main//docs/integrations/xcode.mdx
main
ollama
[ 0.009606242179870605, -0.05962353199720383, -0.03972768038511276, 0.033531397581100464, -0.015707846730947495, -0.07257094979286194, -0.08214922249317169, -0.04303506016731262, -0.05667292699217796, 0.017966141924262047, 0.039113376289606094, -0.0461801141500473, -0.05782820284366608, 0.0014116755919530988, 0.06998231261968613, 0.08889754861593246, 0.0199653971940279, -0.06272217631340027, -0.010578515008091927, 0.05128808319568634, 0.06596801429986954, 0.0011172090889886022, -0.007731943856924772, -0.046595558524131775, 0.000011217251994821709, -0.013321354985237122, 0.01360380183905363, 0.07742783427238464, -0.01248276699334383, 0.0305721964687109, 0.0454881526529789, -0.07673081010580063, -0.005483248736709356, 0.021021416410803795, 0.12040024995803833, -0.1178181916475296, 0.03752001374959946, -0.032140254974365234, -0.042303767055273056, -0.0628194659948349, 0.04364725202322006, 0.017558354884386063, -0.035024259239435196, 0.08270061761140823, 0.011890293098986149, -0.01231358852237463, -0.031471289694309235, 0.011562919244170189, 0.007907507941126823, -0.022718876600265503, -0.04969305545091629, -0.10740038007497787, -0.08155129849910736, 0.02719121240079403, 0.06769102811813354, -0.008777732960879803, 0.004115330055356026, -0.0186206866055727, 0.025614667683839798, 0.09740647673606873, 0.11173656582832336, 0.007741767913103104, 0.023915721103549004, 0.0183744877576828, -0.058274876326322556, -0.0498676672577858, -0.04594186693429947, 0.03387453779578209, -0.069486603140831, -0.061376672238111496, -0.008432325907051563, 0.04894563555717468, -0.00501229939982295, -0.023495670408010483, 0.035588592290878296, -0.04545588791370392, 0.04356687515974045, 0.028219012543559074, 0.0021837707608938217, -0.01587819494307041, -0.008051710203289986, 0.038694534450769424, 0.02800026535987854, 0.08460113406181335, 0.005781941115856171, -0.021726584061980247, -0.012752988375723362, -0.010600543580949306, 0.03781610727310181, -0.009197608567774296, 0.01299741305410862, -0.017966751009225845, -0.02007303759455681, -0.0504257008433342, 0.08392030745744705, -0.05821488797664642, 0.06912738084793091, -0.06454896181821823, -0.03430696204304695, 0.042216744273900986, -0.06546754390001297, -0.01998341828584671, -0.022200703620910645, 0.03172219544649124, -0.011298898607492447, -0.007516457699239254, 0.13672688603401184, 0.07379230856895447, -0.014872586354613304, 0.08451096713542938, 0.004494569264352322, -0.05480734258890152, 0.04036998376250267, -0.03206077590584755, -0.024678220972418785, 0.04612880200147629, -0.05871807411313057, 0.07059204578399658, 0.0741560161113739, -0.04384417459368706, 0.0054441820830106735, -0.05960076302289963, 0.0033340798690915108, 0.004752346780151129, -0.023967713117599487, 0.02043365314602852, 0.03856663033366203, 4.327921141862082e-33, 0.054165009409189224, 0.0502963550388813, -0.10139065235853195, -0.024042421951889992, 0.015702728182077408, -0.06704020500183105, 0.13305890560150146, -0.0009688939899206161, -0.01215649489313364, 0.04361354932188988, -0.02942323498427868, -0.015833325684070587, -0.032092757523059845, 0.012341325171291828, -0.016552740707993507, 0.004308396019041538, -0.018162891268730164, 0.04865469038486481, 0.09102661907672882, 0.0825994685292244, 0.004755096510052681, -0.06187490001320839, 0.03562347590923309, -0.04267684370279312, -0.04959524795413017, 0.09061676263809204, -0.02158491313457489, -0.0038171205669641495, 0.015610216185450554, 0.01382424682378769, 0.14309997856616974, -0.015667645260691643, -0.05827721208333969, 0.01729675754904747, 0.042804036289453506, -0.03198239207267761, 0.00219895807094872, -0.016128648072481155, -0.08130043745040894, 0.048770591616630554, 0.013460544869303703, -0.00899988878518343, -0.07572542876005173, -0.05081880837678909, 0.03580610826611519, 0.02332123927772045, -0.019588567316532135, -0.07912842184305191, 0.07746346294879913, 0.029434986412525177, -0.0714583471417427, -0.06527340412139893, -0.09938251227140427, 0.03166721761226654, 0.000013235041478765197, 0.0177912637591362, -0.02590286359190941, -0.014515487477183342, 0.04446546733379364, -0.05781427025794983, -0.10334820300340652, -0.03640953078866005, -0.03615473583340645, -0.04876139387488365, 0.009075998328626156, -0.020491164177656174, 0.02097274921834469, -0.04740229621529579, -0.01986260525882244, 0.04268741235136986, -0.05700044333934784, 0.001660606823861599, -0.026870200410485268, 0.02330894023180008, -0.11270739883184433, -0.00023378818877972662, -0.05019300431013107, 0.05304773524403572, -0.03871756047010422, -0.020126748830080032, 0.044219065457582474, 0.05104757472872734, -0.0398612804710865, 0.028233040124177933, 0.05119067057967186, 0.02501087822020054, 0.005773552227765322, 0.05794821307063103, -0.03525909408926964, 0.10925865173339844, -0.009615256451070309, -0.0021350858733057976, 0.014686677604913712, -0.058536212891340256, -0.042601872235536575, -5.487051876636954e-33, 0.008134860545396805, -0.043362412601709366, -0.04936964809894562, -0.015029553323984146, -0.02882467955350876, -0.01715817116200924, -0.02795923873782158, 0.07310376316308975, 0.015080315060913563, 0.0498640239238739, 0.0525926798582077, -0.01702885888516903, 0.078884556889534, -0.007415603846311569, 0.02472369186580181, -0.001541466568596661, -0.09201414883136749, -0.03467458859086037, -0.04831816256046295, 0.06364782899618149, -0.032132964581251144, 0.05600551888346672, -0.03066052496433258, -0.04220477119088173, 0.012640755623579025, 0.00826762244105339, 0.011689664795994759, 0.00017774188017938286, -0.021043695509433746, -0.03878120705485344, -0.0025931773707270622, -0.00285483174957335, -0.07536748796701431, -0.02567189745604992, -0.006082731764763594, 0.09054528921842575, -0.011507823131978512, 0.08457622677087784, -0.027128757908940315, 0.06027302145957947, 0.05099806562066078, -0.07862411439418793, -0.10225486010313034, -0.057120904326438904, -0.002027312060818076, 0.06798604130744934, -0.014614580199122429, 0.07959575951099396, -0.10498436540365219, -0.012978559359908104, 0.06475870311260223, -0.008348315954208374, -0.09450262039899826, -0.018336839973926544, -0.001923699164763093, 0.04566880315542221, 0.1442469209432602, -0.026950664818286896, -0.011663413606584072, 0.031940191984176636, 0.06627634167671204, -0.10882999747991562, 0.03862575441598892, 0.029148036614060402, 0.011404844932258129, -0.024411795660853386, -0.0140769574791193, 0.030692223459482193, -0.04845008626580238, 0.04182560741901398, -0.15474210679531097, -0.037833571434020996, 0.01910724863409996, -0.008225017227232456, 0.042143333703279495, -0.03771120682358742, -0.08717697858810425, 0.06415049731731415, 0.033062469214200974, 0.05313040688633919, 0.0033090512733906507, 0.10346924513578415, 0.10371231287717819, -0.03240274265408516, 0.08339627087116241, 0.0079101687297225, 0.0704985037446022, 0.10224360227584839, -0.017877649515867233, 0.015388237312436104, -0.050844237208366394, -0.002660683821886778, -0.0025557775516062975, -0.02207556739449501, -0.025850810110569, -5.163734329016734e-8, -0.05971449986100197, 0.0012363126734271646, -0.028782827779650688, 0.03412269800901413, -0.05683876574039459, 0.065577931702137, -0.0024492505472153425, -0.01626889780163765, 0.06622451543807983, 0.025098996236920357, -0.017339516431093216, 0.05320579931139946, -0.08421335369348526, 0.054893530905246735, -0.0990288108587265, -0.012258622795343399, -0.015270775184035301, -0.02224724367260933, 0.053613174706697464, -0.05890180915594101, -0.0008609560900367796, -0.03933935612440109, 0.03209355100989342, -0.03904888406395912, 0.04145084694027901, -0.023451777175068855, -0.0588134340941906, 0.020102612674236298, -0.007515865843743086, -0.06353115290403366, -0.022574307397007942, -0.006269244477152824, 0.05273249000310898, -0.06788230687379837, -0.049958501011133194, 0.004535821732133627, 0.03343217819929123, -0.011034470051527023, -0.037675391882658005, -0.07173170894384384, 0.07722214609384537, 0.018504483625292778, -0.013865468092262745, -0.09478316456079483, 0.06454960256814957, 0.08312904089689255, 0.026910489425063133, -0.058540742844343185, 0.050531838089227676, 0.037119876593351364, -0.07438059151172638, -0.07755080610513687, 0.07594358921051025, 0.03876114636659622, -0.03666990250349045, -0.030130993574857712, -0.11299880594015121, -0.07917965203523636, -0.08046216517686844, 0.0549628809094429, 0.07548937201499939, 0.03209027647972107, 0.013559049926698208, -0.008620811626315117 ]
0.084251
## Overview [Onyx](http://onyx.app/) is a self-hostable Chat UI that integrates with all Ollama models. Features include: - Creating custom Agents - Web search - Deep Research - RAG over uploaded documents and connected apps - Connectors to applications like Google Drive, Email, Slack, etc. - MCP and OpenAPI Actions support - Image generation - User/Groups management, RBAC, SSO, etc. Onyx can be deployed for single users or large organizations. ## Install Onyx Deploy Onyx with the [quickstart guide](https://docs.onyx.app/deployment/getting\_started/quickstart). Resourcing/scaling docs [here](https://docs.onyx.app/deployment/getting\_started/resourcing). ## Usage with Ollama 1. Login to your Onyx deployment (create an account first).2. In the set-up process select `Ollama` as the LLM provider.3. Provide your \*\*Ollama API URL\*\* and select your models. If you're running Onyx in Docker, to access your computer's local network use `http://host.docker.internal` instead of `http://127.0.0.1`.You can also easily connect up Onyx Cloud with the `Ollama Cloud` tab of the setup. ## Send your first query
https://github.com/ollama/ollama/blob/main//docs/integrations/onyx.mdx
main
ollama
[ -0.0641019195318222, -0.02595948986709118, -0.04358317703008652, 0.04094063863158226, 0.06311766803264618, -0.1317848116159439, -0.01078970916569233, 0.036852963268756866, -0.004240464419126511, -0.01868388056755066, 0.03197268769145012, 0.058095332235097885, 0.02608352340757847, 0.00664580799639225, 0.08607509732246399, 0.06858460605144501, 0.0833120122551918, -0.06059744209051132, -0.04492426663637161, 0.018107039853930473, 0.06721135973930359, -0.007195685524493456, 0.09163027256727219, 0.015056902542710304, -0.011106866411864758, -0.07375986874103546, -0.002255924278870225, 0.011530428193509579, -0.01377253420650959, -0.0398830808699131, 0.03889269754290581, 0.02249777875840664, 0.005191965028643608, 0.042979925870895386, -0.025670230388641357, 0.09730825573205948, 0.022065574303269386, -0.037823233753442764, -0.13299189507961273, -0.001116971136070788, -0.01797119900584221, -0.05387956649065018, -0.04184175655245781, -0.025489311665296555, 0.022713663056492805, -0.14811575412750244, -0.051018260419368744, -0.0019353622337803245, 0.021503493189811707, 0.07649415731430054, -0.06859055906534195, -0.11674061417579651, 0.008071677759289742, 0.05742661654949188, -0.037508074194192886, 0.09085146337747574, -0.06208337843418121, -0.047444503754377365, 0.020765285938978195, -0.00802556611597538, 0.02437499724328518, 0.022006966173648834, -0.01620406098663807, 0.08050043135881424, -0.06129629164934158, 0.0571989007294178, 0.008075464516878128, -0.03795713558793068, -0.03550974652171135, -0.09270741790533066, 0.019239667803049088, -0.03914903849363327, 0.013331816531717777, -0.024291343986988068, 0.02098746970295906, -0.012418384663760662, 0.05523030832409859, 0.019214868545532227, -0.0003720202948898077, 0.0172660481184721, 0.035045936703681946, 0.011546229012310505, -0.0013330248184502125, 0.07360002398490906, -0.03249340131878853, 0.023089060559868813, 0.03645569458603859, 0.025367919355630875, 0.04483572393655777, -0.03491964191198349, 0.03623110428452492, 0.04147477447986603, -0.013301237486302853, -0.006046019494533539, 0.054052650928497314, -0.04911431670188904, 0.040877565741539, -0.012899198569357395, 0.0005394956679083407, 0.07872425764799118, -0.017261754721403122, -0.0628298744559288, 0.01968066580593586, 0.004880683030933142, -0.0569927804172039, -0.004971662536263466, 0.09154371172189713, 0.013458989560604095, -0.04235564544796944, 0.04957859218120575, 0.02486974187195301, -0.11765804141759872, 0.023327946662902832, -0.03888760879635811, 0.04567409306764603, 0.03145616129040718, -0.07460258901119232, 0.025340957567095757, 0.04887130856513977, 0.012768172658979893, 0.06971795111894608, 0.018397219479084015, -0.00936904363334179, -0.019546212628483772, 0.09327301383018494, 0.16393603384494781, -0.07886474579572678, 3.6203040320517895e-33, 0.07454318553209305, 0.07366938889026642, -0.038599446415901184, 0.062063541263341904, -0.005575265735387802, 0.017628729343414307, 0.06362945586442947, -0.0440375953912735, -0.11032959818840027, -0.05235087499022484, -0.01281216274946928, 0.12884044647216797, -0.08419619500637054, 0.05290229991078377, 0.06953229755163193, -0.07961931079626083, 0.004796719644218683, 0.05935773625969887, 0.11074892431497574, 0.017975904047489166, -0.01733466610312462, -0.011330384761095047, -0.013907985761761665, 0.05393560975790024, 0.044301752001047134, 0.07988350093364716, -0.0108612310141325, -0.030878812074661255, 0.015964310616254807, 0.012606058269739151, 0.08383575081825256, -0.033123381435871124, -0.04013243317604065, -0.023914184421300888, -0.0051755099557340145, 0.013576557859778404, -0.1526557356119156, -0.0298338420689106, -0.04993622004985809, 0.010698558762669563, -0.09668887406587601, 0.03159410506486893, -0.03167598694562912, -0.09955757111310959, -0.06851361691951752, 0.004111784044653177, -0.03941187262535095, 0.010477263480424881, 0.12013233453035355, -0.08003084361553192, -0.011125067248940468, 0.0002081055863527581, -0.04258829727768898, 0.024397453293204308, -0.023816270753741264, -0.06729105859994888, -0.010951843112707138, -0.06280117481946945, 0.09725270420312881, -0.04097512736916542, -0.07977502048015594, -0.05192391574382782, 0.0022452534176409245, 0.0029807817190885544, -0.0019242423586547375, -0.05901206284761429, 0.03169810026884079, -0.015624632127583027, -0.04661668464541435, -0.02880251035094261, 0.019478270784020424, 0.001367309712804854, 0.012380213476717472, 0.021526414901018143, -0.01674232818186283, -0.03247174620628357, -0.024785149842500687, -0.03177141770720482, -0.01693715713918209, 0.04849821329116821, -0.05365454778075218, -0.03061894327402115, -0.0283669363707304, 0.036110155284404755, 0.036974918097257614, -0.07620331645011902, 0.05137377232313156, 0.012039185501635075, -0.002637570258229971, 0.06455427408218384, -0.034742724150419235, -0.006644292734563351, -0.02989671565592289, -0.01601872593164444, -0.02152341604232788, -2.001928041890797e-33, -0.026586847379803658, -0.06238992512226105, 0.008159185759723186, 0.0503091923892498, 0.08716224133968353, 0.006523950956761837, 0.05542834848165512, 0.09335365891456604, -0.028817808255553246, 0.00959396455436945, -0.0058914851397275925, 0.016574349254369736, -0.017440631985664368, -0.03517890349030495, -0.028663691133260727, -0.023861156776547432, -0.019772205501794815, -0.052299343049526215, 0.013838522136211395, 0.033358536660671234, 0.004733856301754713, 0.021984536200761795, -0.002334773074835539, 0.023070815950632095, 0.04910747706890106, 0.02272029221057892, -0.008326543495059013, -0.01438337005674839, -0.06320775300264359, -0.031168531626462936, -0.015042451210319996, -0.006801033392548561, -0.05180777981877327, 0.004437354393303394, 0.03917316719889641, 0.11142391711473465, 0.005971753969788551, 0.027743620797991753, -0.030190909281373024, -0.01269568596035242, 0.03635372593998909, -0.09619275480508804, -0.07106231898069382, -0.05942205712199211, -0.0031140909995883703, 0.05391167849302292, -0.0649714395403862, 0.056096889078617096, -0.07163077592849731, -0.031518206000328064, 0.013573133386671543, 0.04025857895612717, 0.04488952085375786, -0.06218996271491051, 0.03005736880004406, -0.00835717748850584, 0.057380206882953644, -0.032661471515893936, -0.008429831825196743, -0.02941792830824852, 0.06405455619096756, -0.08130928128957748, -0.0027480944991111755, 0.03461063653230667, -0.08099525421857834, -0.03043127804994583, -0.011598157696425915, 0.04460792616009712, -0.08578529208898544, 0.0375845730304718, -0.12596887350082397, -0.06856562942266464, 0.022685658186674118, 0.002654885407537222, 0.017746465280652046, -0.025123465806245804, -0.02488546259701252, -0.048568062484264374, 0.06653328239917755, -0.02671807073056698, -0.04550627991557121, 0.007051823195070028, 0.0909854993224144, 0.05938847362995148, 0.08408034592866898, 0.008731454610824585, 0.10869540274143219, 0.0708564966917038, 0.007375218439847231, 0.03828924894332886, -0.09375355392694473, 0.041020337492227554, -0.00510319322347641, 0.07254558801651001, 0.017217174172401428, -4.9559119474906765e-8, -0.06055188924074173, -0.035590384155511856, 0.022149043157696724, 0.014552070759236813, -0.03185630962252617, -0.04419258236885071, 0.06556124240159988, 0.07691136747598648, 0.05501040816307068, 0.09000091254711151, 0.007961085066199303, 0.024478891864418983, -0.03254791349172592, 0.014066027477383614, -0.011383818462491035, 0.060637153685092926, 0.04165344685316086, 0.04362279549241066, -0.008779609575867653, -0.12090165913105011, 0.0644587054848671, 0.04342815652489662, 0.006933566182851791, 0.035463109612464905, 0.057153183966875076, -0.025789083912968636, -0.07111368328332901, 0.06792649626731873, -0.04371707886457443, -0.0640912801027298, -0.014205370098352432, -0.004660107661038637, 0.027561834082007408, -0.006998958066105843, 0.011134491302073002, -0.012202724814414978, -0.06729934364557266, 0.03254523500800133, 0.016079828143119812, -0.05345146730542183, 0.003518342040479183, 0.015605519525706768, 0.030495990067720413, -0.08749086409807205, 0.04967843368649483, 0.025423726066946983, -0.06105892360210419, -0.09312716126441956, 0.0012486553750932217, 0.033672042191028595, -0.0743020623922348, -0.08767817914485931, 0.07639122754335403, 0.051819417625665665, 0.04127848520874977, -0.0706968754529953, 0.08290239423513412, 0.051716022193431854, 0.05095912143588066, 0.03956877440214157, 0.03596583381295204, 0.01501503773033619, 0.016942720860242844, 0.009678786620497704 ]
0.09382
## Install Install [n8n](https://docs.n8n.io/choose-n8n/). ## Using Ollama Locally 1. In the top right corner, click the dropdown and select \*\*Create Credential\*\*2. Under \*\*Add new credential\*\* select \*\*Ollama\*\*3. Confirm Base URL is set to `http://localhost:11434` if running locally or `http://host.docker.internal:11434` if running through docker and click \*\*Save\*\* In environments that don't use Docker Desktop (ie, Linux server installations), `host.docker.internal` is not automatically added. Run n8n in docker with `--add-host=host.docker.internal:host-gateway` or add the following to a docker compose file: ```yaml extra\_hosts: - "host.docker.internal:host-gateway" ``` You should see a `Connection tested successfully` message. 4. When creating a new workflow, select \*\*Add a first step\*\* and select an \*\*Ollama node\*\*5. Select your model of choice (e.g. `qwen3-coder`)## Connecting to ollama.com 1. Create an [API key](https://ollama.com/settings/keys) on \*\*ollama.com\*\*. 2. In n8n, click \*\*Create Credential\*\* and select \*\*Ollama\*\* 4. Set the \*\*API URL\*\* to `https://ollama.com` 5. Enter your \*\*API Key\*\* and click \*\*Save\*\*
https://github.com/ollama/ollama/blob/main//docs/integrations/n8n.mdx
main
ollama
[ -0.02965305559337139, 0.04242273047566414, 0.00785280205309391, 0.001028086873702705, -0.05232391878962517, -0.11585067957639694, -0.08425269275903702, 0.017490634694695473, 0.012829344719648361, 0.00009033867536345497, -0.017711259424686432, -0.06987282633781433, -0.04042070731520653, 0.016456691548228264, 0.030708134174346924, 0.043254703283309937, 0.07991456985473633, -0.013273647055029869, 0.014435889199376106, 0.03480110689997673, -0.03522736579179764, 0.02981352061033249, 0.07515858858823776, -0.0366898849606514, -0.010413462296128273, -0.07428375631570816, -0.006662192288786173, 0.018626242876052856, 0.017427576705813408, -0.032596345990896225, 0.06605537980794907, -0.02023032307624817, 0.012100682593882084, -0.013228221796452999, 0.112615667283535, 0.03260045498609543, 0.05144037678837776, 0.014609057456254959, -0.08712223172187805, -0.015690971165895462, 0.12995053827762604, -0.013299386948347092, -0.03713073953986168, -0.030830219388008118, -0.009068398736417294, -0.06926947087049484, 0.02063899300992489, -0.07398564368486404, 0.013580492697656155, 0.07482048869132996, -0.08555296063423157, -0.05734297260642052, 0.022244151681661606, 0.005963888484984636, 0.035782963037490845, 0.08035413175821304, -0.009298693388700485, 0.02567964792251587, 0.010698838159441948, 0.032865338027477264, 0.06061553955078125, 0.00118367956019938, -0.006217595189809799, 0.002676909090951085, 0.02908891625702381, -0.016345977783203125, -0.006220005918294191, -0.011861227452754974, -0.029371915385127068, 0.03910788521170616, 0.06608346104621887, 0.08663704991340637, -0.049762286245822906, -0.03681468591094017, -0.02353452332317829, 0.014827989041805267, 0.05885382741689682, 0.05103340372443199, -0.04919568449258804, 0.06305736303329468, 0.02891666628420353, 0.03102142922580242, -0.016135726124048233, -0.013739043846726418, -0.002819390967488289, -0.04703499376773834, -0.07295068353414536, -0.012501724995672703, 0.11567030847072601, -0.05191851779818535, 0.01274941023439169, -0.05952242761850357, -0.03635299205780029, -0.06465384364128113, 0.09287663549184799, -0.047734327614307404, -0.03637462109327316, 0.02481989376246929, -0.023610733449459076, 0.024167882278561592, 0.0020196407567709684, -0.05194832757115364, -0.03251432254910469, 0.05320911854505539, -0.0058443425223231316, 0.055707257241010666, 0.10002545267343521, 0.03826858848333359, 0.009392994455993176, 0.006349014583975077, 0.017702244222164154, -0.13450036942958832, 0.03645288944244385, 0.036812007427215576, -0.0480479970574379, 0.027823807671666145, -0.08995909243822098, -0.029063135385513306, -0.004699007607996464, -0.02371617592871189, -0.01649637520313263, -0.07936041802167892, 0.07261885702610016, -0.047226469963788986, -0.029910681769251823, 0.11942093819379807, -0.028910355642437935, 4.9295204161717126e-33, 0.08546232432126999, -0.021399466320872307, 0.014180244877934456, 0.01972421444952488, 0.1416427046060562, -0.010611100122332573, 0.0502716563642025, -0.0772685632109642, -0.03705392777919769, -0.03499410301446915, -0.03788072615861893, 0.0088608767837286, 0.018782295286655426, -0.0006006723269820213, -0.004981652833521366, 0.008341703563928604, -0.005246581509709358, 0.020252035930752754, 0.041422635316848755, 0.06759767979383469, 0.020284680649638176, -0.0526052862405777, 0.0029822182841598988, -0.010186288505792618, -0.03998880088329315, -0.04438743367791176, -0.016863292083144188, -0.03418706730008125, 0.02340165339410305, -0.016557849943637848, 0.10644515603780746, -0.03945603966712952, -0.013193297199904919, -0.014580024406313896, 0.04116513952612877, -0.04145672172307968, -0.014012318104505539, 0.04127927124500275, -0.10541114211082458, 0.027147427201271057, -0.009881813079118729, -0.018223177641630173, -0.016609258949756622, 0.03199051320552826, -0.003409809898585081, -0.0939067080616951, -0.05415980517864227, -0.014483390375971794, 0.11978337913751602, 0.08348172903060913, -0.04238006845116615, -0.07613317668437958, -0.078068807721138, -0.02712317928671837, 0.03497876971960068, 0.006561592686921358, -0.05369972437620163, -0.02699698694050312, 0.040662121027708054, -0.10630584508180618, -0.09218578785657883, -0.01155973318964243, -0.027112852782011032, -0.06927919387817383, 0.02409294620156288, 0.05002480000257492, -0.005261832382529974, 0.08761492371559143, 0.014948368072509766, 0.028046678751707077, -0.03843263164162636, 0.012603241950273514, -0.06011549383401871, 0.11726532131433487, -0.004908841103315353, -0.04368755966424942, -0.02701738476753235, 0.006758775096386671, 0.02940100058913231, 0.040756355971097946, 0.03703731670975685, 0.034217458218336105, -0.029453599825501442, 0.06269578635692596, -0.005592330824583769, -0.05132489651441574, 0.0697336494922638, 0.09713844209909439, 0.03543746471405029, 0.01746377721428871, 0.12480676919221878, 0.04468706622719765, -0.020317524671554565, -0.0033795528579503298, -0.08796390146017075, -6.611443079925181e-33, 0.005700596608221531, 0.00503171980381012, -0.06037379801273346, 0.003173285163938999, -0.02459709346294403, 0.04088524729013443, 0.03739294782280922, 0.015207139775156975, -0.024295825511217117, -0.061711542308330536, 0.018346866592764854, 0.08485912531614304, 0.12231618911027908, 0.00014749777619726956, 0.0066463234834373, -0.02037908136844635, -0.07757765799760818, 0.04028966277837753, 0.009545251727104187, -0.04802713915705681, 0.025410005822777748, -0.013977148570120335, -0.02742318995296955, 0.07299312204122543, -0.04973139986395836, -0.0259848702698946, 0.03781978040933609, -0.011351200751960278, -0.10104823857545853, -0.022107914090156555, 0.0042147887870669365, 0.11331480741500854, -0.06549817323684692, 0.08223468065261841, 0.023959849029779434, 0.11442550271749496, 0.0315677709877491, 0.05290701985359192, -0.06490589678287506, -0.0658913254737854, 0.061748042702674866, -0.06403469294309616, -0.021276429295539856, 0.001951803220435977, -0.1174246221780777, -0.015243315137922764, -0.01355966366827488, -0.011142093688249588, -0.15108032524585724, 0.07884321361780167, -0.01567988470196724, -0.043220993131399155, 0.036317128688097, 0.023045891895890236, 0.05880090594291687, 0.041971467435359955, 0.00407757144421339, 0.0071197091601789, -0.005844125524163246, 0.05640831217169762, 0.11858247965574265, -0.07504770904779434, 0.012200376950204372, 0.06054572016000748, -0.072265625, -0.010623223148286343, -0.0658753290772438, 0.09615350514650345, -0.0229953620582819, 0.0043906401842832565, -0.1029457151889801, -0.06821074336767197, 0.022730931639671326, 0.03624916821718216, 0.034970611333847046, -0.006273740436881781, -0.08365358412265778, -0.02550637535750866, 0.007220632862299681, 0.033825915306806564, -0.04786126688122749, -0.015631845220923424, 0.02146606706082821, -0.11796914786100388, -0.02354448102414608, -0.0078025818802416325, 0.11734101176261902, 0.06293236464262009, 0.022305523976683617, 0.029485471546649933, 0.020162226632237434, -0.08127253502607346, -0.08685450255870819, 0.040657978504896164, 0.0422867015004158, -5.401615510436386e-8, 0.025889050215482712, -0.030482599511742592, -0.007797709200531244, -0.009370182640850544, 0.012358268722891808, -0.021904874593019485, 0.04427378624677658, -0.027747662737965584, -0.04848302900791168, 0.04147094860672951, -0.0007960784714668989, 0.016560843214392662, -0.07352951169013977, -0.010208542458713055, -0.04510791599750519, 0.06603331118822098, 0.024920346215367317, 0.02819042280316353, 0.010651097632944584, -0.07567273825407028, -0.024773843586444855, -0.03834494575858116, 0.01687459833920002, 0.001741045736707747, -0.022601449862122536, -0.015425474382936954, -0.025694631040096283, 0.024900633841753006, -0.03721456974744797, -0.08417271822690964, -0.026207055896520615, -0.005709617864340544, -0.01810952089726925, -0.04918380826711655, -0.0634097307920456, 0.04863635450601578, -0.0003890542720910162, -0.0031841141171753407, -0.029491767287254333, -0.07372628152370453, -0.03249969705939293, -0.01137740071862936, 0.04985518008470535, -0.12267085909843445, -0.01614893600344658, 0.03216111660003662, 0.06144963949918747, 0.06732054054737091, -0.06303577125072479, 0.027726035565137863, 0.03527249023318291, -0.09845699369907379, 0.06256666779518127, -0.01407465711236, 0.03599284589290619, -0.023276209831237793, -0.07543883472681046, -0.0029977255035191774, -0.017021024599671364, 0.012311315163969994, 0.046035777777433395, 0.02083689719438553, 0.05048307031393051, -0.010000385344028473 ]
0.013948
OpenClaw is a personal AI assistant that runs on your own devices. It bridges messaging services (WhatsApp, Telegram, Slack, Discord, iMessage, and more) to AI coding agents through a centralized gateway. ## Install Install [OpenClaw](https://openclaw.ai/) ```bash npm install -g openclaw@latest ``` Then run the onboarding wizard: ```bash openclaw onboard --install-daemon ``` OpenClaw requires a larger context window. It is recommended to use a context window of at least 64k tokens. See [Context length](/context-length) for more information. ## Usage with Ollama ### Quick setup ```bash ollama launch openclaw ``` Previously known as Clawdbot. `ollama launch clawdbot` still works as an alias. This configures OpenClaw to use Ollama and starts the gateway. If the gateway is already running, no changes need to be made as the gateway will auto-reload the changes. To configure without launching: ```shell ollama launch openclaw --config ``` ## Recommended Models - `qwen3-coder` - `glm-4.7` - `gpt-oss:20b` - `gpt-oss:120b` Cloud models are also available at [ollama.com/search?c=cloud](https://ollama.com/search?c=cloud).
https://github.com/ollama/ollama/blob/main//docs/integrations/openclaw.mdx
main
ollama
[ -0.033459167927503586, -0.029750850051641464, -0.07397385686635971, 0.020797710865736008, -0.036590591073036194, -0.12663677334785461, -0.027654265984892845, 0.07457192242145538, -0.013643329963088036, -0.005376892630010843, -0.011881379410624504, -0.006398427300155163, 0.010238967835903168, -0.013546324335038662, 0.08438337594270706, 0.144570991396904, 0.10004033148288727, -0.11849602311849594, 0.012707510963082314, 0.010801429860293865, 0.023035617545247078, 0.03429132699966431, 0.024970395490527153, -0.06211811304092407, -0.07029691338539124, -0.03727303445339203, -0.012097258120775223, 0.013135742396116257, -0.02821236476302147, -0.02478569559752941, 0.09011635184288025, 0.02655775472521782, 0.0003663579700514674, 0.020679766312241554, 0.036469899117946625, 0.0747557282447815, 0.010340692475438118, -0.02957192063331604, -0.08792838454246521, -0.033530570566654205, 0.07052642107009888, 0.022094441577792168, -0.0686192736029625, -0.04539813846349716, -0.02415549010038376, -0.04395660385489464, -0.05194294452667236, -0.0699615478515625, 0.03087657317519188, 0.015613673254847527, -0.07400772720575333, -0.10391084849834442, -0.022184006869792938, -0.05534208565950394, 0.015392118133604527, 0.04419461637735367, 0.0007226181332953274, 0.003908033017069101, 0.04776917025446892, -0.02386685460805893, 0.04806472361087799, 0.014797354117035866, 0.010989476926624775, 0.06857406347990036, -0.07232349365949631, -0.00034101729397661984, -0.0343727245926857, -0.07295957207679749, -0.00243651052005589, -0.04572584480047226, 0.009983724914491177, 0.015686694532632828, -0.0053386143408715725, -0.011035149917006493, -0.05996094271540642, -0.04238900914788246, 0.07616332918405533, 0.0303800106048584, -0.01367779728025198, -0.036786120384931564, -0.08670556545257568, 0.03181148320436478, -0.08659117668867111, 0.03598960116505623, 0.017100084573030472, 0.12916173040866852, 0.015393659472465515, 0.03798183426260948, 0.05645797774195671, 0.02516389824450016, 0.008824271149933338, -0.09560886025428772, -0.0007839306490495801, -0.03121131844818592, 0.06630163639783859, -0.028390729799866676, 0.01308591477572918, -0.028908174484968185, -0.09990368038415909, 0.08564499765634537, -0.008405876345932484, -0.04653944820165634, 0.039779990911483765, 0.03443866968154907, -0.09494023025035858, 0.04608866199851036, 0.05456451326608658, 0.034706223756074905, 0.004604569170624018, -0.007794173434376717, 0.007877654395997524, -0.09123454242944717, 0.12304289638996124, -0.04934382066130638, -0.03536645323038101, 0.06296481937170029, -0.05949949473142624, -0.015179671347141266, 0.08661571145057678, 0.08373767882585526, 0.07387711852788925, -0.0187313724309206, 0.05985690653324127, 0.019678113982081413, 0.07997603714466095, 0.10079740732908249, 0.05879722163081169, 4.403848158691617e-33, 0.03834548592567444, -0.033162180334329605, -0.05361661687493324, -0.007486347109079361, 0.10807772725820541, 0.05321437120437622, 0.04245901480317116, 0.008382829837501049, -0.06664960831403732, 0.050563838332891464, -0.04642047733068466, 0.09313395619392395, -0.021355040371418, -0.004928551614284515, 0.05663148686289787, -0.03861617296934128, -0.019309014081954956, 0.04526693746447563, 0.0548945851624012, -0.03504658117890358, 0.06410064548254013, -0.11616165935993195, -0.034551676362752914, 0.043674565851688385, 0.05894003063440323, 0.007235008291900158, -0.020024973899126053, -0.03959014266729355, 0.04535656049847603, 0.05429133027791977, 0.017317773774266243, 0.007897349074482918, -0.09580232203006744, -0.016604648903012276, -0.023538174107670784, -0.041556403040885925, -0.14114947617053986, -0.08202497661113739, -0.045513857156038284, 0.005357722751796246, -0.00177124107722193, 0.017568035051226616, -0.020136214792728424, -0.038584087044000626, -0.008142785169184208, -0.08557375520467758, -0.02242138795554638, 0.054740313440561295, 0.014070035889744759, 0.007330094464123249, -0.012861812487244606, 0.004538692533969879, 0.07112473249435425, -0.027100084349513054, -0.047939058393239975, -0.048153094947338104, -0.022237669676542282, -0.08026783168315887, 0.0663411095738411, -0.01200540829449892, -0.07161881029605865, 0.001456612255424261, -0.018635932356119156, 0.07376453280448914, -0.011656804010272026, -0.02088923007249832, 0.04273488372564316, 0.059408534318208694, 0.0016610872698947787, 0.013417180627584457, -0.01942160353064537, -0.032408591359853745, -0.043907880783081055, 0.07140445709228516, -0.07106903195381165, -0.008380336686968803, -0.005448703188449144, -0.03108084201812744, 0.019786404445767403, -0.016357706859707832, 0.04063175991177559, 0.02824435383081436, -0.019051792100071907, 0.022915128618478775, 0.10134298354387283, -0.020312462002038956, 0.009784504771232605, -0.0864238515496254, -0.06268714368343353, 0.09233035892248154, -0.06441853940486908, 0.0011538037797436118, -0.04335058480501175, 0.035116810351610184, -0.0055571263656020164, -4.355793582288017e-33, 0.018193943426012993, -0.01595320925116539, 0.005888141226023436, -0.008433522656559944, 0.00937441736459732, 0.026929447427392006, 0.03905943036079407, -0.058600857853889465, -0.050696659833192825, -0.031948428601026535, -0.062059469521045685, 0.08059698343276978, 0.0750824585556984, -0.013158123008906841, 0.06824235618114471, -0.035802002996206284, -0.04579722136259079, -0.0005593718960881233, 0.02459917776286602, 0.03517600893974304, -0.025799978524446487, -0.015317394398152828, -0.013578507117927074, -0.030464857816696167, 0.0863339900970459, 0.032307978719472885, 0.006899140775203705, 0.024689096957445145, -0.0523507297039032, -0.0018936402630060911, 0.002077740617096424, 0.0747816190123558, -0.04529225826263428, 0.003663355018943548, -0.03826018422842026, 0.08953559398651123, 0.012063941918313503, 0.020414184778928757, 0.012791582383215427, -0.014392648823559284, 0.11919409036636353, -0.004699464421719313, -0.061171479523181915, -0.023442639037966728, -0.05468757450580597, 0.049457430839538574, -0.03286881744861603, -0.017223652452230453, -0.14278411865234375, -0.019818859174847603, -0.04926595836877823, 0.027014726772904396, 0.02049093507230282, 0.002801275812089443, -0.0035695950500667095, 0.0032486736308783293, 0.05311770737171173, -0.02078736200928688, -0.04665388539433479, -0.07755009829998016, 0.0839242935180664, -0.08326406031847, 0.03642689809203148, 0.04371625930070877, -0.05008582025766373, -0.05884164571762085, 0.012581076472997665, 0.08554665744304657, -0.09743323922157288, -0.061826370656490326, -0.04412458837032318, -0.08579055964946747, 0.0010364443296566606, -0.005232684314250946, -0.025727510452270508, 0.023748211562633514, -0.008762065321207047, -0.10995220392942429, 0.0036224178038537502, -0.006122516468167305, -0.01152808964252472, -0.037735920399427414, 0.0689551830291748, -0.03344244882464409, -0.009044211357831955, 0.011645285412669182, 0.02732117287814617, 0.1019776314496994, 0.04784014821052551, 0.10062577575445175, -0.08626328408718109, 0.017183715477585793, 0.02237362042069435, 0.04108510911464691, -0.00705173471942544, -5.301442840277559e-8, -0.04988487437367439, -0.009810288436710835, 0.022890504449605942, 0.027800126001238823, -0.003446631832048297, -0.057733386754989624, 0.005715393461287022, 0.0007495216559618711, -0.03213227912783623, -0.008088854141533375, 0.11896035075187683, 0.011860653758049011, -0.06975500285625458, 0.04722139239311218, -0.009960008785128593, 0.14816461503505707, 0.01296759769320488, -0.03277850151062012, 0.007350699510425329, -0.06307342648506165, 0.03259093314409256, 0.026185167953372, 0.03066887892782688, 0.05870825797319412, -0.05978285148739815, -0.0815400704741478, -0.03257907181978226, 0.005465674679726362, -0.034153200685977936, -0.013272516429424286, -0.037840139120817184, 0.004526159260421991, 0.0749688521027565, -0.00547737767919898, -0.04695739224553108, 0.04363756626844406, -0.022531181573867798, 0.03004433587193489, 0.0014082997804507613, -0.0536503829061985, 0.05428451672196388, 0.03137318417429924, 0.012107831425964832, -0.10267350822687149, -0.06089894101023674, 0.05896364897489548, -0.020758815109729767, -0.052528027445077896, -0.010424236766994, -0.014955168589949608, 0.007254524622112513, 0.019737916067242622, 0.03335458040237427, 0.09900915622711182, 0.070233553647995, 0.037274401634931564, 0.022717533633112907, -0.05458032712340355, 0.00914187915623188, 0.059586506336927414, -0.02608591690659523, 0.01009254902601242, 0.06284531950950623, -0.04598386958241463 ]
0.140337
## Install Install the [Codex CLI](https://developers.openai.com/codex/cli/): ``` npm install -g @openai/codex ``` ## Usage with Ollama Codex requires a larger context window. It is recommended to use a context window of at least 64k tokens. ### Quick setup ``` ollama launch codex ``` To configure without launching: ```shell ollama launch codex --config ``` ### Manual setup To use `codex` with Ollama, use the `--oss` flag: ``` codex --oss ``` ### Changing Models By default, codex will use the local `gpt-oss:20b` model. However, you can specify a different model with the `-m` flag: ``` codex --oss -m gpt-oss:120b ``` ### Cloud Models ``` codex --oss -m gpt-oss:120b-cloud ``` ## Connecting to ollama.com Create an [API key](https://ollama.com/settings/keys) from ollama.com and export it as `OLLAMA\_API\_KEY`. To use ollama.com directly, edit your `~/.codex/config.toml` file to point to ollama.com. ```toml model = "gpt-oss:120b" model\_provider = "ollama" [model\_providers.ollama] name = "Ollama" base\_url = "https://ollama.com/v1" env\_key = "OLLAMA\_API\_KEY" ``` Run `codex` in a new terminal to load the new settings.
https://github.com/ollama/ollama/blob/main//docs/integrations/codex.mdx
main
ollama
[ -0.038160692900419235, -0.027887308970093727, -0.06273896247148514, 0.017129071056842804, 0.016050545498728752, -0.10051234066486359, -0.057590022683143616, 0.07217094302177429, 0.012794909998774529, -0.0094937514513731, -0.005841099191457033, -0.030467335134744644, -0.03443796932697296, 0.0036361475940793753, 0.12492381781339645, 0.05493254214525223, 0.049007728695869446, -0.02404521219432354, -0.024282041937112808, 0.05073314905166626, 0.0688839703798294, 0.0603577084839344, 0.04710158333182335, -0.008158464916050434, -0.07207082211971283, -0.012155267409980297, -0.029873410239815712, 0.02539832517504692, 0.017726782709360123, -0.006884812843054533, 0.05985885486006737, 0.021662428975105286, 0.011884503997862339, 0.004741367883980274, 0.08812278509140015, 0.023772630840539932, 0.0002607348433230072, -0.10624217242002487, -0.09333872050046921, -0.03450725972652435, 0.11279764771461487, 0.041491176933050156, -0.09474794566631317, -0.028374899178743362, 0.01712118834257126, -0.07514806091785431, 0.015376810915768147, -0.05660388246178627, 0.022919565439224243, -0.053871262818574905, -0.06425604224205017, -0.1179291158914566, -0.021790819242596626, -0.02193145453929901, 0.03878320753574371, 0.09770148992538452, -0.046642668545246124, -0.05669296160340309, 0.05196971073746681, -0.005567400250583887, 0.013840528205037117, 0.01908152550458908, -0.06668240576982498, 0.052572280168533325, -0.019337255507707596, 0.06390060484409332, 0.011089848354458809, -0.03272523358464241, 0.02103216014802456, -0.021161025390028954, 0.04651632905006409, 0.030459383502602577, 0.013624090701341629, -0.026836667209863663, -0.069381944835186, -0.022141391411423683, 0.07249315828084946, 0.0596054308116436, -0.013601596467196941, -0.015954243019223213, -0.032378245145082474, -0.009345892816781998, -0.011835428886115551, 0.039924703538417816, 0.01771392486989498, 0.04433976858854294, 0.03845039755105972, 0.014315576292574406, 0.12034257501363754, -0.005192901939153671, 0.015871873125433922, -0.04243043437600136, 0.007036842871457338, -0.06025393679738045, 0.019615406170487404, -0.04779526963829994, 0.04281020537018776, 0.005901936907321215, -0.051629457622766495, 0.10889896005392075, -0.053802866488695145, -0.023847218602895737, 0.05810805410146713, 0.097371906042099, -0.04875620827078819, 0.06931358575820923, 0.026187019422650337, 0.09143798798322678, -0.08263222128152847, 0.03271392360329628, 0.07050935924053192, -0.06976490467786789, 0.09139581769704819, -0.03704072907567024, 0.010479404591023922, 0.04732959344983101, -0.024980714544653893, 0.018553264439105988, 0.0234586913138628, 0.09001561999320984, -0.03617798909544945, -0.07592998445034027, 0.015668293461203575, -0.010041377507150173, -0.01614491455256939, 0.1104416772723198, -0.05642098933458328, 2.6948307174936792e-33, 0.12945808470249176, -0.015542485751211643, -0.028251273557543755, 0.008241758681833744, 0.09802433848381042, 0.06104651466012001, 0.03828922659158707, -0.050402551889419556, -0.04333264380693436, -0.02541143074631691, -0.00046092888806015253, 0.052718132734298706, -0.09946613758802414, 0.04584603011608124, 0.05696277320384979, 0.032613176852464676, -0.022379497066140175, 0.03947276249527931, 0.034968987107276917, 0.007182043977081776, 0.03526132553815842, -0.024130700156092644, -0.007136387284845114, -0.02567807026207447, -0.038412291556596756, 0.06112942844629288, 0.01184779778122902, -0.083783820271492, 0.03233146667480469, 0.040062278509140015, 0.06669022887945175, -0.0033798543736338615, -0.022771848365664482, 0.006350737530738115, -0.027609311044216156, -0.018656952306628227, -0.09750878810882568, -0.009993634186685085, -0.04251798987388611, -0.02617228776216507, 0.02042951062321663, 0.0825750082731247, -0.033041100949048996, -0.02896474488079548, 0.012443609535694122, -0.011873885989189148, 0.025683248415589333, 0.04094114154577255, 0.08107299357652664, 0.02032221481204033, -0.0525895319879055, 0.032441142946481705, -0.06551921367645264, 0.030602969229221344, 0.008611669763922691, -0.061898425221443176, -0.0032942311372607946, -0.028617601841688156, 0.10861390829086304, -0.014799440279603004, -0.05997156724333763, 0.007804966997355223, 0.03806159645318985, 0.06317315250635147, 0.02680971473455429, 0.012235529720783234, -0.09562535583972931, 0.036061689257621765, 0.003917793743312359, 0.03428838029503822, -0.048164818435907364, -0.02084711752831936, -0.04438342899084091, 0.12538112699985504, 0.0317799374461174, -0.0949586033821106, 0.005885053426027298, -0.06266555935144424, -0.07029586285352707, -0.019675038754940033, 0.01716303452849388, 0.06285113841295242, -0.014784354716539383, 0.03282342478632927, -0.014488945715129375, -0.024400830268859863, 0.040644604712724686, 0.07602390646934509, -0.04422495886683464, -0.006227157078683376, 0.03320404887199402, -0.04832160845398903, 0.016912177205085754, -0.05522935092449188, -0.08957425504922867, -2.3083603173669663e-33, 0.03424147143959999, -0.047516509890556335, -0.006916797254234552, 0.023194534704089165, -0.025223268195986748, -0.06957221776247025, -0.022638635709881783, 0.037659771740436554, 0.00799127109348774, 0.010842006653547287, 0.02778569981455803, 0.023088468238711357, 0.1029788926243782, 0.032488975673913956, 0.036881960928440094, -0.05781993269920349, -0.05032879859209061, -0.07670189440250397, -0.014495747163891792, 0.01610093005001545, -0.022962789982557297, -0.004676644690334797, 0.00970627460628748, 0.01577933318912983, 0.09421446174383163, -0.019673697650432587, -0.005835692398250103, -0.012295788154006004, -0.008209624327719212, -0.05512282997369766, -0.0597049705684185, 0.13767538964748383, -0.07949958741664886, 0.031987350434064865, -0.056854188442230225, 0.07920467108488083, 0.018302707001566887, 0.046418268233537674, -0.03913570195436478, 0.05530735105276108, 0.037585578858852386, -0.07198093831539154, -0.02204844169318676, -0.07404279708862305, -0.07290691882371902, 0.06855063140392303, 0.018742267042398453, -0.0050038681365549564, -0.08908821642398834, -0.06840234249830246, 0.013911197893321514, 0.0018202508799731731, -0.042510904371738434, -0.0376150868833065, 0.04662306234240532, -0.07925774157047272, 0.03213697671890259, -0.0229744054377079, -0.09535783529281616, -0.049284134060144424, 0.10397552698850632, -0.07097455114126205, 0.042335592210292816, -0.006778063718229532, -0.06196318939328194, -0.0534534826874733, -0.0489518865942955, 0.024310527369379997, -0.02617090567946434, -0.012872118502855301, -0.15107789635658264, -0.09255605190992355, 0.008231124840676785, 0.01949804276227951, 0.02331995777785778, 0.023265229538083076, -0.09981628507375717, -0.07133956998586655, 0.09939949214458466, -0.0004948956775479019, -0.09423886984586716, 0.00513367960229516, 0.05778917670249939, -0.0305432491004467, 0.014398657716810703, -0.008887558244168758, 0.07764389365911484, 0.05997643247246742, 0.01280216034501791, 0.10820280015468597, -0.08068011701107025, 0.021155420690774918, 0.0747862383723259, 0.10270851105451584, 0.01012498140335083, -4.6759808469687414e-8, 0.003554768394678831, -0.035291384905576706, -0.034993939101696014, 0.1041552871465683, -0.04835569113492966, -0.02620665170252323, 0.04374832287430763, 0.012255337089300156, 0.03325885906815529, 0.01823696307837963, 0.07202285528182983, 0.06065310165286064, -0.04413358122110367, 0.020814161747694016, -0.05496053397655487, 0.0707116350531578, -0.0007418905152007937, 0.008606597781181335, -0.01606324501335621, -0.08715984225273132, 0.02817334048449993, 0.020588494837284088, 0.0313701368868351, 0.014710599556565285, 0.03537386283278465, -0.06622497737407684, -0.04192548617720604, 0.0432923249900341, -0.05106455087661743, -0.02555488795042038, 0.020191647112369537, -0.06381454318761826, 0.04173262044787407, -0.003738659666851163, -0.0030625443905591965, -0.026260165497660637, -0.04115774855017662, 0.062468137592077255, 0.043698035180568695, -0.03791625425219536, 0.03051302209496498, -0.028560291975736618, -0.05209255963563919, -0.047259461134672165, -0.0019699991680681705, 0.05653335899114609, 0.00877608172595501, 0.02101573348045349, -0.07510294765233994, 0.009656600654125214, 0.0038214775267988443, -0.04916150122880936, 0.034400854259729385, 0.06139298900961876, -0.009699885733425617, -0.025906933471560478, -0.019634312018752098, -0.04618912562727928, -0.04127982631325722, -0.012959658168256283, -0.017387906089425087, -0.06344590336084366, 0.012133166193962097, -0.016186987981200218 ]
0.059437
## Install Install [Roo Code](https://marketplace.visualstudio.com/items?itemName=RooVeterinaryInc.roo-cline) from the VS Code Marketplace. ## Usage with Ollama 1. Open Roo Code in VS Code and click the \*\*gear icon\*\* on the top right corner of the Roo Code window to open \*\*Provider Settings\*\* 2. Set `API Provider` to `Ollama` 3. (Optional) Update `Base URL` if your Ollama instance is running remotely. The default is `http://localhost:11434` 4. Enter a valid `Model ID` (for example `qwen3` or `qwen3-coder:480b-cloud`) 5. Adjust the `Context Window` to at least 32K tokens for coding tasks Coding tools require a larger context window. It is recommended to use a context window of at least 32K tokens. See [Context length](/context-length) for more information. ## Connecting to ollama.com 1. Create an [API key](https://ollama.com/settings/keys) from ollama.com 2. Enable `Use custom base URL` and set it to `https://ollama.com` 3. Enter your \*\*Ollama API Key\*\* 4. Select a model from the list ### Recommended Models - `qwen3-coder:480b` - `deepseek-v3.1:671b`
https://github.com/ollama/ollama/blob/main//docs/integrations/roo-code.mdx
main
ollama
[ -0.035075630992650986, -0.06047536060214043, -0.11131862550973892, 0.08358657360076904, 0.016143672168254852, -0.0628928542137146, -0.10625949501991272, 0.04425613582134247, 0.009191195480525494, -0.007771492004394531, 0.011879422701895237, -0.013420866802334785, -0.03939807787537575, -0.015705985948443413, 0.10984911769628525, 0.1242198720574379, 0.06491871923208237, -0.03002818115055561, -0.007394264917820692, 0.04974452033638954, 0.07111988961696625, 0.014841074123978615, 0.00268763885833323, 0.03365963697433472, 0.024404633790254593, -0.060046229511499405, -0.011606802232563496, 0.07653608173131943, 0.05581619217991829, 0.0041702426970005035, 0.054263047873973846, 0.024881791323423386, -0.008341237902641296, 0.009328437969088554, 0.11604554206132889, -0.006039947737008333, 0.03394760563969612, -0.09844653308391571, -0.07949047535657883, -0.0027255224995315075, 0.047418903559446335, 0.05453398823738098, -0.09504891186952591, -0.05976201221346855, 0.019129037857055664, -0.128384530544281, 0.030353982001543045, -0.041543006896972656, 0.0397178940474987, -0.03539913147687912, -0.08251496404409409, -0.05696616321802139, -0.06264940649271011, -0.011213935911655426, -0.054609593003988266, 0.043384261429309845, 0.024348167702555656, -0.06603161990642548, 0.0384378507733345, 0.06075422093272209, 0.07354919612407684, -0.0074919466860592365, 0.018040860071778297, -0.005686117336153984, -0.04523558169603348, 0.036118995398283005, 0.0031616059131920338, -0.01866646111011505, -0.0231161005795002, -0.06734507530927658, -0.03624396771192551, 0.005652576684951782, -0.0465192049741745, 0.05267595127224922, 0.03154506906867027, -0.03812357783317566, 0.06283913552761078, 0.0492420494556427, 0.08267638087272644, -0.03767126426100731, -0.02757459320127964, -0.022930866107344627, -0.06322477012872696, 0.05706265568733215, 0.07075442373752594, 0.06113662198185921, 0.048698026686906815, -0.01094954926520586, 0.10138695687055588, 0.03291129693388939, -0.052011869847774506, -0.08664555102586746, 0.02891979180276394, -0.10133401304483414, 0.10419823229312897, -0.10912586003541946, 0.013125617057085037, -0.014644521288573742, -0.004676337353885174, 0.04851569980382919, -0.03071865811944008, -0.062047407031059265, -0.008086579851806164, 0.014150834642350674, -0.050946738570928574, 0.048104993999004364, 0.12075626850128174, 0.09640417993068695, -0.10106903314590454, 0.020667050033807755, -0.03290186822414398, -0.05985041707754135, 0.06875308603048325, -0.09084931761026382, 0.008543960750102997, 0.11053385585546494, -0.013419434428215027, -0.012919708155095577, -0.01168735045939684, -0.015648309141397476, 0.020556945353746414, -0.06684760004281998, -0.03315544128417969, -0.04660910367965698, 0.0363021120429039, 0.06703672558069229, 0.006909966003149748, 8.216198580308998e-33, 0.04272475838661194, 0.04524238407611847, -0.037433940917253494, 0.02115551382303238, 0.04505414888262749, 0.068605437874794, 0.03441667556762695, -0.017499295994639397, -0.09434755891561508, 0.007981671020388603, -0.03968886286020279, 0.03427625074982643, 0.0016007182421162724, 0.022505952045321465, -0.01038363017141819, -0.038840074092149734, 0.02950676716864109, 0.0069054667837917805, -0.021843845024704933, -0.03526066243648529, 0.009442738257348537, -0.0989348292350769, -0.0004178621165920049, 0.029795603826642036, -0.011638044379651546, 0.021998248994350433, -0.02748832292854786, 0.0019192870240658522, -0.004406264051795006, 0.00802330020815134, 0.11718635261058807, 0.010857651941478252, -0.04267812892794609, 0.06374818086624146, -0.03670496121048927, -0.009198762476444244, -0.08141041547060013, -0.04055119678378105, -0.0577097050845623, 0.0875704437494278, 0.03907392919063568, 0.06101510301232338, -0.08942696452140808, 0.0018719604704529047, -0.03691979870200157, 0.013489768840372562, -0.005243898835033178, -0.005258715711534023, 0.10041414201259613, 0.03529426455497742, -0.07477889209985733, 0.06932490319013596, -0.10850401967763901, 0.05372646450996399, 0.045799825340509415, -0.08775607496500015, 0.019406212493777275, -0.02209945023059845, 0.0858517438173294, -0.04212825372815132, -0.062482595443725586, -0.020541034638881683, -0.0007824443746358156, 0.007092323619872332, 0.011482510715723038, -0.03469549119472504, 0.04494762793183327, -0.05234924331307411, -0.0006101732142269611, -0.03232762590050697, -0.01933630369603634, 0.00044591212645173073, -0.03225893899798393, 0.021943891420960426, -0.016262833029031754, -0.09705240279436111, 0.0008563481387682259, 0.05089111998677254, -0.03373388946056366, 0.01617729663848877, -0.02269008569419384, 0.012401524931192398, 0.017732810229063034, 0.010469095781445503, 0.000869609008077532, -0.027839383110404015, 0.03158358111977577, 0.003201958956196904, -0.007384811993688345, 0.004568076226860285, 0.02414555661380291, -0.026328671723604202, 0.017842339351773262, -0.036467090249061584, -0.024833256378769875, -6.866530496841402e-33, 0.02829303964972496, 0.004674586001783609, 0.00837523490190506, -0.02661025896668434, 0.0056914519518613815, -0.029012661427259445, -0.018496273085474968, 0.026217862963676453, -0.03394170477986336, -0.04061340540647507, 0.06835414469242096, 0.023530149832367897, 0.04852264001965523, 0.056071098893880844, 0.0828200951218605, -0.031988177448511124, -0.023658907040953636, -0.05095698684453964, 0.06015374884009361, 0.03200426697731018, -0.012524367310106754, 0.04394904896616936, 0.02991054207086563, -0.00944075919687748, 0.05423807352781296, 0.005037833470851183, 0.03947488218545914, 0.002787868957966566, -0.029349252581596375, -0.08356139808893204, -0.0038020911160856485, 0.0405087023973465, -0.10288748890161514, -0.013124827295541763, 0.011829612776637077, 0.06116347387433052, 0.058853909373283386, 0.017371850088238716, -0.03871428221464157, 0.04270126670598984, 0.06208236515522003, -0.06747647374868393, -0.05009333789348602, -0.04265516623854637, -0.052640337496995926, 0.024372749030590057, 0.0017635766416788101, -0.020038390532135963, -0.03216004744172096, -0.012399658560752869, 0.048684392124414444, -0.02938600815832615, 0.012581955641508102, -0.030218495056033134, 0.05225083604454994, -0.002362629631534219, 0.04567575827240944, -0.06325948238372803, -0.014092487283051014, -0.013412686996161938, 0.10633531957864761, -0.01376489270478487, 0.002859880216419697, 0.008848324418067932, -0.031878624111413956, 0.0244285948574543, -0.006465739570558071, 0.04637580364942551, -0.04918751120567322, -0.09003478288650513, -0.17378269135951996, -0.018629757687449455, 0.015526361763477325, -0.0021140947937965393, -0.014961169101297855, 0.011746730655431747, -0.11567926406860352, 0.023096559569239616, 0.05701746046543121, 0.04182536154985428, -0.05910148471593857, -0.05770774185657501, 0.07644272595643997, -0.02611020766198635, -0.029731016606092453, 0.06903202831745148, 0.0014517366653308272, 0.07623876631259918, 0.04378839209675789, 0.027475066483020782, -0.13612841069698334, -0.06958014518022537, 0.010477561503648758, 0.0638311505317688, 0.11549022793769836, -6.03910734753299e-8, -0.03421049192547798, 0.02108427882194519, -0.006858510430902243, -0.01162577886134386, 0.0030442802235484123, 0.0001389722601743415, 0.02449914999306202, -0.014188544824719429, -0.00003882902456098236, 0.10285980999469757, -0.02481888048350811, 0.05916769802570343, -0.014290343038737774, 0.01223335973918438, -0.023456433787941933, 0.060904089361429214, -0.06524903327226639, 0.03832532837986946, 0.050047215074300766, -0.03477637469768524, 0.10618627816438675, -0.028759730979800224, 0.047437142580747604, 0.02640097588300705, 0.05137234553694725, -0.04757921025156975, -0.035936031490564346, 0.045518629252910614, -0.027312584221363068, -0.06372520327568054, 0.11570671200752258, -0.016023576259613037, 0.06923244148492813, -0.020114684477448463, -0.09208019077777863, -0.04687253758311272, -0.021829381585121155, 0.006246122531592846, -0.021624069660902023, -0.015627987682819366, 0.06669918447732925, 0.04128824174404144, -0.03288285434246063, -0.07752734422683716, -0.0032134223729372025, 0.10046947747468948, 0.020534750074148178, -0.061243023723363876, -0.0496528223156929, -0.03456622734665871, -0.04449623078107834, -0.03485078364610672, 0.012424714863300323, 0.1298694908618927, -0.013760232366621494, -0.038687124848365784, -0.0010061602806672454, -0.08723419904708862, -0.006917792372405529, 0.05694730579853058, -0.02062138542532921, -0.0019527721451595426, 0.05209679901599884, -0.013100873678922653 ]
0.041292
Claude Code is Anthropic's agentic coding tool that can read, modify, and execute code in your working directory. Open models can be used with Claude Code through Ollama's Anthropic-compatible API, enabling you to use models such as `glm-4.7`, `qwen3-coder`, `gpt-oss`. ![Claude Code with Ollama](https://files.ollama.com/claude-code.png) ## Install Install [Claude Code](https://code.claude.com/docs/en/overview): ```shell macOS / Linux curl -fsSL https://claude.ai/install.sh | bash ``` ```powershell Windows irm https://claude.ai/install.ps1 | iex ``` ## Usage with Ollama ### Quick setup ```shell ollama launch claude ``` To configure without launching: ```shell ollama launch claude --config ``` ### Manual setup Claude Code connects to Ollama using the Anthropic-compatible API. 1. Set the environment variables: ```shell export ANTHROPIC\_AUTH\_TOKEN=ollama export ANTHROPIC\_API\_KEY="" export ANTHROPIC\_BASE\_URL=http://localhost:11434 ``` 2. Run Claude Code with an Ollama model: ```shell claude --model gpt-oss:20b ``` Or run with environment variables inline: ```shell ANTHROPIC\_AUTH\_TOKEN=ollama ANTHROPIC\_BASE\_URL=http://localhost:11434 ANTHROPIC\_API\_KEY="" claude --model qwen3-coder ``` \*\*Note:\*\* Claude Code requires a large context window. We recommend at least 64k tokens. See the [context length documentation](/context-length) for how to adjust context length in Ollama. ## Recommended Models - `qwen3-coder` - `glm-4.7` - `gpt-oss:20b` - `gpt-oss:120b` Cloud models are also available at [ollama.com/search?c=cloud](https://ollama.com/search?c=cloud).
https://github.com/ollama/ollama/blob/main//docs/integrations/claude-code.mdx
main
ollama
[ -0.048552580177783966, -0.036604009568691254, -0.14901666343212128, 0.005986465606838465, -0.018430359661579132, -0.0643443688750267, -0.04138874262571335, 0.08094551414251328, -0.014301286078989506, 0.052008964121341705, 0.03179994598031044, 0.00022514538432005793, -0.01876545511186123, -0.006120207253843546, 0.06809162348508835, 0.03137928247451782, 0.01663586124777794, 0.017573082819581032, -0.008472125977277756, -0.01992654614150524, 0.006794456392526627, 0.021708765998482704, 0.01390893291682005, -0.00005081897324998863, -0.057405807077884674, -0.07063212990760803, 0.03783175349235535, 0.018036551773548126, -0.010813672095537186, -0.03495437651872635, 0.059383928775787354, 0.04897475615143776, 0.01270042359828949, 0.009787160903215408, 0.09194981306791306, 0.04890580102801323, 0.04014332965016365, -0.05978059023618698, -0.15088438987731934, -0.01751858927309513, -0.007206691894680262, 0.020167287439107895, -0.08282481878995895, -0.021890835836529732, 0.011189572513103485, -0.07682185620069504, -0.01771627739071846, -0.03981350362300873, -0.005153194535523653, -0.08588290959596634, -0.07690989971160889, -0.08233986049890518, -0.004628261551260948, -0.07543233782052994, 0.020225370302796364, -0.025296544656157494, 0.010367492213845253, -0.07562128454446793, 0.05327380448579788, -0.04546494036912918, 0.010862065479159355, 0.06829666346311569, -0.10534163564443588, 0.036225538700819016, -0.019846919924020767, 0.02165837585926056, -0.06368401646614075, 0.03996472805738449, 0.021540623158216476, -0.07186926156282425, -0.10223259031772614, -0.11381843686103821, -0.031767670065164566, -0.011686062440276146, -0.016969745978713036, -0.030780544504523277, 0.038313865661621094, 0.06886759400367737, -0.027899593114852905, -0.059163469821214676, -0.040964700281620026, -0.03550487756729126, 0.03203587234020233, 0.07898971438407898, 0.06476917117834091, 0.0907956063747406, 0.062477290630340576, 0.11453147232532501, 0.09456755220890045, -0.032813895493745804, -0.005272853188216686, -0.0311290193349123, -0.0018214433221146464, -0.022558538243174553, -0.013543019071221352, 0.009851580485701561, 0.08983822166919708, -0.02752966247498989, -0.008203722536563873, 0.09997226297855377, -0.09207114577293396, -0.0658167228102684, 0.045232973992824554, -0.0005553819355554879, -0.041287895292043686, 0.055630091577768326, 0.10420646518468857, 0.08515815436840057, 0.020214300602674484, -0.02415282651782036, -0.05864487960934639, -0.03801870346069336, 0.042156435549259186, -0.0670522078871727, 0.05721591040492058, 0.04119524359703064, 0.013949708081781864, 0.07528559863567352, 0.0377032496035099, 0.02771756239235401, 0.077304407954216, 0.0074796914122998714, -0.012255087494850159, 0.031520020216703415, 0.0585937462747097, 0.05943708121776581, 0.010712223127484322, 3.6610341766238125e-33, 0.1273413896560669, 0.02151460014283657, 0.021351777017116547, 0.06258014589548111, 0.06989181786775589, -0.010499844327569008, 0.05930868908762932, -0.016236672177910805, -0.0544133335351944, 0.06645596027374268, 0.007874240167438984, 0.05615250766277313, -0.06562811136245728, 0.11997752636671066, -0.030712859705090523, 0.016868198290467262, -0.047183066606521606, 0.00277718179859221, 0.03885376825928688, -0.00888904184103012, 0.05094793438911438, 0.0019068315159529448, -0.01004841085523367, 0.03962958976626396, 0.048491571098566055, 0.08949903398752213, -0.0004882900975644588, -0.045673917979002, 0.0701654702425003, 0.026354486122727394, 0.03430058807134628, -0.01585388369858265, -0.07039956748485565, 0.0006079905433580279, -0.06872627884149551, 0.009493129327893257, -0.09640274941921234, -0.056943196803331375, 0.014458059333264828, 0.03976137191057205, 0.03313637152314186, -0.050854552537202835, 0.003300959011539817, -0.08276188373565674, -0.007545233238488436, -0.012015718966722488, -0.013203385286033154, 0.019388515502214432, 0.04449913278222084, -0.0015670520951971412, 0.041612014174461365, -0.006053893826901913, -0.014234661124646664, 0.05750996246933937, -0.06263470649719238, 0.032114867120981216, -0.04208606481552124, -0.08511210232973099, 0.08622681349515915, 0.018246831372380257, 0.03818945214152336, 0.05573869124054909, -0.004274042788892984, -0.026459570974111557, 0.0293557308614254, -0.09975575655698776, -0.06035107001662254, 0.0014104867586866021, 0.011177219450473785, 0.07684081047773361, -0.1129511296749115, -0.006323552690446377, 0.03170546144247055, 0.05413428321480751, 0.07284150272607803, -0.023172082379460335, -0.012926955707371235, -0.03960466384887695, -0.021066730841994286, 0.005983213894069195, -0.04384000226855278, 0.03456731513142586, -0.014158140867948532, -0.0003871653461828828, 0.05786528438329697, -0.03498895838856697, 0.022249944508075714, 0.011862074956297874, -0.07773575931787491, -0.03861014172434807, -0.029798557981848717, -0.10737315565347672, -0.0008520294795744121, 0.02064291387796402, -0.01930316723883152, -5.636646389748552e-33, 0.05005037784576416, -0.04579763859510422, 0.02449813485145569, 0.008565046824514866, 0.0020198551937937737, -0.06670103222131729, -0.022001095116138458, -0.059506628662347794, -0.006443226244300604, -0.06675174832344055, 0.006444504484534264, -0.004504213109612465, 0.09502071887254715, 0.019212953746318817, 0.10417450964450836, -0.0328083336353302, -0.11185238510370255, -0.07535754144191742, 0.007717903703451157, 0.06197098270058632, -0.06847784668207169, -0.0382278636097908, 0.026933996006846428, -0.046868860721588135, 0.0006846345495432615, -0.00944907683879137, 0.035851046442985535, 0.04271586984395981, -0.0031629896257072687, -0.006703007034957409, -0.08944710344076157, 0.08508919179439545, -0.07908301055431366, -0.029700275510549545, -0.022266509011387825, 0.12415533512830734, 0.0009058247087523341, 0.05239834263920784, -0.04920373484492302, 0.011096329428255558, 0.04497520253062248, -0.03398582339286804, -0.046731408685445786, -0.03261123597621918, 0.017676934599876404, 0.0857091024518013, -0.046288326382637024, -0.031052174046635628, -0.06389211118221283, -0.035136234015226364, 0.04205525293946266, 0.03990046679973602, -0.035506393760442734, -0.016052020713686943, 0.017827508971095085, -0.006925597786903381, 0.029650678858160973, -0.03587735816836357, -0.08414079993963242, 0.01926613412797451, -0.011431441642343998, -0.048037510365247726, 0.0490223653614521, -0.009186812676489353, -0.0795840173959732, -0.06274216622114182, -0.07946498692035675, 0.0011138764675706625, -0.032141730189323425, -0.02165737748146057, -0.03406506031751633, -0.05909426882863045, -0.0027705407701432705, 0.018191469833254814, 0.04368124157190323, -0.021926552057266235, -0.09437628090381622, -0.03706081211566925, 0.006748902145773172, 0.038744520395994186, 0.025491325184702873, -0.020664285868406296, 0.07813423126935959, 0.028974605724215508, -0.04580492898821831, 0.050204407423734665, 0.007932581007480621, 0.01273613702505827, 0.0693737044930458, -0.009456764906644821, -0.06059599295258522, 0.06510458141565323, 0.12440713495016098, 0.08386175334453583, -0.0018915763357654214, -5.6717539109740756e-8, 0.0027458551339805126, -0.04584680125117302, 0.02999776229262352, -0.02001197449862957, -0.06477677077054977, 0.029888151213526726, -0.03196045756340027, -0.054222993552684784, -0.012280071154236794, 0.013479260727763176, 0.038427501916885376, 0.01853414997458458, -0.012246014550328255, 0.006749473977833986, -0.0867164358496666, 0.1130305677652359, 0.0234236940741539, 0.03850008174777031, 0.023365270346403122, -0.04863443970680237, 0.014307579956948757, 0.08439740538597107, 0.03490259870886803, 0.0005355420871637762, 0.03502906858921051, -0.04335062950849533, -0.02467818558216095, -0.008379085920751095, -0.06318913400173187, 0.007307788357138634, 0.06121246889233589, -0.001398273161612451, 0.05291127413511276, 0.018364114686846733, 0.046085987240076065, -0.04701368883252144, -0.03425907343626022, -0.02220086194574833, 0.024316024035215378, -0.10440520197153091, 0.06426677852869034, 0.056818895041942596, -0.04060383886098862, -0.0857224240899086, 0.04374486953020096, -0.0032335652504116297, 0.047594714909791946, -0.0944729670882225, -0.03829864412546158, -0.02773975394666195, -0.013881106860935688, 0.0425243116915226, -0.07037641853094101, 0.06449850648641586, 0.039101410657167435, 0.04322119802236557, -0.0726245865225792, -0.04785635322332382, 0.013860969804227352, 0.002481671515852213, -0.11033118516206741, 0.0013319386634975672, 0.04168424755334854, -0.013841417618095875 ]
0.066586
## Install Install the [Droid CLI](https://factory.ai/): ```bash curl -fsSL https://app.factory.ai/cli | sh ``` Droid requires a larger context window. It is recommended to use a context window of at least 64k tokens. See [Context length](/context-length) for more information. ## Usage with Ollama ### Quick setup ```bash ollama launch droid ``` To configure without launching: ```shell ollama launch droid --config ``` ### Manual setup Add a local configuration block to `~/.factory/config.json`: ```json { "custom\_models": [ { "model\_display\_name": "qwen3-coder [Ollama]", "model": "qwen3-coder", "base\_url": "http://localhost:11434/v1/", "api\_key": "not-needed", "provider": "generic-chat-completion-api", "max\_tokens": 32000 } ] } ``` ## Cloud Models `qwen3-coder:480b-cloud` is the recommended model for use with Droid. Add the cloud configuration block to `~/.factory/config.json`: ```json { "custom\_models": [ { "model\_display\_name": "qwen3-coder [Ollama Cloud]", "model": "qwen3-coder:480b-cloud", "base\_url": "http://localhost:11434/v1/", "api\_key": "not-needed", "provider": "generic-chat-completion-api", "max\_tokens": 128000 } ] } ``` ## Connecting to ollama.com 1. Create an [API key](https://ollama.com/settings/keys) from ollama.com and export it as `OLLAMA\_API\_KEY`. 2. Add the cloud configuration block to `~/.factory/config.json`: ```json { "custom\_models": [ { "model\_display\_name": "qwen3-coder [Ollama Cloud]", "model": "qwen3-coder:480b", "base\_url": "https://ollama.com/v1/", "api\_key": "OLLAMA\_API\_KEY", "provider": "generic-chat-completion-api", "max\_tokens": 128000 } ] } ``` Run `droid` in a new terminal to load the new settings.
https://github.com/ollama/ollama/blob/main//docs/integrations/droid.mdx
main
ollama
[ -0.045875199139118195, -0.005744450725615025, 0.013216057792305946, -0.08669254183769226, -0.05599778890609741, -0.060302313417196274, -0.080350860953331, 0.13761243224143982, -0.011901482939720154, -0.021323837339878082, 0.04985325038433075, -0.07777708768844604, 0.0035594527143985033, 0.02757496014237404, 0.12712758779525757, 0.10873466730117798, 0.02887563779950142, -0.01812555268406868, -0.042845871299505234, 0.03396444022655487, 0.07487615197896957, 0.03916695713996887, 0.07225216925144196, -0.050122376531362534, -0.04097136855125427, -0.023362863808870316, 0.03210553154349327, 0.050032276660203934, -0.018656296655535698, -0.04979595169425011, 0.055961426347494125, 0.039980389177799225, 0.013824209570884705, 0.05437836796045303, 0.11495671421289444, -0.00277452333830297, 0.032648056745529175, -0.103974848985672, -0.0208799596875906, -0.020577330142259598, 0.0925743356347084, 0.06923656165599823, -0.03533996641635895, -0.06367012113332748, 0.009150284342467785, -0.07190899550914764, -0.06561267375946045, 0.025394270196557045, 0.06315921992063522, -0.022340480238199234, -0.04037262126803398, -0.006151911336928606, 0.026202915236353874, -0.027509085834026337, -0.032806508243083954, 0.07845939695835114, -0.04034942016005516, 0.03688105195760727, 0.03822403773665428, 0.01793769747018814, 0.013553758151829243, 0.04492739588022232, -0.04298466816544533, 0.038854096084833145, -0.05595095828175545, -0.040571630001068115, -0.09485258162021637, -0.034939952194690704, 0.05230356752872467, 0.056896135210990906, -0.043472714722156525, 0.016227439045906067, -0.019934017211198807, -0.04288666695356369, -0.06327657401561737, -0.029792718589305878, 0.0732034295797348, 0.03739846497774124, -0.08544847369194031, -0.04164660722017288, -0.03791741654276848, 0.007935911417007446, -0.008076953701674938, 0.0867995023727417, 0.04598374292254448, 0.08724384009838104, 0.043331243097782135, -0.01663290522992611, 0.056395478546619415, 0.011360707692801952, -0.01708156429231167, -0.07351521402597427, -0.09270776063203812, -0.03286559879779816, 0.061764542013406754, -0.0026370149571448565, 0.017313271760940552, -0.024966254830360413, -0.100684754550457, 0.07805170118808746, 0.02293778769671917, -0.06811244785785675, 0.05657331272959709, 0.0562564916908741, -0.03564129024744034, 0.002992976224049926, 0.06486302614212036, 0.0004946325207129121, -0.09402979165315628, 0.03964622691273689, 0.018291793763637543, -0.04438227415084839, 0.0486321747303009, -0.0032065175473690033, -0.023338841274380684, 0.042797934263944626, 0.01693006418645382, -0.013620846904814243, 0.03665776178240776, 0.05778110399842262, 0.028145253658294678, -0.0746413916349411, -0.0569407157599926, -0.0418105386197567, 0.0048201074823737144, 0.04589187726378441, -0.018161186948418617, 5.7170825294394444e-33, 0.067988820374012, -0.00771924015134573, -0.02097502164542675, 0.024502258747816086, 0.012449832633137703, 0.05374123901128769, 0.02124742977321148, 0.016430417075753212, -0.03109927475452423, -0.037373557686805725, -0.08725092560052872, 0.08553217351436615, -0.0767398551106453, 0.0008002581307664514, -0.02828195132315159, -0.07241493463516235, 0.01643216982483864, 0.038886409252882004, 0.09494399279356003, 0.023345135152339935, 0.023015929386019707, -0.09073647856712341, -0.04646534472703934, -0.09602946043014526, -0.05611766129732132, 0.06424438953399658, 0.07161448150873184, 0.006416204385459423, 0.0009775551734492183, 0.0194388460367918, 0.0009035018738359213, -0.030124450102448463, 0.038526229560375214, 0.0063728042878210545, -0.0590454563498497, -0.05160895735025406, -0.10384663194417953, -0.04300197213888168, -0.07138904184103012, 0.037216342985630035, -0.034906189888715744, 0.000825996627099812, -0.08175324648618698, 0.0038853492587804794, -0.017380088567733765, -0.013790493831038475, -0.014340792782604694, -0.047109246253967285, 0.029291382059454918, 0.002143816091120243, -0.04400352016091347, -0.002990134060382843, -0.0059465402737259865, -0.10009579360485077, 0.014083805494010448, -0.07811066508293152, -0.06901811808347702, -0.07352529466152191, 0.03005891665816307, -0.0500018484890461, -0.09632622450590134, 0.03223186731338501, -0.030828693881630898, 0.03664146736264229, 0.051563844084739685, 0.016979055479168892, -0.025409983471035957, -0.0179120022803545, -0.002701176330447197, 0.07601778209209442, -0.016256311908364296, -0.060793690383434296, 0.0006223686505109072, 0.04754618927836418, 0.028742996975779533, -0.017364174127578735, 0.007069604471325874, 0.005463684909045696, -0.02144494280219078, -0.0036850746255367994, 0.0777798667550087, 0.01374876033514738, -0.004617281723767519, 0.00871671549975872, 0.055529605597257614, -0.03321245312690735, 0.03220175579190254, 0.020287998020648956, -0.0421755425632, 0.04821638762950897, 0.024095535278320312, -0.06345846503973007, -0.017399800941348076, -0.022971658036112785, -0.050120722502470016, -7.464934997910689e-33, 0.04943336546421051, -0.048442989587783813, 0.04038775712251663, -0.00915945041924715, 0.059532903134822845, -0.033089280128479004, -0.04335802048444748, 0.0822947546839714, -0.003002571640536189, -0.01277356967329979, -0.03039504960179329, 0.02301863580942154, 0.04352840408682823, -0.004803682677447796, 0.022567426785826683, 0.028223395347595215, -0.04090617597103119, -0.07339706271886826, 0.04154449328780174, 0.030083075165748596, -0.024465808644890785, 0.04833026975393295, -0.008339048363268375, 0.08868956565856934, -0.04143289849162102, -0.04852808266878128, 0.01331373956054449, 0.02975952811539173, -0.051708340644836426, -0.061955370008945465, 0.009907392784953117, 0.0558968260884285, -0.09037196636199951, 0.015328992158174515, 0.01843349076807499, 0.05717300996184349, -0.02791617065668106, 0.0749862939119339, 0.02481016516685486, 0.009463155642151833, 0.056288301944732666, -0.05681236460804939, -0.04270695522427559, -0.03558161109685898, 0.020754216238856316, -0.019841181114315987, 0.015085907652974129, -0.03945598751306534, -0.059345558285713196, -0.024416150525212288, 0.002124158199876547, 0.02604738064110279, -0.02106804959475994, -0.02823326736688614, -0.009266672655940056, -0.0052388510666787624, 0.05990222096443176, -0.077328622341156, -0.0648762658238411, 0.05295008420944214, 0.062429264187812805, -0.14373834431171417, -0.020702945068478584, 0.008586157113313675, -0.09454693645238876, -0.11769186705350876, -0.015848500654101372, 0.05033989995718002, -0.033429715782403946, 0.010531457141041756, -0.11106564849615097, -0.04631820321083069, 0.030883492901921272, 0.06770963966846466, -0.0042485943995416164, 0.01619056612253189, -0.10934572666883469, -0.08656265586614609, 0.09617045521736145, 0.07012337446212769, -0.06810097396373749, 0.007524304557591677, 0.03830728679895401, -0.022295525297522545, 0.03272201865911484, -0.0033971858210861683, -0.012995432130992413, 0.08354455977678299, -0.02149248495697975, 0.0659264549612999, 0.018365006893873215, -0.03607264161109924, 0.014102199114859104, 0.12906095385551453, -0.02501501329243183, -5.886914777875063e-8, 0.0541105791926384, -0.03314272314310074, 0.01925899088382721, 0.018952812999486923, -0.06218790262937546, -0.0441104955971241, 0.008273393847048283, -0.030532825738191605, 0.1272457093000412, -0.014935278333723545, 0.009926659055054188, 0.06469948589801788, -0.08301578462123871, 0.12470964342355728, -0.05554486811161041, 0.0990033894777298, -0.002139510354027152, 0.07883478701114655, 0.047880299389362335, -0.04141535609960556, 0.05078361928462982, 0.03466527536511421, -0.004457040689885616, 0.007783441338688135, 0.099586620926857, -0.015921737998723984, -0.03907405212521553, 0.007803482469171286, -0.06695980578660965, -0.01414297241717577, 0.01579628325998783, 0.0027862859424203634, 0.04443606734275818, -0.047158293426036835, -0.07160331308841705, -0.02264014258980751, 0.05198852717876434, -0.0536273755133152, -0.03548121824860573, -0.11077367514371872, 0.1193748489022255, 0.0580456480383873, 0.01461248192936182, -0.06270982325077057, 0.003726787632331252, 0.015247010625898838, 0.09476450830698013, -0.017328528687357903, -0.029309669509530067, -0.027973145246505737, -0.019030282273888588, -0.03118559531867504, 0.03154183551669121, -0.01763172447681427, 0.009180981665849686, -0.0178156029433012, -0.03912007808685303, -0.062444865703582764, -0.05655110999941826, 0.011902939528226852, -0.0020019239746034145, -0.0045700278133153915, 0.06783502548933029, 0.025424843654036522 ]
0.041617
OpenCode is an open-source AI coding assistant that runs in your terminal. ## Install Install the [OpenCode CLI](https://opencode.ai): ```bash curl -fsSL https://opencode.ai/install | bash ``` OpenCode requires a larger context window. It is recommended to use a context window of at least 64k tokens. See [Context length](/context-length) for more information. ## Usage with Ollama ### Quick setup ```bash ollama launch opencode ``` To configure without launching: ```shell ollama launch opencode --config ``` ### Manual setup Add a configuration block to `~/.config/opencode/opencode.json`: ```json { "$schema": "https://opencode.ai/config.json", "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama", "options": { "baseURL": "http://localhost:11434/v1" }, "models": { "qwen3-coder": { "name": "qwen3-coder" } } } } } ``` ## Cloud Models `glm-4.7:cloud` is the recommended model for use with OpenCode. Add the cloud configuration to `~/.config/opencode/opencode.json`: ```json { "$schema": "https://opencode.ai/config.json", "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama", "options": { "baseURL": "http://localhost:11434/v1" }, "models": { "glm-4.7:cloud": { "name": "glm-4.7:cloud" } } } } } ``` ## Connecting to ollama.com 1. Create an [API key](https://ollama.com/settings/keys) from ollama.com and export it as `OLLAMA\_API\_KEY`. 2. Update `~/.config/opencode/opencode.json` to point to ollama.com: ```json { "$schema": "https://opencode.ai/config.json", "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama Cloud", "options": { "baseURL": "https://ollama.com/v1" }, "models": { "glm-4.7:cloud": { "name": "glm-4.7:cloud" } } } } } ``` Run `opencode` in a new terminal to load the new settings.
https://github.com/ollama/ollama/blob/main//docs/integrations/opencode.mdx
main
ollama
[ 0.01717148907482624, -0.010642733424901962, -0.10553954541683197, 0.04921763017773628, 0.004587437026202679, -0.07154218852519989, -0.06349549442529678, 0.06429814547300339, 0.036658164113759995, -0.007105548866093159, 0.0028064956422895193, -0.014858128502964973, -0.087405726313591, 0.0025240411050617695, 0.13597457110881805, 0.13726377487182617, -0.005811148323118687, -0.016962764784693718, -0.049083370715379715, -0.013793570920825005, 0.03062495030462742, 0.04173702001571655, 0.02971949242055416, -0.042554423213005066, -0.039829667657613754, 0.042312294244766235, 0.003431868040934205, 0.005282682366669178, -0.0060702417977154255, 0.004196174908429384, 0.08992940187454224, 0.0009341675322502851, 0.06630335003137589, 0.02675672620534897, 0.08752738684415817, 0.05121270567178726, 0.02362060546875, -0.07506635040044785, -0.05706141144037247, -0.05844123661518097, 0.026147840544581413, 0.05715510994195938, -0.05582023411989212, -0.0037700694520026445, -0.017258867621421814, -0.0238735880702734, -0.059215620160102844, -0.05040908232331276, -0.011296210810542107, -0.05086459219455719, -0.06544145941734314, -0.05268040671944618, -0.023521549999713898, -0.01966458186507225, 0.05075783282518387, -0.004318630788475275, -0.029429761692881584, -0.018138626590371132, 0.039129838347435, 0.04407419264316559, 0.013248167000710964, 0.05904384329915047, -0.020424962043762207, 0.056246817111968994, -0.013011844828724861, -0.019623499363660812, -0.05377272143959999, -0.006087362300604582, -0.0066826422698795795, -0.045496489852666855, 0.02373388037085533, -0.008968747220933437, -0.005089402198791504, 0.016289489343762398, -0.020887309685349464, -0.07812239974737167, 0.04964457079768181, 0.02002272568643093, 0.010948858223855495, 0.008795792236924171, -0.04968581348657608, -0.0018850760534405708, -0.026512833312153816, 0.07991066575050354, 0.03942512720823288, 0.11896508932113647, 0.03749283403158188, 0.039169661700725555, 0.08500907570123672, 0.062055595219135284, -0.025436121970415115, -0.10894746333360672, -0.04246339946985245, -0.047732193022966385, 0.09470736235380173, -0.06318064033985138, -0.004983905702829361, -0.047530416399240494, -0.09177251160144806, 0.06295471638441086, -0.03506661206483841, -0.04938133805990219, 0.02019914984703064, 0.05854666605591774, -0.05419396236538887, 0.03151200711727142, 0.1449757069349289, 0.05029556527733803, -0.024837955832481384, 0.06542015820741653, 0.01754579320549965, -0.09688940644264221, 0.08527249842882156, -0.0590524822473526, -0.00029889732832089067, 0.056519635021686554, -0.0219777412712574, 0.023540494963526726, 0.06937538087368011, 0.10005887597799301, 0.06762785464525223, -0.04163914918899536, -0.0694136694073677, 0.036560434848070145, -0.02861294150352478, 0.05768299102783203, 0.04247640073299408, 4.845265021866602e-33, 0.0748676136136055, -0.017580851912498474, -0.04835839197039604, -0.006891153287142515, 0.03748050332069397, -0.024823611602187157, 0.04974038898944855, -0.01937546767294407, -0.10040215402841568, 0.05775675177574158, -0.016831031069159508, 0.07780148088932037, -0.05773608013987541, 0.08892872184515, 0.04008154943585396, -0.002572176745161414, -0.006604298483580351, 0.038828253746032715, 0.06705708056688309, -0.006767673883587122, 0.03334716334939003, -0.06768431514501572, -0.0072136553935706615, 0.023343060165643692, -0.016020355746150017, 0.031582061201334, 0.02742931805551052, -0.07706677913665771, 0.037659548223018646, 0.015038351528346539, 0.0619501955807209, 0.018199710175395012, -0.041054900735616684, -0.02868742123246193, -0.018192244693636894, -0.0605170764029026, -0.08972153812646866, 0.01566137932240963, -0.07029061019420624, 0.03987666219472885, 0.0512995570898056, 0.043858788907527924, -0.010662563145160675, 0.005815880838781595, 0.06005256623029709, -0.035807665437459946, -0.04857582971453667, -0.034581031650304794, 0.052575550973415375, 0.038058675825595856, -0.004533924162387848, 0.01567334309220314, -0.033685266971588135, -0.014714909717440605, 0.033444929867982864, -0.10502150654792786, -0.012040565721690655, -0.0772777795791626, 0.04880575090646744, -0.004934028722345829, -0.10775817930698395, -0.0009602130739949644, -0.004756590351462364, -0.0052077677100896835, 0.057742372155189514, -0.01801822893321514, -0.04272426664829254, 0.013789949007332325, -0.01278932485729456, 0.07064370065927505, -0.04711158201098442, -0.04062296822667122, -0.014406593516469002, 0.05767543241381645, -0.06967637687921524, 0.005879533477127552, 0.005437054671347141, -0.03437643125653267, 0.02013220451772213, -0.02641219086945057, 0.04620618745684624, 0.017892250791192055, -0.013780029490590096, 0.056295108050107956, 0.05094178393483162, -0.012950146570801735, -0.046009793877601624, 0.026710860431194305, -0.08479799330234528, 0.05874474346637726, 0.01587493345141411, -0.01567627675831318, -0.025829782709479332, -0.02163291908800602, -0.06641654670238495, -5.734432091373612e-33, 0.04189449921250343, -0.028855739161372185, -0.03615179657936096, 0.003730452386662364, -0.03655672445893288, -0.014912713319063187, -0.07032843679189682, 0.0257337037473917, 0.02744404412806034, 0.006934262812137604, -0.049483221024274826, 0.002038364764302969, 0.13881143927574158, 0.058677829802036285, 0.07086487859487534, -0.06282996386289597, -0.09858058393001556, -0.003990327939391136, 0.014063030481338501, 0.03868143633008003, -0.02628942020237446, 0.021943416446447372, 0.04554199427366257, -0.018783630803227425, 0.048385027796030045, -0.027759471908211708, 0.01167730987071991, -0.0010224221041426063, -0.038041580468416214, -0.06342600286006927, -0.008640739135444164, 0.028986971825361252, -0.12879492342472076, 0.007300601806491613, 0.007053443696349859, 0.08476904034614563, 0.05876721069216728, 0.029689539223909378, -0.03319573029875755, -0.007154295686632395, 0.07879304140806198, -0.031690433621406555, -0.04632970318198204, -0.04526710510253906, -0.06252416223287582, 0.05416890233755112, -0.012194891460239887, 0.0517144501209259, -0.07586146891117096, -0.060157228261232376, -0.011328048072755337, 0.01735731214284897, -0.03828166052699089, -0.06055835634469986, 0.03279002383351326, -0.048784077167510986, 0.029540807008743286, -0.05921002849936485, -0.06774554401636124, -0.02244628220796585, 0.04097190499305725, -0.09010229259729385, 0.06054520979523659, -0.03177982568740845, -0.06517884880304337, -0.09354817867279053, -0.03903462737798691, 0.0679708793759346, -0.04870930686593056, -0.05067284032702446, -0.07942886650562286, -0.08457393199205399, 0.011921812780201435, 0.04034017398953438, -0.02463175542652607, 0.016158366575837135, -0.027095910161733627, -0.08052272349596024, 0.06708857417106628, 0.07706671953201294, -0.008315101265907288, -0.017554765567183495, 0.048331014811992645, -0.010132844559848309, 0.044578827917575836, 0.06726895272731781, 0.03447156026959419, 0.04084089770913124, 0.03907962888479233, 0.11799394339323044, -0.015386605635285378, 0.048041537404060364, 0.05268768593668938, 0.04305003955960274, -0.058371223509311676, -5.3900187424460455e-8, -0.04439602047204971, -0.10302112251520157, -0.005984503775835037, 0.005688781850039959, -0.0455516055226326, 0.010992650873959064, 0.04270036518573761, -0.003915117587894201, 0.0011090413900092244, 0.000810869038105011, 0.08949049562215805, 0.06956605613231659, -0.0824068933725357, 0.025481155142188072, -0.04796230047941208, 0.10415630787611008, -0.018128646537661552, 0.0021540543530136347, 0.05275171995162964, -0.054324619472026825, 0.03589383512735367, 0.028771277517080307, 0.01851402036845684, 0.009139143861830235, -0.05413630232214928, -0.10683754831552505, -0.0145226726308465, 0.057935114949941635, -0.10969153791666031, -0.06436178088188171, 0.034937940537929535, 0.013110371306538582, 0.07369621098041534, -0.05896450951695442, -0.05624760314822197, -0.007832715287804604, 0.038365744054317474, -0.03899528831243515, -0.06254956871271133, -0.0915881097316742, 0.08838720619678497, 0.017362238839268684, -0.0002608771319501102, -0.09993129223585129, -0.04996738210320473, 0.04202897846698761, 0.09893082082271576, -0.03467170521616936, -0.0396740660071373, -0.061956651508808136, -0.016548290848731995, -0.009220827370882034, 0.006017268169671297, 0.0974813923239708, 0.025853296741843224, -0.010170127265155315, -0.03868003934621811, -0.07857368886470795, 0.007563561201095581, 0.05046134069561958, -0.007738923653960228, 0.0056837210431694984, 0.041313834488391876, 0.02458656206727028 ]
0.220986
## Install Install [marimo](https://marimo.io). You can use `pip` or `uv` for this. You can also use `uv` to create a sandboxed environment for marimo by running: ``` uvx marimo edit --sandbox notebook.py ``` ## Usage with Ollama 1. In marimo, go to the user settings and go to the AI tab. From here you can find and configure Ollama as an AI provider. For local use you would typically point the base url to `http://localhost:11434/v1`.2. Once the AI provider is set up, you can turn on/off specific AI models you'd like to access.3. You can also add a model to the list of available models by scrolling to the bottom and using the UI there.4. Once configured, you can now use Ollama for AI chats in marimo.4. Alternatively, you can now use Ollama for \*\*inline code completion\*\* in marimo. This can be configured in the "AI Features" tab.## Connecting to ollama.com 1. Sign in to ollama cloud via `ollama signin` 2. In the ollama model settings add a model that ollama hosts, like `gpt-oss:120b`. 3. You can now refer to this model in marimo!
https://github.com/ollama/ollama/blob/main//docs/integrations/marimo.mdx
main
ollama
[ -0.035762153565883636, -0.013870704919099808, -0.04565691947937012, 0.022677510976791382, 0.02899787202477455, -0.043164074420928955, -0.029234889894723892, 0.05064702406525612, -0.01323128491640091, -0.030154787003993988, 0.03228822350502014, -0.031921979039907455, -0.016420753672719002, 0.019519902765750885, 0.1002684086561203, 0.0831158235669136, 0.04357932507991791, -0.005040179472416639, 0.02060130052268505, 0.014112996868789196, 0.07558353245258331, 0.07041788101196289, 0.042283158749341965, -0.04225996136665344, -0.05293617397546768, 0.01636311039328575, 0.03580286353826523, 0.025340642780065536, 0.014124756678938866, -0.016745060682296753, 0.05715809017419815, 0.02009972557425499, 0.02943160943686962, 0.028512688353657722, 0.04654823616147041, -0.019344037398695946, -0.07095325738191605, -0.07923376560211182, -0.01450181845575571, -0.03283996507525444, 0.05961202085018158, -0.0004997099749743938, -0.06915172189474106, -0.0678635761141777, -0.0031289788894355297, -0.08482902497053146, -0.01822197064757347, -0.0431666299700737, 0.07492970675230026, -0.009321112185716629, -0.08447898924350739, -0.0447746179997921, -0.028628403320908546, 0.05477878451347351, -0.005213312804698944, -0.0004040877684019506, 0.007511734031140804, -0.012580116279423237, 0.011287452653050423, 0.0176351610571146, 0.030085936188697815, 0.032404396682977676, 0.05036524683237076, -0.02230585552752018, -0.028343914076685905, 0.07107968628406525, -0.047093186527490616, 0.04851306974887848, 0.01119101420044899, -0.05487237870693207, -0.0061063035391271114, 0.047321368008852005, -0.00937972404062748, 0.031036533415317535, -0.013759748078882694, -0.027227425947785378, 0.030885877087712288, 0.0113670714199543, 0.03650158643722534, -0.049327366054058075, -0.04102259874343872, -0.02013387717306614, 0.05469712242484093, 0.031001267954707146, 0.017325013875961304, 0.03377776965498924, -0.008065197616815567, 0.07683650404214859, 0.12522226572036743, -0.017406810075044632, -0.024836597964167595, -0.0631171390414238, -0.030590975657105446, -0.03423620015382767, 0.08322513103485107, -0.0324198380112648, 0.058199912309646606, -0.0331646092236042, -0.05544885993003845, 0.06853759288787842, 0.024258270859718323, -0.04612323269248009, -0.048466071486473083, -0.022713463753461838, -0.020342214033007622, 0.02183147333562374, 0.14569823443889618, 0.006398799829185009, -0.0043602436780929565, 0.0008822519448585808, -0.04270448535680771, -0.1094987690448761, 0.03334615007042885, -0.07072197645902634, 0.01868188939988613, 0.10404569655656815, 0.04880836606025696, 0.05525653809309006, 0.051713231950998306, 0.027142038568854332, 0.01955738291144371, -0.0669124647974968, 0.05540386214852333, 0.07168959826231003, 0.06232134625315666, 0.07564212381839752, -0.06532157212495804, 2.6394149750600395e-33, 0.06928916275501251, 0.010974191129207611, -0.0430980809032917, 0.010295127518475056, 0.09142782539129257, 0.011974092572927475, 0.06705363839864731, -0.06521854549646378, -0.056824732571840286, -0.08813938498497009, -0.10955280810594559, 0.08102305233478546, -0.103634312748909, 0.016573607921600342, 0.03719250485301018, -0.013019805774092674, -0.017706256359815598, 0.022794531658291817, 0.05312301963567734, 0.058107469230890274, 0.03349262475967407, -0.08485651016235352, 0.006225718650966883, 0.042378973215818405, 0.0010672983480617404, 0.10753867030143738, 0.004593255463987589, -0.06475191563367844, 0.005653282627463341, 0.03128213435411453, 0.037122681736946106, 0.011747687123715878, -0.09674320369958878, 0.013257206417620182, 0.00008832442836137488, -0.005869888700544834, -0.09938635677099228, 0.0125285554677248, -0.07061638683080673, 0.038029156625270844, -0.008073464035987854, 0.020415809005498886, 0.012418580241501331, -0.041689105331897736, -0.0887874886393547, -0.025468070060014725, -0.05505397543311119, 0.017437361180782318, 0.06644118577241898, -0.023891301825642586, -0.0655016228556633, -0.0025882693007588387, -0.09051790833473206, -0.03778907656669617, -0.005284901242703199, -0.09512127935886383, -0.053319334983825684, 0.012407328002154827, 0.04960627481341362, -0.04275917634367943, -0.034442439675331116, -0.03281410411000252, -0.022548530250787735, 0.03661864995956421, -0.03174470737576485, 0.02332097664475441, 0.0016131512820720673, 0.002232948085293174, 0.05843265727162361, -0.008928856812417507, -0.07524695992469788, 0.010911419987678528, -0.013540878891944885, 0.03003712184727192, -0.09494030475616455, 0.0005674889544025064, -0.029082149267196655, -0.07328282296657562, -0.0375332310795784, 0.019244564697146416, -0.015628933906555176, 0.003490129020065069, -0.01723318360745907, 0.02443992719054222, 0.026071980595588684, -0.072940893471241, 0.03486037254333496, 0.015116572380065918, -0.0490855947136879, 0.005693112500011921, -0.012283282354474068, 0.020296931266784668, 0.02732677198946476, -0.02147703245282173, -0.08054869621992111, -2.8520532705871524e-33, 0.06308787316083908, -0.024505559355020523, -0.001545850420370698, -0.037387605756521225, 0.02072944864630699, -0.00306800939142704, 0.052143827080726624, 0.010634937323629856, 0.003271615831181407, -0.012674529105424881, -0.02120537869632244, -0.00767041090875864, 0.07913608849048615, -0.002989099593833089, 0.03233620524406433, 0.03837653249502182, -0.04552575200796127, -0.024211108684539795, 0.04141531512141228, 0.01709062233567238, -0.11202993243932724, 0.021758226677775383, -0.03905494883656502, -0.021770909428596497, -0.010004731826484203, 0.030574558302760124, -0.06361410021781921, -0.007731860037893057, -0.053762178868055344, -0.046308886259794235, -0.022516729310154915, 0.05756109580397606, -0.09900052100419998, 0.007402428425848484, 0.02366574853658676, 0.13756872713565826, 0.03477989137172699, 0.015634488314390182, -0.08217772841453552, 0.059291619807481766, 0.15703631937503815, -0.07146340608596802, -0.12252867221832275, -0.019417021423578262, -0.058195795863866806, 0.042426105588674545, -0.06478899717330933, 0.021848682314157486, -0.11964081227779388, -0.03570152074098587, 0.002769113052636385, -0.029695531353354454, -0.03989791125059128, -0.05301675945520401, -0.058719415217638016, -0.014957977458834648, 0.06943606585264206, 0.014706911519169807, -0.09843625873327255, 0.043292466551065445, 0.0200178362429142, -0.12139949202537537, 0.03174423426389694, -0.01617896370589733, -0.09257746487855911, -0.04356957599520683, -0.006719745229929686, 0.05679553747177124, -0.030393799766898155, -0.05338122695684433, -0.0347307063639164, -0.08174736052751541, 0.032784800976514816, 0.10894283652305603, 0.07467229664325714, 0.021648438647389412, -0.059536490589380264, 0.023905513808131218, 0.039107631891965866, -0.021980907768011093, -0.032270774245262146, 0.013156344182789326, 0.014960967935621738, -0.011150139383971691, 0.044790394604206085, 0.07543566823005676, 0.023096755146980286, 0.07977909594774246, -0.0003082051407545805, -0.003492567455396056, -0.038681384176015854, 0.04830457642674446, -0.031107431277632713, 0.08935879170894623, -0.04451018199324608, -5.218885235080961e-8, -0.028579212725162506, -0.04518146440386772, 0.04051465541124344, 0.062225911766290665, -0.05142896994948387, 0.017025688663125038, 0.026789233088493347, 0.07131193578243256, 0.03246898204088211, 0.04101302847266197, -0.007273537106812, 0.0004479185736272484, 0.03304610773921013, 0.0112366434186697, -0.0371939092874527, 0.11284852772951126, 0.022720210254192352, 0.0692705437541008, 0.0313599556684494, -0.04363865405321121, 0.05518926680088043, -0.02726275846362114, 0.011455700732767582, 0.06456652283668518, 0.0011161289876326919, -0.04077086225152016, -0.08520177006721497, 0.020027227699756622, -0.06360418349504471, 0.04000706970691681, 0.04851050674915314, -0.02041158825159073, 0.042397040873765945, -0.004589011427015066, 0.006770153064280748, 0.009339929558336735, -0.03435356542468071, -0.07847818732261658, -0.07647773623466492, 0.020932665094733238, 0.07998090237379074, 0.0016585123958066106, -0.06264248490333557, -0.11987890303134918, 0.14118005335330963, 0.027507154271006584, 0.03734938055276871, -0.1436951756477356, 0.03105018474161625, 0.04219726100564003, -0.012647543102502823, -0.023438315838575363, 0.060200728476047516, 0.10194431245326996, 0.03837321698665619, -0.02305467426776886, -0.020228147506713867, -0.0795043334364891, 0.00496120098978281, 0.04925968497991562, 0.006631879135966301, 0.06676188856363297, 0.054638322442770004, 0.01870582066476345 ]
0.207051
This example uses \*\*IntelliJ\*\*; same steps apply to other JetBrains IDEs (e.g., PyCharm). ## Install Install [IntelliJ](https://www.jetbrains.com/idea/). ## Usage with Ollama To use \*\*Ollama\*\*, you will need a [JetBrains AI Subscription](https://www.jetbrains.com/ai-ides/buy/?section=personal&billing=yearly). 1. In Intellij, click the \*\*chat icon\*\* located in the right sidebar2. Select the \*\*current model\*\* in the sidebar, then click \*\*Set up Local Models\*\*3. Under \*\*Third Party AI Providers\*\*, choose \*\*Ollama\*\* 4. Confirm the \*\*Host URL\*\* is `http://localhost:11434`, then click \*\*Ok\*\* 5. Once connected, select a model under \*\*Local models by Ollama\*\*
https://github.com/ollama/ollama/blob/main//docs/integrations/jetbrains.mdx
main
ollama
[ -0.08624786883592606, -0.07114212214946747, -0.021550962701439857, 0.029501112177968025, -0.022332750260829926, -0.01267119962722063, -0.019348645582795143, -0.006052129901945591, 0.00912946555763483, -0.07359353452920914, 0.016597343608736992, -0.05062275752425194, -0.07961421459913254, 0.04026849940419197, 0.051058366894721985, 0.09490328282117844, -0.016230713576078415, -0.03971374034881592, 0.01263800822198391, 0.02013508789241314, 0.05039617419242859, 0.02017141319811344, 0.03545916825532913, -0.07003889977931976, -0.007054067216813564, -0.00033254997106269, 0.0816807895898819, 0.05071590468287468, 0.011931468732655048, -0.00043685256969183683, 0.11704977601766586, 0.01426390279084444, 0.012448419816792011, 0.00943746231496334, 0.1104229986667633, -0.03530088812112808, -0.014462674036622047, -0.03524306043982506, 0.015374729409813881, -0.01801963709294796, 0.05156650021672249, -0.04740152880549431, -0.00721793994307518, -0.014916705898940563, 0.021343041211366653, -0.1185215562582016, -0.07498330622911453, -0.03770970553159714, 0.0630665197968483, 0.02473372407257557, -0.13380813598632812, -0.11486590653657913, -0.0165711622685194, 0.020833345130085945, 0.042774785310029984, 0.019957778975367546, 0.04514973238110542, 0.014234146103262901, -0.07535108178853989, 0.011904184706509113, 0.07049428671598434, 0.009154790081083775, 0.022649429738521576, 0.03886229172348976, -0.11499336361885071, 0.01377946324646473, 0.025101449340581894, 0.08041771501302719, -0.02665984444320202, -0.060943812131881714, -0.049739494919776917, 0.03384875878691673, -0.05960431322455406, -0.001127272960729897, 0.05461355671286583, 0.016385596245527267, 0.03475583344697952, 0.0031855187844485044, 0.045049864798784256, -0.10365352034568787, -0.021246615797281265, -0.025636989623308182, 0.006654343102127314, 0.010658991523087025, 0.052893105894327164, 0.0490797683596611, -0.02224411815404892, -0.0045300982892513275, 0.08187980949878693, 0.03785230964422226, -0.0011796087492257357, -0.12131045013666153, -0.00014632583770435303, -0.06144515052437782, 0.06404207646846771, -0.0263887420296669, 0.029618965461850166, -0.012334000319242477, -0.012979460880160332, 0.07544328272342682, -0.09918065369129181, -0.003991095814853907, 0.03471248969435692, 0.04559685289859772, -0.03655334189534187, 0.04460015147924423, 0.1176232397556305, 0.02321178838610649, 0.0018888937775045633, -0.046124283224344254, -0.037783849984407425, -0.055588144809007645, 0.05267957225441933, -0.06299317628145218, -0.009994087740778923, -0.00018707383424043655, 0.04120267182588577, 0.08336370438337326, 0.07572638243436813, 0.026247132569551468, -0.01535022258758545, -0.0764506384730339, -0.002640215214341879, 0.013692839071154594, 0.0014017345383763313, 0.07080511748790741, -0.10661996155977249, 1.4544400786273779e-33, 0.14105185866355896, -0.014237308874726295, -0.05412856489419937, 0.011658966541290283, -0.007517797872424126, -0.018795110285282135, -0.01132151298224926, -0.04604653641581535, -0.08873797208070755, 0.01275673508644104, -0.10162094235420227, -0.04036429896950722, 0.012205111794173717, -0.01628856174647808, -0.005930016282945871, -0.012383160181343555, 0.020596353337168694, 0.07057888060808182, 0.05580693110823631, 0.04170211777091026, 0.04540730267763138, 0.002601426560431719, -0.016359150409698486, -0.019324524328112602, -0.00023943520500324667, 0.16471946239471436, 0.018011175096035004, 0.029921887442469597, -0.0009356666123494506, 0.03419143334031105, 0.09181909263134003, -0.06820172816514969, -0.07550424337387085, 0.06078147515654564, 0.03745422139763832, 0.035529185086488724, -0.039641719311475754, -0.03406732529401779, -0.04642390459775925, 0.016522148624062538, 0.007545826956629753, 0.015084687620401382, -0.06438803672790527, -0.023873865604400635, -0.045140303671360016, 0.014573635533452034, -0.041605282574892044, -0.05977519974112511, 0.10190805792808533, -0.011289780028164387, -0.11392742395401001, 0.007910176180303097, -0.0550675243139267, 0.028713960200548172, 0.006662003695964813, -0.06912902742624283, -0.030137306079268456, 0.044084735214710236, 0.10945171117782593, -0.07889005541801453, -0.07709130644798279, 0.043868739157915115, -0.040370482951402664, 0.00676730228587985, 0.037334829568862915, 0.035157546401023865, 0.015234995633363724, -0.006518553476780653, 0.01712915673851967, 0.049232978373765945, -0.03706735000014305, 0.008693077601492405, -0.01389666274189949, 0.031188208609819412, -0.098905548453331, -0.06294688582420349, -0.07720305770635605, -0.024741649627685547, -0.008183365687727928, 0.009411873295903206, -0.05917206406593323, -0.010942962020635605, -0.05157800763845444, 0.0070828841999173164, 0.06039883568882942, 0.00689379358664155, 0.026519380509853363, -0.0052369385957717896, -0.01881336234509945, -0.027089199051260948, -0.0035899581853300333, 0.03595959022641182, -0.0064745391719043255, -0.04548026993870735, -0.05133829638361931, -2.3147292926965153e-33, 0.066111259162426, 0.00036921436549164355, -0.028013603761792183, -0.03793438896536827, -0.043664466589689255, 0.03114672377705574, 0.06385552883148193, 0.041636426001787186, -0.028804514557123184, 0.023318562656641006, 0.05910344421863556, 0.010962100699543953, 0.0325198657810688, -0.05947346240282059, 0.11833571642637253, 0.047541819512844086, -0.03623175621032715, -0.05562857538461685, -0.023063121363520622, 0.0433649979531765, -0.017704766243696213, 0.05346598103642464, -0.06850000470876694, 0.015969641506671906, 0.02834925800561905, -0.030757339671254158, -0.007073757704347372, 0.017260367050766945, -0.04360624775290489, -0.03772895783185959, 0.04442591220140457, 0.023052038624882698, -0.14583726227283478, 0.0029197910334914923, 0.014007613994181156, 0.11701228469610214, 0.006772488355636597, 0.036863286048173904, -0.06759591400623322, 0.04144340381026268, 0.0916847363114357, -0.06901799887418747, -0.12273800373077393, 0.06068798899650574, -0.04157709702849388, 0.04312635958194733, -0.05393819138407707, -0.003212389536201954, -0.09767741709947586, -0.042458269745111465, -0.004711056128144264, -0.06206570193171501, 0.0010151315946131945, -0.07392830401659012, -0.00607482623308897, -0.0003060880699194968, 0.11586561053991318, -0.01715434342622757, -0.06894978135824203, 0.015163050964474678, 0.02556523308157921, -0.15414012968540192, 0.02663702704012394, 0.01415291242301464, -0.02666935697197914, -0.02041199803352356, 0.03772973641753197, 0.10033657401800156, -0.043859612196683884, -0.08022444695234299, -0.051144491881132126, -0.014421566389501095, 0.004223763942718506, 0.019726617261767387, 0.02614659070968628, -0.04060830548405647, -0.07681627571582794, 0.01660807617008686, 0.04219808802008629, 0.031010359525680542, 0.004224545322358608, -0.01920536905527115, 0.04344793036580086, -0.014402165077626705, 0.02039547823369503, -0.02268841676414013, 0.005177497863769531, 0.14964818954467773, -0.02950943075120449, -0.05269130691885948, -0.07523225247859955, 0.061015814542770386, 0.022801473736763, 0.05521845445036888, -0.051425784826278687, -5.428191585110653e-8, -0.028792474418878555, -0.030179250985383987, 0.053396064788103104, 0.06305842101573944, -0.06184092536568642, -0.029257670044898987, -0.07014920562505722, 0.03181207552552223, 0.02687547728419304, 0.050552673637866974, -0.013486748561263084, 0.04943883791565895, -0.007184377871453762, 0.03960601985454559, -0.037721287459135056, -0.0003682028909679502, -0.03365298733115196, 0.09392844140529633, 0.03066904842853546, -0.027915824204683304, 0.059674277901649475, 0.000983394798822701, 0.02512485533952713, -0.03041192702949047, 0.02027532272040844, -0.02457929402589798, -0.06911946088075638, 0.014782781712710857, -0.051272787153720856, -0.01303881872445345, 0.00908836629241705, 0.023233065381646156, 0.016887523233890533, 0.00585317425429821, -0.02527753636240959, 0.026370976120233536, 0.011252759024500847, -0.010263699106872082, -0.0246366485953331, 0.03209931030869484, 0.07863470911979675, -0.0160354096442461, -0.05606633052229881, -0.042016830295324326, 0.08382149785757065, 0.0776609256863594, 0.014783798716962337, -0.09507796168327332, 0.01795634999871254, -0.007967940531671047, -0.026385169476270676, -0.006087783258408308, 0.07553163170814514, 0.10084218531847, -0.05532184988260269, 0.021412691101431847, -0.007320323493331671, -0.01615876331925392, -0.03778567910194397, 0.023718733340501785, 0.04182381555438042, 0.03805810213088989, 0.007765322457998991, -0.0065672374330461025 ]
0.209175
## Goose Desktop Install [Goose](https://block.github.io/goose/docs/getting-started/installation/) Desktop. ### Usage with Ollama 1. In Goose, open \*\*Settings\*\* β†’ \*\*Configure Provider\*\*.2. Find \*\*Ollama\*\*, click \*\*Configure\*\* 3. Confirm \*\*API Host\*\* is `http://localhost:11434` and click Submit ### Connecting to ollama.com 1. Create an [API key](https://ollama.com/settings/keys) on ollama.com and save it in your `.env` 2. In Goose, set \*\*API Host\*\* to `https://ollama.com` ## Goose CLI Install [Goose](https://block.github.io/goose/docs/getting-started/installation/) CLI ### Usage with Ollama 1. Run `goose configure` 2. Select \*\*Configure Providers\*\* and select \*\*Ollama\*\*3. Enter model name (e.g `qwen3`) ### Connecting to ollama.com 1. Create an [API key](https://ollama.com/settings/keys) on ollama.com and save it in your `.env` 2. Run `goose configure` 3. Select \*\*Configure Providers\*\* and select \*\*Ollama\*\* 4. Update \*\*OLLAMA\_HOST\*\* to `https://ollama.com`
https://github.com/ollama/ollama/blob/main//docs/integrations/goose.mdx
main
ollama
[ -0.0925910696387291, -0.0341634675860405, -0.07219167798757553, -0.000693978276103735, -0.014935977756977081, -0.08703190833330154, -0.08675030618906021, -0.007924468256533146, -0.003046231111511588, -0.060019880533218384, 0.03505503013730049, -0.014019232243299484, -0.08235578238964081, -0.029657941311597824, 0.10524571686983109, 0.048621464520692825, 0.03629402071237564, -0.03104579448699951, 0.04161752015352249, 0.023354358971118927, 0.00545275816693902, -0.028167305514216423, 0.010496089234948158, -0.004224718082696199, -0.04357283189892769, -0.0569293387234211, -0.0293295755982399, 0.0532405711710453, 0.0071721202693879604, -0.00634125666692853, 0.07051949948072433, 0.002886194037273526, -0.06270013004541397, 0.020442191511392593, 0.03247329592704773, 0.05890720710158348, 0.08322436362504959, -0.107095867395401, -0.050902530550956726, 0.011521630920469761, 0.12135273963212967, 0.011738119646906853, -0.05521219223737717, -0.07240191847085953, 0.0264532919973135, -0.0681590661406517, -0.011390483006834984, -0.02071318030357361, 0.023491084575653076, 0.013823171146214008, -0.05771978572010994, -0.0764143094420433, -0.02701091393828392, -0.06046590581536293, 0.027829432860016823, 0.03033999726176262, -0.012566113844513893, 0.03797296807169914, 0.024672359228134155, 0.05910652130842209, 0.024085095152258873, -0.009415436536073685, -0.008190168999135494, 0.04022734612226486, -0.05263932794332504, 0.0009744674316607416, -0.06349311769008636, -0.027321478351950645, -0.025717806071043015, -0.06563812494277954, -0.06567346304655075, 0.0480564720928669, -0.059470053762197495, 0.00723644345998764, 0.006938626524060965, -0.010134599171578884, -0.039687275886535645, 0.05719844996929169, 0.00012537093425635248, 0.026807336136698723, 0.02253515087068081, 0.012627932243049145, 0.026874566450715065, 0.11570636183023453, 0.021055877208709717, 0.011265694163739681, 0.02757103741168976, 0.022542523220181465, 0.06351098418235779, 0.0008733425638638437, 0.018571829423308372, -0.04271511361002922, -0.013595561496913433, -0.012438042089343071, 0.07779062539339066, 0.02847425267100334, -0.0009819307597354054, -0.00138582824729383, -0.06254124641418457, 0.04276225343346596, -0.09211400896310806, -0.055820584297180176, 0.029633432626724243, 0.023371994495391846, -0.04757688194513321, 0.021716972813010216, 0.05532640591263771, 0.08247637748718262, -0.013326108455657959, -0.016162019222974777, -0.027151228860020638, -0.09552449733018875, 0.03393726795911789, -0.07750941812992096, -0.006177191156893969, 0.048205114901065826, -0.055884551256895065, -0.015663979575037956, 0.04727165400981903, -0.04785147309303284, 0.06689751893281937, -0.064539335668087, 0.0365234911441803, -0.00236036186106503, 0.006789648439735174, 0.12070809304714203, 0.030209682881832123, 5.140646548419088e-33, 0.12936533987522125, 0.025414425879716873, -0.03325513005256653, 0.016676506027579308, 0.04525404050946236, -0.0229814276099205, 0.06942303478717804, -0.033437006175518036, -0.07225052267313004, 0.00013608804147224873, -0.013610218651592731, 0.07250547409057617, -0.05666081979870796, -0.00881872046738863, 0.03086494654417038, -0.046647027134895325, 0.0631132498383522, 0.07749029248952866, 0.08082367479801178, 0.01675417460501194, 0.026424840092658997, 0.027663787826895714, 0.08001203835010529, -0.023091310635209084, 0.015575524419546127, -0.0012860153801739216, -0.045904677361249924, -0.03423004224896431, 0.010720339603722095, 0.004955108743160963, 0.15667130053043365, -0.0216477420181036, -0.04303717240691185, -0.01233125850558281, -0.00513347378000617, -0.033104438334703445, -0.08924837410449982, -0.07348954677581787, -0.09163063019514084, 0.04882818087935448, 0.04162470996379852, -0.018305465579032898, -0.05794709175825119, -0.037234827876091, -0.03263241425156593, -0.030635539442300797, -0.022591834887862206, -0.04555286094546318, 0.16385702788829803, 0.02212570048868656, -0.07202964276075363, -0.023329026997089386, -0.06352808326482773, 0.022891119122505188, 0.07789862900972366, -0.0002751012216322124, -0.03648168966174126, -0.038790274411439896, 0.07180263102054596, -0.0885353833436966, -0.07389221340417862, -0.004669745918363333, -0.023848114535212517, -0.09417328983545303, -0.009519629180431366, -0.032107096165418625, -0.019910063594579697, 0.052231498062610626, -0.023530401289463043, -0.003147547133266926, -0.0044394186697900295, -0.019191522151231766, -0.04495367035269737, 0.039022523909807205, -0.0055811647325754166, -0.01814139634370804, -0.02069789171218872, 0.04479694366455078, -0.028130080550909042, -0.01208315696567297, 0.0588839091360569, 0.019118547439575195, 0.000029226463084341958, 0.05443162843585014, 0.01249762810766697, -0.0031529583502560854, 0.05246781185269356, 0.0656227245926857, -0.012803136371076107, 0.024079563096165657, -0.0072967601008713245, 0.02660476788878441, 0.04021352902054787, -0.021621115505695343, -0.07412087917327881, -6.207153838478933e-33, 0.026427846401929855, -0.09346926957368851, -0.017717938870191574, -0.010983645915985107, -0.005128463264554739, 0.023587457835674286, 0.02344934083521366, 0.01775730401277542, 0.037021175026893616, 0.03399868682026863, 0.016448842361569405, 0.05565306171774864, 0.10146456211805344, -0.0424366369843483, 0.010359910316765308, 0.0074395849369466305, -0.11184759438037872, -0.002215520478785038, 0.024175303056836128, -0.015017037279903889, -0.09868001937866211, 0.026369372382760048, -0.0011494788341224194, 0.02513202093541622, 0.014859738759696484, 0.04284007474780083, 0.019589193165302277, -0.0307464636862278, -0.07538624852895737, -0.09478133916854858, -0.01043996773660183, 0.06826340407133102, -0.06695283204317093, 0.04654453322291374, -0.019228631630539894, 0.06133108213543892, 0.03566066920757294, 0.1489028036594391, -0.07408668100833893, -0.040767040103673935, 0.08171072602272034, -0.10648094862699509, -0.08397696912288666, -0.08640317618846893, -0.026666253805160522, -0.0005665166536346078, 0.0007571624591946602, 0.009062323719263077, -0.12085861712694168, 0.11472231149673462, 0.02278181165456772, -0.00009686611156212166, 0.021683158352971077, -0.013077105395495892, 0.004683529492467642, 0.0003656456829048693, 0.07888954132795334, -0.0210188589990139, 0.01625850424170494, -0.012742895632982254, 0.04660385474562645, -0.15515558421611786, 0.029549874365329742, 0.07361425459384918, 0.004625774919986725, -0.02332134172320366, -0.08416242897510529, 0.04557868838310242, -0.033530157059431076, -0.007831779308617115, -0.1431131511926651, -0.014997738413512707, 0.03619389235973358, -0.02000674232840538, 0.08565325289964676, 0.004509109538048506, -0.06071191653609276, -0.053229670971632004, 0.05461881309747696, 0.07493224740028381, -0.051201507449150085, 0.039720065891742706, 0.02609202265739441, -0.04676643759012222, 0.0005369068239815533, -0.0031129077542573214, 0.03625534474849701, 0.02866244502365589, 0.03345996513962746, -0.002356732962653041, -0.06694347411394119, 0.0008360613719560206, 0.019550222903490067, 0.00209954846650362, 0.08996497839689255, -5.2096137181933955e-8, -0.03699886053800583, 0.05087582767009735, -0.059963520616292953, 0.040303077548742294, -0.009621947072446346, -0.02452388033270836, 0.03527464345097542, -0.019420411437749863, -0.0029355210717767477, 0.02784971334040165, -0.033416032791137695, 0.07929704338312149, 0.014193790964782238, 0.018946370109915733, -0.09962772578001022, 0.007397396024316549, -0.0038201718125492334, 0.017760761082172394, 0.039493005722761154, -0.0527678020298481, 0.029077621176838875, -0.024077892303466797, 0.06486570835113525, 0.006367897614836693, 0.035147521644830704, -0.08486855775117874, 0.01414217334240675, 0.05535777285695076, -0.029036523774266243, -0.029246333986520767, -0.06621995568275452, -0.037050195038318634, 0.032099995762109756, -0.08786832541227341, -0.04013087972998619, -0.03214840218424797, -0.088130883872509, -0.005964154377579689, 0.009758368134498596, -0.06490939855575562, 0.07669880986213684, 0.02556115947663784, 0.06053870543837547, -0.1108514592051506, 0.052310340106487274, 0.04158642143011093, 0.06197410821914673, 0.01516209077090025, 0.0017584647284820676, 0.013222350738942623, -0.043444499373435974, -0.020568564534187317, 0.06703828275203705, 0.09243779629468918, 0.02448878437280655, -0.04422327131032944, -0.06270056962966919, -0.049127645790576935, 0.030654916539788246, -0.00273835938423872, -0.02945157326757908, -0.021594859659671783, 0.10181759297847748, 0.024585405364632607 ]
-0.025897
Certain API endpoints stream responses by default, such as `/api/generate`. These responses are provided in the newline-delimited JSON format (i.e. the `application/x-ndjson` content type). For example: ```json {"model":"gemma3","created\_at":"2025-10-26T17:15:24.097767Z","response":"That","done":false} {"model":"gemma3","created\_at":"2025-10-26T17:15:24.109172Z","response":"'","done":false} {"model":"gemma3","created\_at":"2025-10-26T17:15:24.121485Z","response":"s","done":false} {"model":"gemma3","created\_at":"2025-10-26T17:15:24.132802Z","response":" a","done":false} {"model":"gemma3","created\_at":"2025-10-26T17:15:24.143931Z","response":" fantastic","done":false} {"model":"gemma3","created\_at":"2025-10-26T17:15:24.155176Z","response":" question","done":false} {"model":"gemma3","created\_at":"2025-10-26T17:15:24.166576Z","response":"!","done":true, "done\_reason": "stop"} ``` ## Disabling streaming Streaming can be disabled by providing `{"stream": false}` in the request body for any endpoint that support streaming. This will cause responses to be returned in the `application/json` format instead: ```json {"model":"gemma3","created\_at":"2025-10-26T17:15:24.166576Z","response":"That's a fantastic question!","done":true} ``` ## When to use streaming vs non-streaming \*\*Streaming (default)\*\*: - Real-time response generation - Lower perceived latency - Better for long generations \*\*Non-streaming\*\*: - Simpler to process - Better for short responses, or structured outputs - Easier to handle in some applications
https://github.com/ollama/ollama/blob/main//docs/api/streaming.mdx
main
ollama
[ -0.07212688773870468, 0.008659245446324348, 0.017529070377349854, -0.001328409998677671, 0.0074849254451692104, -0.04434001445770264, -0.04873806983232498, -0.042441800236701965, 0.06628303229808807, -0.010079823434352875, -0.014444796368479729, -0.07271631807088852, -0.053339384496212006, 0.026489341631531715, 0.02057848684489727, -0.011047398671507835, -0.033920858055353165, -0.051303792744874954, -0.06393919885158539, -0.07722200453281403, 0.089079350233078, 0.06270285695791245, -0.04657154530286789, 0.0192704014480114, 0.016292782500386238, -0.019797014072537422, 0.04760221391916275, 0.023478839546442032, 0.019056901335716248, -0.013353304006159306, -0.016975363716483116, -0.056850217282772064, -0.04308513179421425, 0.05625974386930466, 0.05615222826600075, 0.030986126512289047, 0.046100035309791565, -0.07937099784612656, 0.04046911001205444, 0.0013781697489321232, 0.0864432230591774, 0.017004409804940224, -0.03591388463973999, -0.028692610561847687, 0.042398665100336075, -0.04323031008243561, -0.09040675312280655, -0.057797130197286606, -0.05239398777484894, 0.03334560990333557, -0.022278396412730217, 0.0068222773261368275, -0.03780229017138481, 0.017820170149207115, 0.036178041249513626, -0.026714928448200226, -0.1172114759683609, -0.0112907188013196, -0.039475217461586, -0.028266457840800285, 0.04483066499233246, -0.061085473746061325, -0.03003028966486454, -0.003578929463401437, -0.02300296537578106, -0.013331110589206219, -0.11913278698921204, 0.06195344775915146, 0.11370211094617844, -0.045902203768491745, -0.01856781728565693, -0.061624329537153244, -0.07316736876964569, -0.05142810568213463, -0.010783598758280277, 0.02700374647974968, -0.003996019717305899, 0.030848437920212746, -0.04991278797388077, -0.021967900916934013, 0.007177167572081089, -0.05199328809976578, 0.004634906072169542, 0.06122487783432007, -0.01440317090600729, 0.06918305158615112, -0.060060251504182816, 0.02833506278693676, 0.05761045962572098, 0.0660526230931282, -0.07336261123418808, -0.03335242345929146, -0.015962719917297363, 0.06005563959479332, -0.04573306068778038, 0.07453188300132751, 0.03310832753777504, -0.06649105995893478, 0.03389449417591095, 0.0668220967054367, 0.03744862973690033, 0.041251227259635925, 0.09280847012996674, 0.0415930338203907, 0.052373673766851425, -0.008349902927875519, -0.011439860798418522, 0.058228205889463425, -0.08970464020967484, 0.04595232754945755, -0.019489694386720657, 0.06124279648065567, 0.024573858827352524, -0.04591762647032738, -0.01601956970989704, 0.016970496624708176, -0.00552585581317544, 0.004908973816782236, -0.015354510396718979, 0.08117863535881042, 0.09942188858985901, -0.04594660922884941, -0.04080497846007347, 0.06934480369091034, 0.05617117881774902, -0.009989501908421516, 0.012370078824460506, 9.271214311063601e-33, 0.07703714817762375, -0.015045220963656902, 0.09112469851970673, -0.017388947308063507, 0.006596534978598356, 0.016042986884713173, -0.06217219680547714, 0.01985824480652809, 0.02037060633301735, -0.01864636316895485, -0.06354909390211105, -0.053270790725946426, 0.005828541237860918, -0.016693640500307083, -0.03874773159623146, -0.03666194900870323, 0.00452494528144598, 0.02956254966557026, -0.05445140600204468, 0.08597955107688904, -0.03932025283575058, 0.024051498621702194, 0.0009319236851297319, -0.01926133781671524, 0.04387800395488739, -0.0238572359085083, -0.02186993695795536, -0.021070756018161774, -0.15121521055698395, 0.006259730085730553, -0.002253058599308133, -0.04825163260102272, 0.039057329297065735, 0.0644260048866272, 0.022620631381869316, 0.06091096252202988, -0.007453056052327156, -0.02197687327861786, -0.0390818789601326, -0.02383115142583847, -0.010163025930523872, 0.03067094460129738, -0.11475224792957306, 0.0022316083777695894, -0.0880993902683258, -0.06610985100269318, -0.04901597648859024, -0.026001280173659325, -0.04650386795401573, -0.01612953655421734, -0.000005374395186663605, 0.08823303878307343, 0.04200751334428787, -0.048836108297109604, 0.03697606921195984, -0.0781610980629921, 0.02475898526608944, 0.03164849430322647, 0.00986224040389061, -0.001534167560748756, 0.02986982837319374, -0.02460046485066414, -0.046849530190229416, -0.015508268028497696, 0.08969772607088089, 0.008018942549824715, 0.0685071274638176, 0.04115124046802521, 0.006341015454381704, 0.032498929649591446, -0.05255035683512688, 0.038003794848918915, 0.040392305701971054, 0.018163716420531273, -0.03986802697181702, -0.10791105777025223, 0.01406578253954649, 0.059404488652944565, 0.11106924712657928, -0.03146153688430786, 0.08843015879392624, -0.01750549115240574, -0.056426167488098145, 0.029780738055706024, -0.004684475716203451, 0.020673789083957672, 0.007535399403423071, -0.06127839908003807, -0.015672054141759872, -0.022295335307717323, -0.025896111503243446, 0.0005123406299389899, -0.04818857088685036, -0.02428976260125637, -0.051121920347213745, -9.446820677448973e-33, 0.046482160687446594, -0.053104039281606674, -0.06311525404453278, -0.017656192183494568, -0.04718296602368355, -0.0368727408349514, 0.06677796691656113, 0.10289033502340317, 0.10087782144546509, 0.09441615641117096, 0.05309707671403885, -0.05602182075381279, 0.000014662483408756088, 0.0075655546970665455, 0.03783225268125534, 0.005365889519453049, 0.020914874970912933, -0.07982014864683151, 0.07607962936162949, -0.038385018706321716, -0.0009387407917529345, 0.005014447961002588, -0.02077300474047661, -0.006643684580922127, 0.04474806413054466, -0.05629785731434822, -0.014503023587167263, 0.0015180109767243266, -0.11106190085411072, -0.03270788490772247, -0.015018447302281857, -0.02487262524664402, -0.004653262440115213, -0.026043156161904335, 0.0001693636440904811, -0.004253081977367401, 0.007522044237703085, 0.15457220375537872, 0.04665073752403259, 0.04584149271249771, 0.046848103404045105, -0.010981588624417782, -0.061174407601356506, 0.06963913887739182, 0.009883583523333073, 0.00520591763779521, -0.026918215677142143, 0.06117215007543564, -0.05050196871161461, -0.00314512406475842, 0.015103710815310478, 0.022572234272956848, -0.011090770363807678, 0.06933652609586716, 0.006581804249435663, -0.025300635024905205, 0.035406000912189484, -0.044205158948898315, -0.03951650112867355, -0.041337333619594574, -0.02745186537504196, -0.09053629636764526, -0.07817050814628601, -0.00264365435577929, 0.06683487445116043, -0.10390294343233109, -0.01574316807091236, -0.0750349760055542, -0.016243724152445793, -0.08102881908416748, 0.022876441478729248, -0.037789732217788696, -0.04378423094749451, -0.009973844513297081, 0.025976575911045074, -0.08823951333761215, -0.017439676448702812, -0.03642227500677109, -0.008262179791927338, 0.06873764842748642, -0.09762310981750488, 0.03997863456606865, 0.030167847871780396, 0.18438822031021118, 0.05571455508470535, 0.0027474297676235437, 0.002823081100359559, 0.10736748576164246, -0.01749020256102085, 0.036285415291786194, 0.026493094861507416, 0.04849883168935776, -0.09206239879131317, 0.07548371702432632, -0.0326588898897171, -5.738272434996361e-8, -0.12147758156061172, -0.054096877574920654, -0.06689305603504181, 0.046677909791469574, 0.021511686965823174, 0.10639825463294983, 0.019522713497281075, 0.04768826439976692, 0.05229566991329193, -0.07641399651765823, 0.04438023641705513, 0.07548153400421143, -0.07856927812099457, -0.03626403585076332, 0.035979051142930984, -0.02041473798453808, -0.05222300440073013, 0.029409801587462425, -0.04463744908571243, -0.0509403720498085, 0.007623864337801933, 0.09485671669244766, -0.00645803939551115, -0.07853282988071442, 0.04992719367146492, 0.038583919405937195, 0.025054970756173134, 0.069949671626091, -0.08337568491697311, -0.05276522412896156, -0.020261626690626144, -0.057400405406951904, 0.018520906567573547, -0.052891381084918976, -0.036073047667741776, 0.03409280627965927, 0.01782841421663761, 0.027244769036769867, -0.017837917432188988, 0.04625212773680687, 0.03821376711130142, 0.07274787873029709, -0.0607440210878849, 0.053323742002248764, 0.025667110458016396, 0.0005552699440158904, 0.02916523441672325, 0.03659045696258545, 0.07119446992874146, -0.07081618905067444, -0.031870037317276, -0.039028167724609375, 0.00007878653559600934, -0.06542570888996124, -0.08166228979825974, 0.023130029439926147, 0.02164667844772339, -0.03297073394060135, 0.040054697543382645, 0.03916602209210396, 0.1389736533164978, 0.014397514052689075, -0.008420872502028942, 0.029162799939513206 ]
0.099386
Ollama provides compatibility with the [Anthropic Messages API](https://docs.anthropic.com/en/api/messages) to help connect existing applications to Ollama, including tools like Claude Code. ## Usage ### Environment variables To use Ollama with tools that expect the Anthropic API (like Claude Code), set these environment variables: ```shell export ANTHROPIC\_AUTH\_TOKEN=ollama # required but ignored export ANTHROPIC\_API\_KEY="" # required but ignored export ANTHROPIC\_BASE\_URL=http://localhost:11434 ``` ### Simple `/v1/messages` example ```python basic.py import anthropic client = anthropic.Anthropic( base\_url='http://localhost:11434', api\_key='ollama', # required but ignored ) message = client.messages.create( model='qwen3-coder', max\_tokens=1024, messages=[ {'role': 'user', 'content': 'Hello, how are you?'} ] ) print(message.content[0].text) ``` ```javascript basic.js import Anthropic from "@anthropic-ai/sdk"; const anthropic = new Anthropic({ baseURL: "http://localhost:11434", apiKey: "ollama", // required but ignored }); const message = await anthropic.messages.create({ model: "qwen3-coder", max\_tokens: 1024, messages: [{ role: "user", content: "Hello, how are you?" }], }); console.log(message.content[0].text); ``` ```shell basic.sh curl -X POST http://localhost:11434/v1/messages \ -H "Content-Type: application/json" \ -H "x-api-key: ollama" \ -H "anthropic-version: 2023-06-01" \ -d '{ "model": "qwen3-coder", "max\_tokens": 1024, "messages": [{ "role": "user", "content": "Hello, how are you?" }] }' ``` ### Streaming example ```python streaming.py import anthropic client = anthropic.Anthropic( base\_url='http://localhost:11434', api\_key='ollama', ) with client.messages.stream( model='qwen3-coder', max\_tokens=1024, messages=[{'role': 'user', 'content': 'Count from 1 to 10'}] ) as stream: for text in stream.text\_stream: print(text, end='', flush=True) ``` ```javascript streaming.js import Anthropic from "@anthropic-ai/sdk"; const anthropic = new Anthropic({ baseURL: "http://localhost:11434", apiKey: "ollama", }); const stream = await anthropic.messages.stream({ model: "qwen3-coder", max\_tokens: 1024, messages: [{ role: "user", content: "Count from 1 to 10" }], }); for await (const event of stream) { if ( event.type === "content\_block\_delta" && event.delta.type === "text\_delta" ) { process.stdout.write(event.delta.text); } } ``` ```shell streaming.sh curl -X POST http://localhost:11434/v1/messages \ -H "Content-Type: application/json" \ -d '{ "model": "qwen3-coder", "max\_tokens": 1024, "stream": true, "messages": [{ "role": "user", "content": "Count from 1 to 10" }] }' ``` ### Tool calling example ```python tools.py import anthropic client = anthropic.Anthropic( base\_url='http://localhost:11434', api\_key='ollama', ) message = client.messages.create( model='qwen3-coder', max\_tokens=1024, tools=[ { 'name': 'get\_weather', 'description': 'Get the current weather in a location', 'input\_schema': { 'type': 'object', 'properties': { 'location': { 'type': 'string', 'description': 'The city and state, e.g. San Francisco, CA' } }, 'required': ['location'] } } ], messages=[{'role': 'user', 'content': "What's the weather in San Francisco?"}] ) for block in message.content: if block.type == 'tool\_use': print(f'Tool: {block.name}') print(f'Input: {block.input}') ``` ```javascript tools.js import Anthropic from "@anthropic-ai/sdk"; const anthropic = new Anthropic({ baseURL: "http://localhost:11434", apiKey: "ollama", }); const message = await anthropic.messages.create({ model: "qwen3-coder", max\_tokens: 1024, tools: [ { name: "get\_weather", description: "Get the current weather in a location", input\_schema: { type: "object", properties: { location: { type: "string", description: "The city and state, e.g. San Francisco, CA", }, }, required: ["location"], }, }, ], messages: [{ role: "user", content: "What's the weather in San Francisco?" }], }); for (const block of message.content) { if (block.type === "tool\_use") { console.log("Tool:", block.name); console.log("Input:", block.input); } } ``` ```shell tools.sh curl -X POST http://localhost:11434/v1/messages \ -H "Content-Type: application/json" \ -d '{ "model": "qwen3-coder", "max\_tokens": 1024, "tools": [ { "name": "get\_weather", "description": "Get the current weather in a location", "input\_schema": { "type": "object", "properties": { "location": { "type": "string", "description": "The city and state" } }, "required": ["location"] } } ], "messages": [{ "role": "user", "content": "What is the weather in San Francisco?" }] }' ``` ## Using with Claude Code [Claude Code](https://code.claude.com/docs/en/overview) can be configured to use Ollama as its backend. ### Recommended models For coding use cases, models like `glm-4.7`, `minimax-m2.1`, and `qwen3-coder` are recommended. Download a model before use: ```shell ollama pull qwen3-coder ``` > Note: Qwen 3 coder is a 30B parameter model requiring at least 24GB of VRAM to run
https://github.com/ollama/ollama/blob/main//docs/api/anthropic-compatibility.mdx
main
ollama
[ -0.04499582573771477, 0.043994225561618805, -0.05849657952785492, 0.03051796555519104, -0.03758574277162552, -0.16142591834068298, -0.02103067748248577, 0.011733107268810272, 0.0036353261675685644, -0.026997709646821022, 0.02371208928525448, -0.06102452427148819, -0.020641889423131943, 0.01022114884108305, 0.15061503648757935, 0.09128779172897339, 0.05121107026934624, -0.09291790425777435, -0.037810198962688446, -0.005166682880371809, 0.04367947578430176, 0.06844745576381683, 0.08557111769914627, 0.0344388410449028, -0.043970610946416855, -0.09423940628767014, -0.022255295887589455, 0.020876994356513023, 0.027447475120425224, 0.04035317897796631, 0.04261435940861702, 0.04633305221796036, -0.017101343721151352, 0.015259264968335629, 0.12379049509763718, 0.09946692734956741, 0.014428183436393738, -0.1146252378821373, -0.05026528984308243, 0.007398228161036968, 0.03336671367287636, 0.024183418601751328, -0.13824285566806793, -0.11174799501895905, -0.08475140482187271, -0.08371412009000778, 0.017246395349502563, -0.040096573531627655, -0.01805136166512966, -0.0408954955637455, -0.07717818021774292, 0.02108689211308956, -0.026856673881411552, -0.04197360575199127, 0.015613195486366749, -0.03659070283174515, -0.013346036896109581, -0.04601152613759041, -0.02346949093043804, -0.01412080880254507, -0.011943484656512737, 0.048344843089580536, -0.0044883377850055695, 0.02047821320593357, -0.012449556961655617, -0.03406304866075516, -0.0987686738371849, 0.025334032252430916, -0.010328509844839573, -0.008438950404524803, -0.08195333927869797, -0.048360325396060944, -0.06080283224582672, 0.05273003876209259, -0.0008206999045796692, -0.03748675808310509, 0.03383871912956238, 0.012730004265904427, -0.030296267941594124, -0.04355934262275696, -0.0329488143324852, -0.05795445293188095, -0.0324946865439415, 0.08853311836719513, 0.0699004977941513, 0.03045850247144699, -0.022967156022787094, 0.09804847836494446, 0.08820474147796631, -0.003463024040684104, -0.018225761130452156, -0.087209552526474, 0.029427817091345787, 0.005313094239681959, 0.07203292101621628, -0.01563134603202343, 0.07280539721250534, -0.027360962703824043, -0.06808903813362122, 0.08502434194087982, -0.02972574532032013, -0.08272679895162582, 0.011956945061683655, -0.02730805054306984, -0.0028159755747765303, 0.037563882768154144, 0.058998607099056244, 0.014582422561943531, -0.0057539911940693855, 0.048648588359355927, -0.05208633840084076, -0.09851248562335968, 0.08297861367464066, -0.025807831436395645, 0.030610771849751472, 0.06915894150733948, -0.003810662077739835, 0.0131345484405756, 0.02662070281803608, 0.01438024640083313, 0.08731957525014877, -0.08931192755699158, 0.07033353298902512, 0.059617117047309875, 0.07397729903459549, 0.034252095967531204, 0.028562001883983612, 5.809970827725391e-33, 0.04346877336502075, 0.03957786783576012, 0.01837547868490219, -0.021550992503762245, 0.04572101682424545, 0.08630751818418503, 0.07840579748153687, -0.03925922513008118, -0.027276260778307915, -0.06543449312448502, -0.04976819455623627, 0.06951618194580078, 0.0266730934381485, 0.0339793935418129, -0.03833905979990959, 0.064028799533844, -0.04529048129916191, 0.017218049615621567, 0.11989244073629379, 0.05928811803460121, 0.043141335248947144, -0.02598179504275322, 0.005455611273646355, 0.07354613393545151, -0.0051480443216860294, 0.026399418711662292, -0.019169632345438004, -0.0689128190279007, -0.021796658635139465, 0.023940423503518105, 0.05489952862262726, 0.014283369295299053, 0.012000905349850655, 0.0008331584976986051, -0.012346286326646805, 0.029587795957922935, -0.04544183984398842, -0.0716666653752327, -0.11390935629606247, -0.0402488149702549, 0.009650243446230888, 0.03349309414625168, 0.00953709427267313, -0.02005956694483757, -0.018891483545303345, -0.02313755452632904, -0.037185680121183395, 0.05465991422533989, 0.08023110777139664, -0.0005804342217743397, -0.03951660171151161, 0.0391952209174633, 0.03735150396823883, -0.02524016797542572, 0.012465721927583218, -0.07032696157693863, 0.022422781214118004, -0.052231285721063614, 0.04747018963098526, -0.081453837454319, -0.011477891355752945, -0.03278548642992973, 0.02076789177954197, -0.037359580397605896, 0.07589229941368103, -0.017479460686445236, -0.023307302966713905, 0.03180999681353569, -0.025212889537215233, -0.020549025386571884, -0.03517002984881401, -0.01003657840192318, -0.033108122646808624, 0.09624909609556198, -0.004624783992767334, -0.044658955186605453, 0.04470260441303253, -0.009061349555850029, 0.07269302010536194, 0.014905666932463646, 0.0335259847342968, -0.013004797510802746, -0.0034933784045279026, -0.006468367762863636, 0.027583152055740356, -0.03156927973031998, 0.03252381458878517, 0.031261760741472244, -0.047147758305072784, 0.0333523266017437, 0.019548634067177773, -0.06364522874355316, -0.026967937126755714, 0.06938596069812775, -0.0686403214931488, -7.534340592487052e-33, -0.009510484524071217, 0.00023353447613772005, -0.042844921350479126, -0.03477336838841438, -0.008593011647462845, 0.0006984230130910873, 0.03657098859548569, -0.014298758469522, -0.003934152889996767, 0.00955109391361475, -0.013164812698960304, -0.029425984248518944, 0.10120147466659546, 0.03355314955115318, 0.08341165632009506, -0.0402844063937664, -0.06570389866828918, -0.00047953976900316775, 0.06964858621358871, 0.024123573675751686, -0.04300062730908394, 0.0648277997970581, -0.07675480097532272, -0.007503649685531855, -0.017802907153964043, -0.00566400121897459, -0.027391817420721054, -0.03221721202135086, -0.06230223551392555, -0.09709484875202179, -0.031112011522054672, 0.1217392086982727, -0.1111481562256813, -0.011877226643264294, -0.012350013479590416, 0.0402427539229393, 0.0006434554816223681, 0.040250081568956375, -0.04227333515882492, 0.03882338106632233, 0.10727762430906296, -0.008801357820630074, -0.061788223683834076, -0.009741602465510368, -0.03292686492204666, 0.062134601175785065, -0.06393641978502274, -0.022446127608418465, -0.07184405624866486, 0.020969010889530182, 0.0887402892112732, -0.006027562543749809, 0.007044571451842785, -0.03828335925936699, 0.021395495161414146, 0.021928830072283745, 0.013711771927773952, -0.03525926172733307, -0.058763470500707626, -0.06163465604186058, 0.04392395168542862, -0.0816187709569931, 0.07152488082647324, 0.02073661796748638, -0.06528917700052261, -0.042639996856451035, -0.009849775582551956, 0.06641799211502075, -0.02967732772231102, -0.04890003055334091, -0.03259081020951271, -0.07432980835437775, -0.0013550497824326158, -0.01350437942892313, 0.058363839983940125, 0.077671580016613, -0.09591465443372726, -0.04548437520861626, -0.0016550257569178939, 0.027844443917274475, -0.07878018915653229, -0.019223257899284363, 0.09116391092538834, 0.06346719712018967, -0.02718060277402401, -0.03165047615766525, -0.0100182443857193, 0.07841788232326508, -0.0008504719589836895, 0.023114655166864395, -0.007590604014694691, 0.038151174783706665, 0.018490539863705635, 0.08411349356174469, 0.057423412799835205, -5.379435563668267e-8, -0.035801250487565994, -0.03986801207065582, -0.05337195470929146, -0.002950540278106928, -0.054446738213300705, 0.047190312296152115, 0.0023082324769347906, -0.04686737433075905, -0.010328822769224644, 0.05527329444885254, -0.0013729478232562542, 0.01998472400009632, 0.016215093433856964, 0.014485824853181839, -0.0709778368473053, 0.05451567471027374, -0.0052347127348184586, 0.009244420565664768, 0.014779919758439064, -0.09234999865293503, 0.04116849601268768, 0.017929432913661003, 0.0015538001898676157, 0.007452878635376692, -0.009993916377425194, -0.062406718730926514, -0.02993403747677803, 0.010785652324557304, -0.10540077090263367, -0.10602626204490662, -0.01784699410200119, -0.05658058822154999, 0.06979137659072876, -0.01901352033019066, -0.053441695868968964, -0.020654786378145218, 0.005915106274187565, -0.09519515931606293, -0.03226417675614357, -0.03105582855641842, 0.058453988283872604, 0.04854167252779007, -0.05060212314128876, -0.09292984753847122, 0.13716906309127808, 0.05451615899801254, 0.011554202064871788, -0.06725068390369415, -0.010619805194437504, -0.001793920760974288, -0.03285139426589012, -0.0012760065728798509, 0.002254678402096033, 0.0034278437960892916, 0.012155806645751, -0.07488230615854263, -0.08492124825716019, 0.017784303054213524, 0.024410618469119072, 0.03627023845911026, 0.060257017612457275, 0.04738935828208923, 0.05980068817734718, -0.03154569864273071 ]
0.059937
configured to use Ollama as its backend. ### Recommended models For coding use cases, models like `glm-4.7`, `minimax-m2.1`, and `qwen3-coder` are recommended. Download a model before use: ```shell ollama pull qwen3-coder ``` > Note: Qwen 3 coder is a 30B parameter model requiring at least 24GB of VRAM to run smoothly. More is required for longer context lengths. ```shell ollama pull glm-4.7:cloud ``` ### Quick setup ```shell ollama launch claude ``` This will prompt you to select a model, configure Claude Code automatically, and launch it. To configure without launching: ```shell ollama launch claude --config ``` ### Manual setup Set the environment variables and run Claude Code: ```shell ANTHROPIC\_AUTH\_TOKEN=ollama ANTHROPIC\_BASE\_URL=http://localhost:11434 ANTHROPIC\_API\_KEY="" claude --model qwen3-coder ``` Or set the environment variables in your shell profile: ```shell export ANTHROPIC\_AUTH\_TOKEN=ollama export ANTHROPIC\_BASE\_URL=http://localhost:11434 export ANTHROPIC\_API\_KEY="" ``` Then run Claude Code with any Ollama model: ```shell claude --model qwen3-coder ``` ## Endpoints ### `/v1/messages` #### Supported features - [x] Messages - [x] Streaming - [x] System prompts - [x] Multi-turn conversations - [x] Vision (images) - [x] Tools (function calling) - [x] Tool results - [x] Thinking/extended thinking #### Supported request fields - [x] `model` - [x] `max\_tokens` - [x] `messages` - [x] Text `content` - [x] Image `content` (base64) - [x] Array of content blocks - [x] `tool\_use` blocks - [x] `tool\_result` blocks - [x] `thinking` blocks - [x] `system` (string or array) - [x] `stream` - [x] `temperature` - [x] `top\_p` - [x] `top\_k` - [x] `stop\_sequences` - [x] `tools` - [x] `thinking` - [ ] `tool\_choice` - [ ] `metadata` #### Supported response fields - [x] `id` - [x] `type` - [x] `role` - [x] `model` - [x] `content` (text, tool\_use, thinking blocks) - [x] `stop\_reason` (end\_turn, max\_tokens, tool\_use) - [x] `usage` (input\_tokens, output\_tokens) #### Streaming events - [x] `message\_start` - [x] `content\_block\_start` - [x] `content\_block\_delta` (text\_delta, input\_json\_delta, thinking\_delta) - [x] `content\_block\_stop` - [x] `message\_delta` - [x] `message\_stop` - [x] `ping` - [x] `error` ## Models Ollama supports both local and cloud models. ### Local models Pull a local model before use: ```shell ollama pull qwen3-coder ``` Recommended local models: - `qwen3-coder` - Excellent for coding tasks - `gpt-oss:20b` - Strong general-purpose model ### Cloud models Cloud models are available immediately without pulling: - `glm-4.7:cloud` - High-performance cloud model - `minimax-m2.1:cloud` - Fast cloud model ### Default model names For tooling that relies on default Anthropic model names such as `claude-3-5-sonnet`, use `ollama cp` to copy an existing model name: ```shell ollama cp qwen3-coder claude-3-5-sonnet ``` Afterwards, this new model name can be specified in the `model` field: ```shell curl http://localhost:11434/v1/messages \ -H "Content-Type: application/json" \ -d '{ "model": "claude-3-5-sonnet", "max\_tokens": 1024, "messages": [ { "role": "user", "content": "Hello!" } ] }' ``` ## Differences from the Anthropic API ### Behavior differences - API key is accepted but not validated - `anthropic-version` header is accepted but not used - Token counts are approximations based on the underlying model's tokenizer ### Not supported The following Anthropic API features are not currently supported: | Feature | Description | |---------|-------------| | `/v1/messages/count\_tokens` | Token counting endpoint | | `tool\_choice` | Forcing specific tool use or disabling tools | | `metadata` | Request metadata (user\_id) | | Prompt caching | `cache\_control` blocks for caching prefixes | | Batches API | `/v1/messages/batches` for async batch processing | | Citations | `citations` content blocks | | PDF support | `document` content blocks with PDF files | | Server-sent errors | `error` events during streaming (errors return HTTP status) | ### Partial support | Feature | Status | |---------|--------| | Image content | Base64 images supported; URL images not
https://github.com/ollama/ollama/blob/main//docs/api/anthropic-compatibility.mdx
main
ollama
[ -0.012919542379677296, -0.0354795977473259, -0.09790189564228058, -0.008188693784177303, -0.08926799893379211, -0.05626726523041725, -0.10817092657089233, 0.028676962479948997, -0.024116262793540955, 0.05793358385562897, 0.036377549171447754, -0.05031802877783775, -0.054532382637262344, -0.017877986654639244, 0.08916983753442764, 0.054488521069288254, 0.09548588842153549, -0.05326508358120918, -0.05960223451256752, 0.018289105966687202, 0.042843546718358994, 0.059228237718343735, 0.027825094759464264, -0.00038420650525949895, -0.04984408989548683, -0.0693776085972786, -0.043395452201366425, 0.040505144745111465, 0.024442607536911964, -0.09207866340875626, 0.04163319617509842, 0.050291795283555984, -0.0037155381869524717, 0.01681714877486229, 0.13510295748710632, 0.037009794265031815, -0.028319308534264565, -0.13545815646648407, -0.11746608465909958, 0.012656429782509804, 0.00886131264269352, -0.0016764139290899038, -0.09393826127052307, -0.0802847146987915, 0.013085988350212574, -0.05784923955798149, 0.04049595817923546, -0.03931328281760216, 0.05346151068806648, -0.1105639711022377, -0.013656854629516602, -0.05285155773162842, 0.0016193733317777514, -0.008064107969403267, -0.047012291848659515, 0.007357803173363209, -0.06567911803722382, -0.077927365899086, 0.021825091913342476, -0.0022490660194307566, -0.0339723639190197, 0.06110312044620514, -0.06114645302295685, 0.02510719746351242, 0.016703933477401733, -0.035000160336494446, -0.0163164921104908, -0.016274847090244293, -0.006131088361144066, 0.008773581124842167, -0.05709332972764969, -0.022681424394249916, -0.021300245076417923, -0.01429661549627781, -0.017110517248511314, -0.015519406646490097, 0.0643618181347847, 0.03589954972267151, -0.005976160988211632, -0.044511567801237106, 0.0019055571174249053, -0.030519451946020126, -0.006790409795939922, 0.06418046355247498, 0.045026276260614395, 0.052605632692575455, 0.0020498677622526884, 0.08593116700649261, 0.07437000423669815, -0.08484412729740143, 0.01314256340265274, -0.035258132964372635, -0.00292129535228014, 0.0027179059106856585, 0.020750926807522774, -0.03191192448139191, 0.10519248992204666, -0.047467317432165146, 0.007227192632853985, 0.07171956449747086, -0.028572313487529755, -0.06624608486890793, 0.08132846653461456, 0.0817900076508522, -0.01975151151418686, 0.028331978246569633, 0.11617415398359299, 0.12335280328989029, -0.025634296238422394, -0.022224348038434982, -0.030090423300862312, -0.030128372833132744, 0.08461035788059235, -0.03050408512353897, 0.05201253667473793, 0.07424735277891159, -0.005439511500298977, 0.009029628708958626, -0.017218533903360367, 0.015576242469251156, 0.04807103052735329, -0.06342853605747223, 0.03431149572134018, 0.008887174539268017, -0.010452483780682087, 0.08110588043928146, -0.031820349395275116, 5.578342971973721e-33, 0.10089945793151855, 0.039053406566381454, 0.031001245602965355, 0.01617797091603279, 0.05980295687913895, 0.07775954902172089, 0.008426726795732975, -0.028879079967737198, -0.05949763208627701, 0.028885619714856148, -0.022613199427723885, 0.026237918063998222, -0.040335264056921005, 0.13920973241329193, 0.022582070901989937, -0.011904880404472351, -0.049479756504297256, -0.0004169669118709862, 0.032635647803545, -0.02114862948656082, 0.07710900157690048, -0.061533018946647644, -0.018856367096304893, 0.044589582830667496, 0.05943325161933899, 0.09324373304843903, 0.046724531799554825, -0.04060707241296768, 0.001167111680842936, 0.0496407076716423, 0.07039076834917068, -0.022766774520277977, -0.05666712298989296, -0.057139333337545395, -0.03365442901849747, 0.022615987807512283, -0.14206087589263916, -0.040210917592048645, -0.06928220391273499, -0.009892924688756466, 0.04291164502501488, 0.024402042850852013, -0.03929012268781662, -0.08298606425523758, -0.011578250676393509, -0.004384968429803848, 0.05332647264003754, 0.022742299363017082, 0.04810098186135292, 0.020672986283898354, 0.04062933102250099, 0.004378954879939556, -0.06001923233270645, 0.024610813707113266, -0.008839386515319347, 0.020441219210624695, 0.03048872761428356, -0.07026445865631104, 0.07650671899318695, 0.020269544795155525, -0.04292548820376396, -0.0025904581416398287, -0.034613143652677536, 0.012064368464052677, 0.011201285757124424, -0.017120344564318657, -0.04531030356884003, 0.008735003881156445, -0.01227203942835331, 0.04580133780837059, -0.07036332041025162, -0.07128385454416275, 0.024980535730719566, 0.11778989434242249, 0.08913660794496536, -0.0375303216278553, 0.001576300011947751, -0.05610828101634979, -0.07737305760383606, -0.010272057726979256, -0.010720302350819111, 0.060338668525218964, -0.0012136104051023722, -0.0055484469048678875, 0.020800886675715446, -0.08225142955780029, 0.08507339656352997, 0.00985221192240715, -0.0875859409570694, 0.005060709081590176, 0.005125628784298897, -0.08144327998161316, 0.056573446840047836, 0.035723116248846054, -0.0627870112657547, -6.537399425450855e-33, 0.028853129595518112, -0.0004071922448929399, -0.00503831822425127, -0.008845215663313866, 0.03462199494242668, -0.06557256728410721, 0.02427166886627674, 0.008510608226060867, -0.042840924113988876, -0.060577817261219025, 0.02208319678902626, 0.013183584436774254, 0.10730111598968506, 0.06377772986888885, 0.09055190533399582, -0.0012378348037600517, -0.08234062790870667, -0.13354571163654327, 0.04914006218314171, 0.04563749581575394, -0.056522466242313385, -0.04853019863367081, -0.004227904602885246, -0.020204054191708565, 0.01006950531154871, 0.020052723586559296, 0.0192213524132967, -0.01281444076448679, -0.006311341654509306, -0.045469775795936584, -0.08893029391765594, 0.048572033643722534, -0.06602690368890762, 0.014931532554328442, -0.02823508158326149, 0.08595013618469238, 0.014889352023601532, -0.01198947336524725, -0.035807158797979355, 0.008942445740103722, 0.033042583614587784, -0.014689822681248188, -0.016245346516370773, -0.06635493785142899, -0.02084510400891304, 0.08587794750928879, -0.0009780507534742355, -0.049589741975069046, -0.0635233148932457, -0.015749111771583557, 0.02285255864262581, 0.03896156698465347, -0.009950895793735981, 0.009055252186954021, 0.04802970215678215, -0.03583747521042824, 0.00782108772546053, -0.0266703013330698, -0.05616552755236626, -0.001840274315327406, 0.05274634808301926, -0.04257403314113617, 0.050302837044000626, -0.021541431546211243, -0.05890009179711342, -0.09246020019054413, -0.0050085075199604034, 0.035590894520282745, -0.028946418315172195, -0.03424258530139923, -0.08197428286075592, -0.07072044163942337, 0.01694796048104763, 0.033842626959085464, 0.006990550085902214, -0.03001290000975132, -0.1692308932542801, -0.0630032941699028, 0.06342361867427826, 0.00029807258397340775, -0.05259415879845619, -0.036756426095962524, 0.06926392763853073, 0.033575646579265594, -0.013342541642487049, 0.011874492280185223, 0.059065356850624084, 0.05488793924450874, 0.0318724662065506, 0.03969436511397362, -0.03277932479977608, -0.00423487788066268, 0.10084052383899689, 0.11655283719301224, 0.007401586975902319, -5.534679914376284e-8, 0.024828655645251274, -0.01337946206331253, 0.053240831941366196, -0.010784628801047802, -0.021879833191633224, -0.017278701066970825, 0.020550116896629333, 0.027667764574289322, 0.011384384706616402, 0.017403118312358856, 0.06388520449399948, 0.032965581864118576, -0.03135722130537033, 0.042876485735177994, -0.03988425433635712, 0.09727033972740173, -0.01741165481507778, -0.011356428265571594, 0.026574304327368736, -0.08336006104946136, 0.01056149322539568, 0.051410820335149765, 0.005374366883188486, -0.02728261984884739, 0.043729811906814575, -0.047847848385572433, -0.02858595736324787, 0.013208221644163132, -0.052005793899297714, -0.02491988055408001, 0.03034544177353382, 0.019086942076683044, 0.03582856431603432, -0.013391726650297642, -0.08817517012357712, -0.04223547503352165, -0.03484708443284035, -0.014014591462910175, 0.005718624219298363, -0.07076752185821533, 0.107634536921978, 0.049860358238220215, -0.022319985553622246, -0.09348572790622711, 0.06096736341714859, 0.030197111889719963, 0.015443419106304646, -0.11636126041412354, -0.04192401096224785, 0.019798411056399345, -0.012489252723753452, -0.00572609156370163, -0.004050979390740395, 0.0880623385310173, 0.05347195267677307, -0.03018980659544468, -0.0712919682264328, -0.014741189777851105, 0.022447003051638603, 0.01634063571691513, -0.05348430946469307, -0.0361676886677742, 0.0010926340473815799, 0.018296606838703156 ]
0.024457
| Citations | `citations` content blocks | | PDF support | `document` content blocks with PDF files | | Server-sent errors | `error` events during streaming (errors return HTTP status) | ### Partial support | Feature | Status | |---------|--------| | Image content | Base64 images supported; URL images not supported | | Extended thinking | Basic support; `budget\_tokens` accepted but not enforced |
https://github.com/ollama/ollama/blob/main//docs/api/anthropic-compatibility.mdx
main
ollama
[ -0.007922690361738205, -0.040139276534318924, -0.09126449376344681, -0.015732062980532646, 0.12499246001243591, 0.022677907720208168, -0.06433746963739395, 0.018607160076498985, -0.05065463110804558, 0.030696965754032135, 0.02505456656217575, 0.021803995594382286, 0.013350378721952438, 0.013821867294609547, 0.0016108221607282758, 0.011520132422447205, 0.03481264412403107, -0.018476814031600952, -0.0337529294192791, -0.007898666895925999, -0.027769586071372032, 0.00921150017529726, -0.024199409410357475, 0.01789826899766922, 0.017176898196339607, 0.053877539932727814, -0.12940500676631927, -0.02336946874856949, 0.020839493721723557, -0.047425609081983566, 0.04180622100830078, 0.008271317929029465, -0.005253181792795658, -0.01323509868234396, 0.04956214502453804, 0.011210475116968155, 0.05881296098232269, -0.07649189233779907, 0.022265342995524406, -0.07702494412660599, 0.05594233050942421, -0.05515243485569954, -0.018414484336972237, 0.026869885623455048, -0.039437100291252136, -0.043968088924884796, -0.031773343682289124, -0.05337744578719139, -0.09074795991182327, 0.06263649463653564, -0.08706240355968475, 0.02320989966392517, -0.044426750391721725, 0.051047008484601974, 0.07247099280357361, -0.09952805191278458, -0.03814615681767464, 0.0478200763463974, -0.007252856157720089, 0.004085788037627935, 0.028142841532826424, -0.06510524451732635, -0.04634629935026169, 0.03786729276180267, -0.033425651490688324, 0.018296018242836, -0.04859134554862976, 0.0558960884809494, 0.03064400888979435, 0.010078860446810722, -0.09746789932250977, 0.03084598109126091, -0.09860984981060028, 0.02107136882841587, -0.010226938873529434, -0.018471429124474525, 0.03968802094459534, 0.014349361881613731, -0.018664328381419182, -0.1557442545890808, -0.07043018937110901, -0.08081541210412979, 0.05406734347343445, 0.02486087754368782, -0.0004469937412068248, 0.05159185454249382, -0.026526926085352898, 0.01861918531358242, 0.008444842882454395, 0.03502233698964119, -0.042553506791591644, 0.0002728387771639973, 0.11517305672168732, -0.017608024179935455, -0.007923002354800701, 0.0065508331172168255, 0.021627644076943398, -0.09849204868078232, 0.048903536051511765, 0.03060719557106495, 0.04637230932712555, 0.03432072326540947, 0.07006374001502991, -0.06237388402223587, -0.03733469918370247, -0.056131817400455475, 0.05066748335957527, 0.09043029695749283, 0.039839182049036026, 0.010681970976293087, -0.037472110241651535, -0.0063200900331139565, -0.0009092296822927892, -0.11592991650104523, 0.0017038891091942787, -0.07886727899312973, -0.026120634749531746, -0.06347096711397171, 0.007616485934704542, 0.026045678183436394, -0.04014196619391441, -0.019183017313480377, 0.00006262698298087344, -0.06038578972220421, 0.023970860987901688, -0.051788002252578735, 0.012179287150502205, 1.7426577017955714e-33, 0.05189387500286102, -0.06068110093474388, -0.08986114710569382, 0.02847912721335888, 0.06228451430797577, 0.0338066928088665, -0.011620313860476017, -0.04881874471902847, -0.08213181793689728, -0.0491207018494606, 0.08059029281139374, 0.0929812490940094, -0.04599141329526901, 0.0567338764667511, 0.002558451145887375, -0.04112458601593971, 0.02120417356491089, 0.09787195920944214, 0.051786862313747406, 0.02092651277780533, -0.0025166149716824293, -0.060429852455854416, -0.021086741238832474, 0.07823818176984787, 0.03967427834868431, 0.016191354021430016, 0.022082408890128136, -0.019933685660362244, -0.007664550561457872, 0.030192045494914055, 0.02616301365196705, 0.00923976395279169, 0.047204550355672836, -0.07389125972986221, 0.09322597086429596, -0.011793114244937897, -0.036759622395038605, -0.02490163967013359, -0.053831446915864944, -0.05228205770254135, -0.05944545939564705, -0.028966858983039856, -0.10790496319532394, 0.04000803083181381, -0.003870740532875061, -0.00007461875793524086, 0.019837908446788788, -0.06503783911466599, 0.03973156586289406, -0.05715546756982803, -0.03235754743218422, 0.021083883941173553, -0.0003432897210586816, -0.030959798023104668, 0.061331503093242645, 0.013044174760580063, -0.11702977865934372, 0.04297063127160072, 0.004671029280871153, -0.04553188383579254, 0.06504860520362854, -0.004737331066280603, -0.0602753572165966, -0.09444441646337509, 0.03422076627612114, 0.011425015516579151, -0.03473418205976486, -0.021030651405453682, 0.031625691801309586, 0.052619412541389465, -0.01566634140908718, 0.02788303978741169, 0.05003760755062103, 0.07834549993276596, -0.04327654466032982, 0.009398410096764565, -0.05535438284277916, 0.02453550137579441, 0.007344330195337534, 0.014096022583544254, -0.08292146772146225, -0.09089788049459457, 0.02055739052593708, 0.019563905894756317, 0.009006889536976814, 0.02347465604543686, -0.056111641228199005, 0.010391919873654842, -0.06487764418125153, -0.007351791486144066, -0.003270805347710848, -0.0022328703198581934, -0.025196092203259468, -0.09341921657323837, 0.0024621281772851944, -3.9413822324552354e-33, -0.040719229727983475, 0.015496350824832916, -0.010226018726825714, 0.03762292116880417, -0.017131192609667778, 0.047682829201221466, -0.03266383334994316, 0.016155514866113663, 0.0605858750641346, -0.02324627712368965, -0.05249723419547081, -0.025084838271141052, -0.07813625037670135, -0.05515254661440849, -0.13341252505779266, -0.0669899731874466, -0.08454862982034683, -0.07877643406391144, -0.01820712722837925, 0.0364406444132328, -0.04174172878265381, -0.00026883799000643194, 0.018223872408270836, 0.19602231681346893, 0.03388035669922829, 0.08332996070384979, -0.03899325802922249, -0.07439155876636505, -0.011869972571730614, -0.03816230967640877, 0.09883835166692734, 0.04254637286067009, -0.10947666317224503, 0.03720353916287422, 0.02246828004717827, -0.06634934991598129, 0.019624216482043266, 0.09866831451654434, -0.00011588299821596593, -0.02158847078680992, 0.13759192824363708, 0.02826145850121975, 0.011459692381322384, -0.030209852382540703, 0.029310839250683784, -0.04305725544691086, 0.0023456374183297157, -0.006786477752029896, -0.052592985332012177, -0.019031699746847153, -0.010611535049974918, -0.07730439305305481, 0.01992950774729252, -0.04465164244174957, 0.02367393858730793, 0.022130539640784264, 0.0741802453994751, 0.03699031099677086, -0.020674020051956177, -0.013477802276611328, 0.015490897931158543, -0.013443402014672756, -0.04931441321969032, 0.036599308252334595, 0.007984139025211334, -0.07590041309595108, -0.02985791116952896, 0.060582485049963, -0.0034878887236118317, 0.0006732632173225284, 0.03284428268671036, -0.04557669162750244, 0.02093486487865448, -0.003692645812407136, 0.09383299201726913, 0.0193755105137825, 0.03311769664287567, -0.009101983159780502, 0.010457647033035755, 0.08458742499351501, -0.023740382865071297, 0.08239389955997467, 0.0019795498810708523, 0.048150017857551575, 0.082247294485569, -0.007673043757677078, -0.028045209124684334, -0.04488818347454071, -0.01262941025197506, -0.1279885619878769, -0.006872591562569141, 0.032518696039915085, -0.09869623184204102, 0.051785971969366074, 0.02000519074499607, -4.5195363895800256e-8, -0.0696629136800766, -0.010602894239127636, -0.031705137342214584, 0.012051566503942013, 0.0698421373963356, 0.06560494750738144, 0.003108678851276636, -0.02457629144191742, 0.0016762282466515899, -0.0017970334738492966, -0.013246695511043072, -0.10030350089073181, -0.06573501974344254, -0.045148614794015884, 0.06475567817687988, -0.04256798326969147, -0.008172084577381611, 0.047453973442316055, -0.032794542610645294, -0.011053642258048058, -0.01214579027146101, -0.010660726577043533, 0.028453802689909935, -0.029439778998494148, -0.014547448605298996, -0.007702887058258057, 0.03428317978978157, 0.06826493889093399, 0.027645738795399666, -0.008197030052542686, 0.03862609341740608, 0.013888141140341759, -0.03909192606806755, -0.07296043634414673, 0.03920518234372139, 0.03120354935526848, 0.04673028737306595, -0.0188023392111063, -0.0513138473033905, 0.07859483361244202, 0.07973892241716385, 0.05292453616857529, 0.02738581784069538, 0.028962062671780586, 0.00495102209970355, 0.06273138523101807, -0.030949782580137253, 0.014024760574102402, -0.03764015808701515, -0.039748579263687134, 0.006325466558337212, -0.017448201775550842, 0.07034649699926376, 0.09279739856719971, -0.025007301941514015, 0.0292397141456604, 0.09860111027956009, -0.02494809590280056, 0.05592719838023186, -0.013076366856694221, 0.16225606203079224, 0.024668609723448753, 0.09000223129987717, 0.07418978959321976 ]
0.102533
No authentication is required when accessing Ollama's API locally via `http://localhost:11434`. Authentication is required for the following: \* Running cloud models via ollama.com \* Publishing models \* Downloading private models Ollama supports two authentication methods: \* \*\*Signing in\*\*: sign in from your local installation, and Ollama will automatically take care of authenticating requests to ollama.com when running commands \* \*\*API keys\*\*: API keys for programmatic access to ollama.com's API ## Signing in To sign in to ollama.com from your local installation of Ollama, run: ``` ollama signin ``` Once signed in, Ollama will automatically authenticate commands as required: ``` ollama run gpt-oss:120b-cloud ``` Similarly, when accessing a local API endpoint that requires cloud access, Ollama will automatically authenticate the request: ```shell curl http://localhost:11434/api/generate -d '{ "model": "gpt-oss:120b-cloud", "prompt": "Why is the sky blue?" }' ``` ## API keys For direct access to ollama.com's API served at `https://ollama.com/api`, authentication via API keys is required. First, create an [API key](https://ollama.com/settings/keys), then set the `OLLAMA\_API\_KEY` environment variable: ```shell export OLLAMA\_API\_KEY=your\_api\_key ``` Then use the API key in the Authorization header: ```shell curl https://ollama.com/api/generate \ -H "Authorization: Bearer $OLLAMA\_API\_KEY" \ -d '{ "model": "gpt-oss:120b", "prompt": "Why is the sky blue?", "stream": false }' ``` API keys don't currently expire, however you can revoke them at any time in your [API keys settings](https://ollama.com/settings/keys).
https://github.com/ollama/ollama/blob/main//docs/api/authentication.mdx
main
ollama
[ -0.0696077048778534, 0.004247769713401794, -0.056860484182834625, 0.012877149507403374, -0.04502205550670624, -0.09055876731872559, -0.029641801491379738, 0.013479605317115784, 0.04792335256934166, 0.008692165836691856, 0.04323895275592804, 0.005462190136313438, -0.0336129404604435, -0.019416354596614838, 0.11136094480752945, 0.07102032750844955, 0.0959387868642807, -0.06218254938721657, -0.031685370951890945, 0.012584182433784008, 0.02806456759572029, 0.044659409672021866, 0.008322285488247871, 0.07462067157030106, -0.026195568963885307, -0.060303568840026855, -0.018015289679169655, 0.04936707019805908, 0.0262413639575243, 0.018120676279067993, 0.03153810650110245, -0.07823549211025238, -0.04043308272957802, 0.0584065318107605, 0.05872414633631706, -0.025716569274663925, 0.04539716988801956, -0.12051893025636673, -0.06488289684057236, -0.005371728911995888, 0.07278037071228027, -0.0115958321839571, -0.10301677137613297, -0.07368927448987961, -0.015830907970666885, -0.07178279757499695, 0.023110060021281242, -0.025502780452370644, -0.02271104045212269, 0.026467101648449898, -0.05178618058562279, -0.03540274500846863, 0.00271630403585732, -0.02203286997973919, -0.02272370085120201, 0.048117127269506454, 0.03914119303226471, -0.041798632591962814, 0.05339109152555466, 0.014205457642674446, 0.010886709205806255, -0.014305511489510536, -0.04482879489660263, 0.02710515446960926, -0.027348343282938004, -0.028381118550896645, -0.010736758820712566, -0.042332910001277924, 0.00858849287033081, -0.06079638749361038, 0.027997775003314018, 0.019108625128865242, -0.03272461146116257, 0.005560136400163174, 0.020073696970939636, -0.036386679857969284, 0.02637062966823578, 0.01723092794418335, 0.02073182724416256, 0.027202900499105453, -0.008751021698117256, -0.008319785818457603, 0.025023262947797775, 0.06453362852334976, -0.004212738946080208, 0.030903084203600883, -0.02302229404449463, 0.07986605912446976, 0.09826399385929108, -0.014666687697172165, 0.05069205164909363, -0.038088273257017136, -0.059565965086221695, -0.06452778726816177, 0.08092454820871353, -0.07846873253583908, 0.04678870365023613, 0.00047916395124047995, -0.057164378464221954, 0.045144904404878616, -0.06324148178100586, -0.05872531980276108, -0.03423529863357544, 0.024240335449576378, -0.018025284633040428, 0.057741276919841766, 0.057108718901872635, 0.01761646196246147, -0.005747879855334759, 0.06337913125753403, 0.012114775367081165, -0.12610727548599243, 0.037261053919792175, 0.03090704418718815, -0.02933458797633648, 0.0937293991446495, -0.03801083192229271, -0.014491874724626541, -0.00391309754922986, -0.022797036916017532, 0.02507159300148487, -0.07159310579299927, 0.1062852144241333, -0.0012237580958753824, 0.0010463164653629065, 0.051490418612957, -0.02681940421462059, 4.617712458092439e-33, 0.10866709798574448, 0.060911305248737335, 0.01886851340532303, -0.007650443818420172, 0.014300201088190079, 0.05721227079629898, 0.07251392304897308, -0.10535183548927307, -0.03426705300807953, -0.0415978766977787, -0.07367981970310211, 0.10453139990568161, 0.014472243376076221, 0.02098098024725914, 0.04940914735198021, 0.1044008731842041, 0.004227727185934782, -0.007844429463148117, 0.07393237203359604, 0.06512445956468582, 0.07160674780607224, -0.028126094490289688, 0.09856489300727844, 0.0646640807390213, -0.08216838538646698, 0.02613900788128376, -0.052911460399627686, -0.01537521556019783, -0.011037529446184635, 0.04449934512376785, 0.11847131699323654, -0.014686434529721737, -0.005912918597459793, -0.039749305695295334, 0.026700368151068687, 0.031227262690663338, -0.021865693852305412, -0.044554274529218674, -0.023035811260342598, -0.04739689454436302, 0.01823979616165161, -0.015198065899312496, -0.03176179155707359, -0.006109863985329866, -0.055457666516304016, 0.017331568524241447, -0.04166785255074501, -0.007427947595715523, 0.10843326151371002, 0.04648706316947937, -0.12887394428253174, 0.005948883015662432, -0.06342489272356033, -0.034900911152362823, 0.002590314019471407, 0.004777390044182539, 0.006177930627018213, -0.07407748699188232, 0.07502885907888412, -0.08288441598415375, -0.07283252477645874, 0.019182905554771423, 0.005436712875962257, -0.047676630318164825, -0.016271112486720085, -0.0512351393699646, -0.030788594856858253, 0.07016755640506744, 0.014656567014753819, 0.01698223501443863, -0.010582257062196732, 0.0015725436387583613, -0.08112665265798569, 0.08988431841135025, -0.0416383296251297, -0.09577208012342453, 0.07161661982536316, 0.021001489832997322, 0.039111435413360596, 0.025505555793642998, 0.05427023395895958, 0.022481631487607956, -0.010515368543565273, 0.03436979651451111, -0.021890094503760338, -0.025127047672867775, 0.04083249345421791, 0.05181581899523735, -0.03719770535826683, 0.00430657435208559, 0.03784896060824394, -0.02371520921587944, 0.04677094519138336, 0.028366129845380783, -0.06827321648597717, -6.960380496443115e-33, 0.007472837343811989, -0.06015876680612564, 0.004744351375848055, 0.010082704946398735, 0.023448124527931213, -0.023223616182804108, -0.014886119402945042, 0.042510874569416046, 0.006415290292352438, 0.006015312857925892, 0.05010002478957176, 0.043364472687244415, 0.0327027291059494, 0.01840144395828247, 0.10571708530187607, -0.1084158644080162, -0.0812733992934227, -0.02342921309173107, -0.006243602838367224, -0.007266222964972258, -0.03544750064611435, -0.03294726088643074, -0.02391674742102623, 0.0028327289037406445, 0.041191957890987396, -0.01872202381491661, -0.05066694691777229, -0.038322173058986664, -0.06494497507810593, -0.03360443562269211, 0.011629386804997921, 0.13000917434692383, -0.080115407705307, 0.020410748198628426, -0.06800487637519836, 0.03557844087481499, 0.007994323037564754, 0.08088963478803635, -0.019077615812420845, 0.01896643079817295, 0.021398073062300682, -0.05364379286766052, -0.003346511162817478, -0.08015065640211105, -0.06942062079906464, 0.0727267861366272, 0.0015824732836335897, 0.012303869239985943, -0.14775314927101135, 0.007009974680840969, 0.0609184205532074, 0.022034194320440292, 0.05163626745343208, 0.006834754720330238, 0.03637844696640968, -0.004339397884905338, 0.015764804556965828, -0.00644416268914938, -0.03703603520989418, -0.007893046364188194, 0.06890319287776947, -0.06264805793762207, 0.017538558691740036, 0.050441596657037735, -0.08996593207120895, -0.04676858335733414, 0.009744444862008095, 0.02627590484917164, -0.027030425146222115, 0.010359556414186954, -0.1584392637014389, -0.061225105077028275, 0.028144797310233116, 0.013937773182988167, 0.06933598220348358, -0.0034604743123054504, -0.20392785966396332, -0.02212436869740486, 0.025694677606225014, -0.016482140868902206, -0.04686855152249336, -0.005063886288553476, 0.05429382994771004, -0.023996129631996155, 0.07700639963150024, -0.0864892452955246, 0.06457651406526566, -0.005265045911073685, 0.009262092411518097, 0.061367008835077286, -0.06240404024720192, -0.02957175485789776, -0.008693854324519634, 0.05553285405039787, 0.050580721348524094, -4.239678474959874e-8, -0.00500840786844492, 0.016348443925380707, 0.008248204365372658, 0.03163366764783859, -0.05633176118135452, 0.03210807964205742, 0.01838407851755619, -0.022275449708104134, -0.002469355007633567, 0.01819515787065029, 0.04144778102636337, 0.028037315234541893, -0.03045600652694702, -0.022598838433623314, -0.11832460761070251, 0.04602637141942978, -0.013856514357030392, -0.02757376618683338, 0.03469115495681763, -0.09101886302232742, -0.030975842848420143, -0.039212416857481, 0.020121224224567413, -0.0042265960946679115, 0.016549305990338326, 0.02626008354127407, -0.04405266419053078, 0.06085830181837082, -0.06309355050325394, -0.06961458176374435, -0.01890932209789753, -0.043484244495630264, 0.07605148106813431, -0.05233828350901604, -0.07167739421129227, -0.014013528823852539, 0.019629474729299545, -0.030048608779907227, -0.035919830203056335, -0.07684902101755142, 0.02061809040606022, 0.019218483939766884, 0.025462938472628593, -0.09582541882991791, 0.031854625791311264, 0.0682334378361702, 0.1055913120508194, 0.011328529566526413, -0.03590584918856621, 0.042293742299079895, -0.018116172403097153, -0.09251439571380615, 0.024236096069216728, 0.09948155283927917, -0.022381264716386795, -0.0632973164319992, -0.09533765912055969, -0.03384340554475784, 0.0016155153280124068, -0.010690259747207165, 0.06851581484079361, -0.024515453726053238, 0.0440048985183239, -0.01916738599538803 ]
0.003807
## Status codes Endpoints return appropriate HTTP status codes based on the success or failure of the request in the HTTP status line (e.g. `HTTP/1.1 200 OK` or `HTTP/1.1 400 Bad Request`). Common status codes are: - `200`: Success - `400`: Bad Request (missing parameters, invalid JSON, etc.) - `404`: Not Found (model doesn't exist, etc.) - `429`: Too Many Requests (e.g. when a rate limit is exceeded) - `500`: Internal Server Error - `502`: Bad Gateway (e.g. when a cloud model cannot be reached) ## Error messages Errors are returned in the `application/json` format with the following structure, with the error message in the `error` property: ```json { "error": "the model failed to generate a response" } ``` ## Errors that occur while streaming If an error occurs mid-stream, the error will be returned as an object in the `application/x-ndjson` format with an `error` property. Since the response has already started, the status code of the response will not be changed. ```json {"model":"gemma3","created\_at":"2025-10-26T17:21:21.196249Z","response":" Yes","done":false} {"model":"gemma3","created\_at":"2025-10-26T17:21:21.207235Z","response":".","done":false} {"model":"gemma3","created\_at":"2025-10-26T17:21:21.219166Z","response":"I","done":false} {"model":"gemma3","created\_at":"2025-10-26T17:21:21.231094Z","response":"can","done":false} {"error":"an error was encountered while running the model"} ```
https://github.com/ollama/ollama/blob/main//docs/api/errors.mdx
main
ollama
[ -0.095962293446064, 0.009458105079829693, 0.0030042240396142006, 0.012818986549973488, -0.01874234527349472, -0.07287000864744186, -0.09943355619907379, 0.006417629774659872, 0.02887708507478237, 0.043462373316287994, 0.027849113568663597, 0.011737670749425888, -0.0030125544872134924, 0.017263608053326607, 0.04625186324119568, 0.009779334999620914, 0.034619882702827454, -0.056580863893032074, -0.1145612895488739, -0.0029560790862888098, 0.04933252930641174, 0.0959489494562149, -0.050410106778144836, 0.049066998064517975, -0.07926420122385025, -0.0065441555343568325, -0.051473960280418396, -0.048472851514816284, 0.008936312049627304, -0.011392966844141483, 0.02639569528400898, -0.06167646124958992, -0.10086025297641754, 0.05232209712266922, 0.06689517945051193, 0.03387201577425003, 0.004816478118300438, -0.10610604286193848, -0.04360470548272133, -0.027688857167959213, 0.07458463311195374, 0.003049318678677082, -0.036527980118989944, -0.006012695841491222, 0.026026804000139236, -0.0775291696190834, -0.046307582408189774, -0.05221501365303993, -0.012009862810373306, -0.02911326289176941, -0.01981676183640957, 0.03380564600229263, 0.035371333360672, 0.04252185672521591, 0.07207191735506058, -0.03757312893867493, -0.10153307765722275, 0.008908071555197239, -0.04203801229596138, 0.05821383371949196, 0.06167449429631233, -0.07959100604057312, -0.004751663655042648, -0.04703832045197487, 0.01659083366394043, -0.027525248005986214, -0.008804689161479473, -0.04209590330719948, 0.006329198367893696, 0.06635072827339172, -0.016737714409828186, 0.008849667385220528, -0.14776039123535156, 0.004483512602746487, 0.0019395253621041775, 0.024894999340176582, 0.02847893349826336, -0.013021665625274181, -0.01518565695732832, -0.0116781210526824, -0.016586512327194214, -0.048993825912475586, 0.01164158619940281, 0.03773833438754082, 0.020955970510840416, 0.04192415252327919, 0.02132340334355831, 0.097641222178936, 0.061282116919755936, 0.02626935951411724, -0.04771031439304352, -0.016723206266760826, 0.04542607441544533, 0.0807521715760231, 0.0014736716402694583, 0.0671306848526001, 0.03332148492336273, -0.03870900720357895, -0.0056856535375118256, 0.011474663391709328, 0.06363175809383392, -0.01596657559275627, 0.10556703060865402, -0.04445483908057213, 0.07861379534006119, -0.021427828818559647, -0.0015469011850655079, 0.11035207659006119, -0.017150115221738815, -0.014151858165860176, -0.06879907101392746, -0.0180045235902071, 0.009946310892701149, -0.03701792657375336, -0.012374975718557835, 0.011374163441359997, 0.022158145904541016, -0.007283075246959925, -0.08361506462097168, 0.027742721140384674, 0.0485910139977932, -0.049803972244262695, 0.053019627928733826, -0.008862010203301907, 0.07114245742559433, 0.018896277993917465, -0.023443734273314476, 4.4556856228529566e-33, 0.010511205531656742, -0.026251159608364105, -0.0018261699005961418, 0.015376206487417221, 0.0626567155122757, -0.019340815022587776, 0.006002331152558327, -0.007172284182161093, 0.019644413143396378, -0.07182151079177856, -0.017468227073550224, -0.030613422393798828, -0.029709836468100548, -0.010376689955592155, -0.018200194463133812, -0.03347278758883476, 0.07307279855012894, 0.019703716039657593, 0.02145649865269661, 0.0850551649928093, 0.03856683522462845, -0.09597655385732651, 0.02306465432047844, 0.016900932416319847, 0.03240836411714554, 0.063120998442173, 0.020797882229089737, 0.03876049071550369, -0.06588524580001831, -0.0015783682465553284, 0.053620416671037674, 0.025871042162179947, 0.015535804443061352, -0.022299906238913536, 0.05806020647287369, 0.004048172850161791, 0.04170907288789749, 0.03502054512500763, -0.050461068749427795, -0.051405973732471466, -0.0755137950181961, 0.046576645225286484, -0.20821483433246613, 0.0263646449893713, -0.008139966987073421, -0.13102371990680695, 0.005389726255089045, -0.0752415582537651, 0.011488111689686775, 0.005018074996769428, -0.05436497926712036, 0.07607924938201904, 0.04397497698664665, -0.019717050716280937, 0.00951889343559742, -0.025401301681995392, 0.01794637367129326, 0.0031406001653522253, -0.03277458995580673, -0.025644788518548012, 0.050598904490470886, -0.07091539353132248, -0.03740552440285683, -0.0824219137430191, 0.09389466792345047, 0.017419537529349327, -0.010985068045556545, 0.03537677228450775, -0.03055574744939804, 0.010377566330134869, 0.017833327874541283, -0.026473334059119225, 0.0435473695397377, 0.005174307152628899, -0.000581099302507937, -0.09909852594137192, 0.00041645902092568576, 0.009980173781514168, 0.023775367066264153, -0.05197467654943466, 0.05588476359844208, -0.04456904157996178, -0.06792012602090836, 0.06829985231161118, -0.03744075819849968, 0.0955604761838913, 0.025212666019797325, 0.0026803675573319197, -0.07951713353395462, 0.04934000223875046, -0.03070017322897911, 0.03530751168727875, 0.02122041955590248, -0.039338234812021255, -0.018876496702432632, -4.7235521327305546e-33, -0.028117401525378227, -0.031327541917562485, -0.08546822518110275, 0.03758466616272926, -0.010640857741236687, -0.07411812245845795, 0.059708043932914734, 0.12483591586351395, 0.042223721742630005, 0.006925350986421108, 0.023215504363179207, -0.03762880340218544, 0.016024520620703697, 0.016041699796915054, -0.08199123293161392, -0.015742383897304535, -0.029650138691067696, -0.10049523413181305, 0.05265497416257858, 0.0450948029756546, 0.013408741913735867, 0.01730058528482914, -0.060171060264110565, -0.010704144835472107, -0.06368428468704224, 0.07500958442687988, -0.03387998417019844, -0.03151879832148552, -0.09408392012119293, -0.06947261095046997, 0.050481829792261124, -0.007230003830045462, -0.006958632729947567, 0.054921772330999374, 0.08216140419244766, -0.04407109320163727, 0.04449385032057762, 0.0676669105887413, -0.01669352874159813, 0.01203102432191372, 0.09758487343788147, -0.0005133438389748335, 0.03603503853082657, 0.04012296348810196, 0.039562471210956573, -0.03887404128909111, -0.0019361490849405527, 0.014284616336226463, -0.06953094154596329, -0.03394575044512749, 0.013023460283875465, -0.0019379659788683057, 0.03409092500805855, 0.15033461153507233, 0.0009820957202464342, 0.0021088921930640936, -0.004757903516292572, 0.00031766583560965955, -0.02279672957956791, 0.04692167416214943, -0.07153812050819397, -0.07370264083147049, -0.053454216569662094, 0.056896064430475235, 0.024534620344638824, -0.06002477556467056, -0.029583189636468887, -0.0486086905002594, 0.0671657919883728, -0.0416034460067749, 0.0048538194969296455, -0.01844160072505474, -0.00777833117172122, 0.019344719126820564, 0.07050277292728424, -0.04565443843603134, -0.09724551439285278, -0.0833069458603859, 0.024468373507261276, 0.09705724567174911, -0.12634769082069397, 0.062281277030706406, -0.0299463402479887, 0.05857223644852638, 0.08219853043556213, -0.037148844450712204, 0.051100876182317734, 0.05798124894499779, -0.030273040756583214, -0.02732672542333603, -0.000048080859414767474, 0.019168607890605927, -0.08343521505594254, 0.08318877220153809, 0.002116572577506304, -5.928080426542692e-8, -0.08355551213026047, -0.002306825714185834, -0.023185284808278084, -0.024373376742005348, 0.10519394278526306, 0.036815594881772995, 0.015587514266371727, -0.032864801585674286, 0.04922832176089287, 0.01870071142911911, 0.0007169399177655578, 0.06242246925830841, -0.07841116189956665, -0.012188877910375595, 0.03210843354463577, -0.03816710785031319, -0.014059125445783138, 0.047510694712400436, 0.003801907179877162, -0.024097196757793427, -0.03977663069963455, 0.0067865545861423016, 0.0048062908463180065, -0.020408622920513153, 0.02028595097362995, 0.028442587703466415, 0.10425493121147156, 0.07380653917789459, -0.11369675397872925, -0.04304378479719162, -0.07175263017416, -0.013232153840363026, 0.08947092294692993, -0.018339693546295166, -0.015347283333539963, 0.05029549077153206, -0.006873932667076588, 0.020775137469172478, 0.012081441469490528, -0.010782364755868912, 0.0813075453042984, 0.06937704235315323, -0.018772456794977188, 0.024839509278535843, 0.07206734269857407, 0.032412514090538025, 0.005429534241557121, 0.0559450201690197, -0.006642290391027927, -0.06034918874502182, -0.011916480027139187, -0.03452145680785179, -0.06765367835760117, 0.0028035040013492107, -0.06201844662427902, 0.003357950132340193, 0.01439734734594822, -0.10075757652521133, -0.005917561240494251, 0.0077715665102005005, 0.17587371170520782, 0.044708941131830215, -0.0432719849050045, 0.016548652201890945 ]
0.082424
Ollama's API allows you to run and interact with models programatically. ## Get started If you're just getting started, follow the [quickstart](/quickstart) documentation to get up and running with Ollama's API. ## Base URL After installation, Ollama's API is served by default at: ``` http://localhost:11434/api ``` For running cloud models on \*\*ollama.com\*\*, the same API is available with the following base URL: ``` https://ollama.com/api ``` ## Example request Once Ollama is running, its API is automatically available and can be accessed via `curl`: ```shell curl http://localhost:11434/api/generate -d '{ "model": "gemma3", "prompt": "Why is the sky blue?" }' ``` ## Libraries Ollama has official libraries for Python and JavaScript: - [Python](https://github.com/ollama/ollama-python) - [JavaScript](https://github.com/ollama/ollama-js) Several community-maintained libraries are available for Ollama. For a full list, see the [Ollama GitHub repository](https://github.com/ollama/ollama?tab=readme-ov-file#libraries-1). ## Versioning Ollama's API isn't strictly versioned, but the API is expected to be stable and backwards compatible. Deprecations are rare and will be announced in the [release notes](https://github.com/ollama/ollama/releases).
https://github.com/ollama/ollama/blob/main//docs/api/introduction.mdx
main
ollama
[ -0.11080898344516754, -0.037587832659482956, -0.03975200280547142, 0.06131613254547119, -0.031963370740413666, -0.1003287136554718, -0.0903446152806282, 0.017714569345116615, 0.03795319050550461, -0.041853465139865875, 0.0023487152066081762, -0.004102776758372784, -0.028720960021018982, -0.04552726075053215, 0.10118480771780014, 0.037590011954307556, 0.09569872170686722, -0.04791376739740372, -0.03389531001448631, -0.0000493376464874018, 0.0713464617729187, 0.03764331340789795, -0.023628316819667816, 0.03313184157013893, -0.04445953294634819, -0.060396261513233185, 0.018559198826551437, 0.058293864130973816, 0.021242113783955574, -0.029368596151471138, 0.04181318357586861, -0.05528059974312782, -0.03630001097917557, 0.06747910380363464, 0.026586422696709633, 0.026108112186193466, 0.035733602941036224, -0.15853999555110931, -0.07140964269638062, -0.019216736778616905, 0.06755057722330093, -0.029681988060474396, -0.10164978355169296, -0.08040027320384979, 0.026139413937926292, -0.06737657636404037, -0.03017774038016796, -0.025418980047106743, -0.03181705251336098, -0.015743372961878777, -0.0740552693605423, -0.12767882645130157, 0.004429189022630453, -0.009221159853041172, 0.027800504118204117, 0.039583057165145874, -0.01676405407488346, -0.06484779715538025, 0.022307658568024635, 0.00862058810889721, -0.020106693729758263, 0.010389519855380058, -0.020288480445742607, 0.022822728380560875, 0.0024509034119546413, -0.054947253316640854, -0.0322185754776001, 0.006354366894811392, 0.0738760232925415, -0.11090759932994843, -0.03893875703215599, 0.030196212232112885, -0.008243354968726635, 0.010696320794522762, -0.027987506240606308, -0.0487748384475708, 0.08764619380235672, 0.027652692049741745, -0.01595720835030079, 0.028114717453718185, -0.014550559222698212, -0.029453445225954056, -0.011704930104315281, 0.0891079232096672, 0.016894742846488953, 0.030603820458054543, -0.005709044169634581, 0.10865716636180878, 0.122221440076828, -0.03988043591380119, -0.010055539198219776, -0.027025306597352028, -0.04481726139783859, -0.053673189133405685, -0.0006929557421244681, 0.031228139996528625, 0.0535748228430748, -0.07778904587030411, -0.03351009637117386, 0.07178657501935959, -0.02372898906469345, -0.05198434740304947, 0.012124643661081791, 0.017545128241181374, -0.01108325645327568, 0.012130732648074627, 0.04611455276608467, 0.0703624039888382, -0.016098376363515854, 0.030819952487945557, -0.020593203604221344, -0.055821456015110016, 0.06971584260463715, -0.014928877353668213, -0.022709133103489876, 0.05127374082803726, -0.021911483258008957, -0.026477783918380737, 0.03440380096435547, 0.008485564030706882, 0.05410752817988396, -0.01876325160264969, 0.09118987619876862, 0.0410306341946125, 0.0409642830491066, 0.07625805586576462, -0.04776570573449135, 4.4354428754478275e-33, 0.13781258463859558, 0.004244683776050806, 0.06930913776159286, 0.021022168919444084, 0.05375866964459419, 0.04079852253198624, 0.06130419671535492, -0.03488656505942345, -0.0399068184196949, -0.05541197583079338, -0.08258198946714401, 0.125871941447258, -0.032115790992975235, 0.009299127385020256, 0.024592619389295578, 0.00665600411593914, -0.04641111567616463, 0.021704304963350296, 0.05090860649943352, 0.07169432938098907, 0.039743173867464066, 0.010490573942661285, 0.03767100349068642, 0.05259378254413605, 0.008735248818993568, 0.06569043546915054, -0.03819553181529045, 0.0032477707136422396, -0.043350689113140106, 0.04500238224864006, 0.11520031839609146, -0.010669494047760963, -0.060769665986299515, -0.026829779148101807, 0.007941834628582, -0.006696037948131561, -0.06831720471382141, -0.05273725837469101, -0.07022163271903992, -0.04099142178893089, -0.0027266182005405426, 0.02104412205517292, -0.031041840091347694, -0.04506004601716995, -0.11160659790039062, -0.003911186009645462, -0.06472010165452957, -0.011532981880009174, 0.07679099589586258, -0.015239045023918152, -0.03588947653770447, 0.01212576124817133, -0.028447411954402924, -0.031106462702155113, -0.017473777756094933, 0.036307189613580704, -0.011495087295770645, -0.07168889790773392, 0.10229991376399994, -0.03435743600130081, -0.04044010862708092, -0.0051952386274933815, 0.0037845242768526077, -0.04053715243935585, -0.007841791026294231, -0.05746740475296974, 0.00975716207176447, 0.047634441405534744, 0.011470785364508629, 0.04378673806786537, -0.029933961108326912, -0.008528376929461956, -0.06032786890864372, 0.04218973591923714, 0.021333739161491394, -0.06072862818837166, 0.023502539843320847, -0.03673357889056206, -0.02964141219854355, 0.01739102602005005, 0.07729453593492508, 0.0012570003746077418, 0.00889429822564125, -0.01986885815858841, 0.04449727386236191, -0.020008407533168793, 0.04192223399877548, 0.03753342479467392, -0.03786558657884598, -0.021154003217816353, 0.012801133096218109, -0.023962266743183136, 0.0031808933708816767, -0.029657112434506416, -0.024276411160826683, -6.00843688581441e-33, 0.0579712800681591, -0.06448214501142502, -0.016236254945397377, 0.021643351763486862, 0.04186681658029556, -0.0406368151307106, -0.003120042383670807, 0.06676037609577179, -0.06212306767702103, 0.021125784143805504, -0.015536492690443993, 0.004895726218819618, 0.03781449794769287, 0.024524500593543053, 0.10686139017343521, -0.049685582518577576, -0.08140383660793304, -0.11535540968179703, 0.001362876151688397, 0.005979051347821951, -0.1069343164563179, -0.018090983852744102, -0.02405742183327675, -0.07087093591690063, -0.005627518519759178, 0.004460083320736885, -0.03420325741171837, 0.0057748109102249146, -0.09344584494829178, -0.0177727323025465, -0.08276652544736862, 0.08401738107204437, -0.04729658365249634, 0.04181027412414551, -0.03704827278852463, 0.08436652272939682, 0.024316132068634033, 0.025364888831973076, 0.02249653823673725, 0.0009009975474327803, 0.05863773450255394, -0.07504452019929886, -0.029571684077382088, -0.043901748955249786, -0.07043185830116272, 0.0703379288315773, -0.04853092133998871, 0.06677975505590439, -0.07777585834264755, -0.04178056865930557, 0.04449097439646721, 0.028707822784781456, -0.008702182210981846, 0.018214618787169456, 0.04359879344701767, -0.04193979129195213, 0.029542118310928345, -0.021086081862449646, -0.05830320715904236, 0.028604324907064438, 0.006852468475699425, -0.11371114104986191, 0.005310676526278257, 0.004448668099939823, -0.06987357884645462, -0.048475559800863266, -0.03466925397515297, -0.04475364089012146, -0.03251928091049194, -0.030423710122704506, -0.11128124594688416, -0.01735803298652172, 0.029254483059048653, 0.04559597373008728, 0.05724490433931351, 0.0026664892211556435, -0.1367887705564499, -0.0289177093654871, 0.04377096891403198, -0.002090649912133813, -0.04604208841919899, -0.009205346927046776, 0.10875048488378525, -0.008673139847815037, 0.031969256699085236, -0.04097484052181244, 0.06318829208612442, 0.06437377631664276, 0.0004271737125236541, 0.01788943260908127, -0.0497681088745594, 0.04601598531007767, 0.02558451145887375, 0.11886949837207794, 0.02499982714653015, -5.5038000823515176e-8, -0.04622159153223038, -0.001508454792201519, 0.04143381491303444, 0.04640572518110275, -0.07722743600606918, 0.04349320009350777, 0.048341114073991776, 0.02422180213034153, 0.0636291354894638, 0.05128533020615578, 0.020201554521918297, 0.05058962479233742, -0.0026423195376992226, 0.02675676718354225, -0.0458502396941185, 0.07780272513628006, 0.04935580864548683, 0.04436991363763809, 0.01842154748737812, -0.026179254055023193, 0.014511661604046822, 0.03933928161859512, 0.0027379700914025307, 0.008496839553117752, 0.07892071455717087, -0.018507927656173706, -0.07215653359889984, 0.045560333877801895, -0.07413387298583984, -0.09061022847890854, -0.030583996325731277, -0.024967972189188004, 0.0816781297326088, -0.03202609717845917, -0.02512502856552601, 0.020742837339639664, -0.04246499389410019, -0.024507828056812286, -0.013868581503629684, -0.0584629625082016, 0.11262008547782898, 0.05423072353005409, -0.04552287980914116, -0.08641978353261948, 0.09015509486198425, 0.07843923568725586, 0.059200260788202286, -0.08795087784528732, -0.019748253747820854, 0.03532348945736885, -0.04807695746421814, -0.08218996226787567, 0.03585369884967804, 0.01840624399483204, -0.06210000813007355, -0.02817632257938385, -0.06543777883052826, -0.07747314870357513, -0.00044604201684705913, 0.022209621965885162, 0.062073964625597, 0.029306262731552124, 0.08527414500713348, 0.03186020255088806 ]
0.091937
Ollama's API responses include metrics that can be used for measuring performance and model usage: \* `total\_duration`: How long the response took to generate \* `load\_duration`: How long the model took to load \* `prompt\_eval\_count`: How many input tokens were processed \* `prompt\_eval\_duration`: How long it took to evaluate the prompt \* `eval\_count`: How many output tokens were processes \* `eval\_duration`: How long it took to generate the output tokens All timing values are measured in nanoseconds. ## Example response For endpoints that return usage metrics, the response body will include the usage fields. For example, a non-streaming call to `/api/generate` may return the following response: ```json { "model": "gemma3", "created\_at": "2025-10-17T23:14:07.414671Z", "response": "Hello! How can I help you today?", "done": true, "done\_reason": "stop", "total\_duration": 174560334, "load\_duration": 101397084, "prompt\_eval\_count": 11, "prompt\_eval\_duration": 13074791, "eval\_count": 18, "eval\_duration": 52479709 } ``` For endpoints that return \*\*streaming responses\*\*, usage fields are included as part of the final chunk, where `done` is `true`.
https://github.com/ollama/ollama/blob/main//docs/api/usage.mdx
main
ollama
[ -0.0674109011888504, 0.03649909049272537, -0.05976882204413414, 0.09247732162475586, -0.029982002452015877, -0.11654660105705261, -0.03588658943772316, 0.037280790507793427, 0.07701615244150162, -0.04417886212468147, -0.035315848886966705, -0.07045213133096695, -0.06484679132699966, -0.017796317115426064, 0.051863156259059906, 0.010450276546180248, 0.07776135951280594, -0.03703024983406067, -0.10433554649353027, -0.05198449268937111, 0.1615680456161499, 0.0035747524816542864, 0.018818430602550507, 0.012541375122964382, -0.036722518503665924, -0.03845210373401642, -0.05627698823809624, 0.034200623631477356, 0.03194069117307663, -0.004175995942205191, -0.008101182989776134, 0.015887638553977013, 0.0032796880695968866, 0.026242928579449654, 0.008834198117256165, 0.020387163385748863, 0.024352431297302246, -0.10754479467868805, -0.013533839955925941, -0.03170769661664963, 0.0427357442677021, 0.03887896239757538, -0.06322278082370758, -0.008024251088500023, 0.027702519670128822, -0.12110953032970428, -0.037152137607336044, -0.05228785052895546, -0.0961243286728859, 0.06822214275598526, -0.035577114671468735, 0.0030741081573069096, -0.004305577836930752, 0.00792302843183279, 0.028504753485322, 0.02079916186630726, -0.030120298266410828, -0.04453865438699722, -0.05630555748939514, 0.017194325104355812, -0.0757908970117569, -0.01257170457392931, -0.0779433324933052, 0.021891560405492783, 0.007392135914415121, -0.032939888536930084, -0.030834099277853966, 0.02776440791785717, 0.03239527344703674, -0.020609093829989433, -0.07016459107398987, 0.02432667836546898, -0.041400209069252014, 0.00033158212318085134, -0.0024648173712193966, -0.009035159833729267, 0.03164469450712204, 0.05249867960810661, -0.0030750965233892202, -0.05577586218714714, 0.02438732422888279, -0.01999843120574951, -0.01409890502691269, 0.05161344259977341, 0.060419343411922455, 0.009012904949486256, 0.027228455990552902, 0.06651589274406433, 0.05293106287717819, 0.003947481047362089, 0.0011316812597215176, -0.015410920605063438, -0.037912238389253616, -0.033837538212537766, 0.030063441023230553, 0.005817405879497528, 0.01867649517953396, -0.10867146402597427, 0.022072678431868553, 0.064898781478405, -0.017308445647358894, 0.0005387791898101568, 0.02909081242978573, 0.00805183406919241, -0.03128005936741829, -0.004261194262653589, 0.06714751571416855, 0.11755845695734024, -0.06311936676502228, 0.10044994205236435, 0.041917432099580765, -0.04619117081165314, 0.06862135976552963, -0.015196951106190681, 0.08480853587388992, 0.033706504851579666, -0.028738081455230713, -0.026892775669693947, 0.0900736004114151, 0.06402389705181122, 0.0735967680811882, -0.04266694188117981, 0.06414767354726791, 0.014761109836399555, 0.036134012043476105, 0.08449484407901764, 0.01070199254900217, 7.481750444599202e-33, 0.03821371868252754, -0.012030605226755142, 0.036615822464227676, 0.0028090535197407007, -0.07166093587875366, 0.06466928869485855, 0.010583654046058655, 0.007522766012698412, 0.056926049292087555, -0.03338867053389549, -0.0300749484449625, 0.11318115144968033, -0.009031051769852638, 0.03319645673036575, 0.0415276363492012, 0.03654211759567261, 0.023480957373976707, 0.06779592484235764, -0.001251434558071196, 0.04875227436423302, 0.0833987146615982, -0.05329804867506027, -0.0028121531940996647, 0.04580101743340492, 0.12426578998565674, -0.01018401887267828, -0.057096920907497406, -0.0017671595560386777, -0.11065515875816345, 0.016580000519752502, 0.12075621634721756, 0.010342595167458057, -0.0724194198846817, -0.02442225068807602, 0.08053895086050034, 0.012288580648601055, -0.005003365688025951, -0.011684832163155079, -0.03890151530504227, -0.07144210487604141, -0.051490820944309235, 0.01802900806069374, -0.036998286843299866, -0.007234987802803516, -0.15266366302967072, -0.08055992424488068, -0.06333927810192108, -0.04003777727484703, 0.039212439209222794, 0.017321180552244186, 0.00939599797129631, 0.058788783848285675, 0.005655950866639614, -0.028794972226023674, 0.042717695236206055, -0.03038402646780014, 0.048986706882715225, -0.0005135380779393017, 0.0492217056453228, 0.04736164212226868, -0.06418859213590622, -0.04192906618118286, 0.013759839348495007, -0.07989198714494705, -0.02106635645031929, 0.016821645200252533, -0.00356303621083498, 0.03224192187190056, 0.0169599037617445, 0.015506879426538944, -0.054605741053819656, 0.00031095187296159565, -0.03093326836824417, 0.01684262789785862, -0.01782766915857792, -0.08013267070055008, 0.04351615533232689, -0.03516780212521553, -0.030178215354681015, 0.021816236898303032, 0.06579206138849258, -0.015646466985344887, 0.013931386172771454, -0.013309880159795284, 0.03755573183298111, -0.03334038704633713, 0.03435087203979492, -0.01995803788304329, -0.10192503035068512, -0.037635687738657, 0.0007248809561133385, 0.04118181765079498, -0.08313684165477753, -0.013947051018476486, -0.07042273133993149, -8.155020711504421e-33, 0.0131773566827178, 0.011765595525503159, -0.02234875038266182, 0.036357130855321884, 0.012326250784099102, -0.04567659646272659, 0.01686018519103527, 0.08869694918394089, 0.047598931938409805, 0.038114599883556366, -0.03888433799147606, -0.045672714710235596, 0.006454554386436939, 0.039563048630952835, 0.053838372230529785, -0.012705186381936073, -0.0814877599477768, -0.10138534754514694, 0.062363747507333755, 0.0272221602499485, -0.03501813858747482, 0.035268012434244156, -0.01857818104326725, -0.07044161111116409, -0.00976564735174179, -0.024777689948678017, -0.0705885961651802, -0.07646393775939941, -0.07574354857206345, -0.08363699167966843, 0.011317419819533825, -0.018600866198539734, -0.038622815161943436, 0.014818176627159119, -0.0411309190094471, -0.01797988824546337, 0.04883000999689102, 0.04002879932522774, 0.01857515051960945, 0.07353875041007996, 0.0829605832695961, -0.019462617114186287, -0.025322292000055313, -0.040193554013967514, -0.04515933617949486, 0.03749850019812584, -0.025798166170716286, -0.012609347701072693, -0.06323797255754471, -0.019555289298295975, 0.07911674678325653, 0.039096854627132416, -0.057113952934741974, 0.05866246670484543, -0.0066826604306697845, -0.09002241492271423, 0.05633062496781349, -0.09800229966640472, -0.014649304561316967, -0.014482125639915466, 0.026976579800248146, -0.05465071648359299, 0.017872916534543037, 0.0006602202774956822, -0.004521774128079414, -0.05385229364037514, 0.050660960376262665, -0.07703200727701187, -0.017546281218528748, -0.030236218124628067, -0.003449004143476486, -0.04209616407752037, 0.008864778093993664, 0.057881131768226624, 0.00020638048590626568, 0.01625719480216503, -0.09921128302812576, -0.0826999694108963, 0.007732515223324299, 0.04102266579866409, -0.0956101343035698, 0.031691551208496094, 0.04225660115480423, 0.02624795399606228, -0.011886059306561947, 0.019379926845431328, 0.06957489252090454, 0.073088638484478, -0.015364370308816433, 0.06207098066806793, 0.002137314062565565, -0.01478935219347477, -0.08164338022470474, 0.09866585582494736, 0.02400108426809311, -5.9566172438962894e-8, -0.059039462357759476, -0.04496071860194206, 0.04686131700873375, 0.04700416699051857, -0.0315430648624897, 0.05157076567411423, 0.017702817916870117, 0.03232240304350853, 0.04031791538000107, -0.029041238129138947, 0.10282330960035324, 0.06928201764822006, -0.07230984419584274, -0.014502448961138725, -0.0001530156732769683, 0.054784100502729416, 0.006947006564587355, 0.00624688109382987, -0.043768879026174545, -0.07086987793445587, 0.05525300279259682, 0.07259200513362885, -0.05057011544704437, -0.037514567375183105, 0.01679101586341858, -0.02929956652224064, -0.02562989853322506, 0.11543014645576477, -0.08186391741037369, -0.16905894875526428, 0.01447557657957077, -0.010237799026072025, 0.05524155870079994, -0.06472378969192505, -0.05052562803030014, 0.02109985426068306, -0.02645646221935749, -0.025249548256397247, -0.022559979930520058, 0.0767635926604271, 0.01503780297935009, 0.05924613028764725, -0.03975556045770645, 0.0057287937961518764, 0.12231693416833878, 0.033209480345249176, -0.00754878856241703, 0.002040355233475566, -0.040382254868745804, -0.049118056893348694, -0.001382398302666843, -0.10748414695262909, -0.037595685571432114, 0.07484173774719238, -0.08191604167222977, -0.06945965439081192, -0.016526591032743454, -0.03866223618388176, 0.03541265428066254, 0.028419295325875282, 0.09816006571054459, 0.01302256342023611, 0.013100562617182732, -0.005942381918430328 ]
0.160216
Ollama provides compatibility with parts of the [OpenAI API](https://platform.openai.com/docs/api-reference) to help connect existing applications to Ollama. ## Usage ### Simple `v1/chat/completions` example ```python basic.py from openai import OpenAI client = OpenAI( base\_url='http://localhost:11434/v1/', api\_key='ollama', # required but ignored ) chat\_completion = client.chat.completions.create( messages=[ { 'role': 'user', 'content': 'Say this is a test', } ], model='gpt-oss:20b', ) print(chat\_completion.choices[0].message.content) ``` ```javascript basic.js import OpenAI from "openai"; const openai = new OpenAI({ baseURL: "http://localhost:11434/v1/", apiKey: "ollama", // required but ignored }); const chatCompletion = await openai.chat.completions.create({ messages: [{ role: "user", content: "Say this is a test" }], model: "gpt-oss:20b", }); console.log(chatCompletion.choices[0].message.content); ``` ```shell basic.sh curl -X POST http://localhost:11434/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-oss:20b", "messages": [{ "role": "user", "content": "Say this is a test" }] }' ``` ### Simple `v1/responses` example ```python responses.py from openai import OpenAI client = OpenAI( base\_url='http://localhost:11434/v1/', api\_key='ollama', # required but ignored ) responses\_result = client.responses.create( model='qwen3:8b', input='Write a short poem about the color blue', ) print(responses\_result.output\_text) ``` ```javascript responses.js import OpenAI from "openai"; const openai = new OpenAI({ baseURL: "http://localhost:11434/v1/", apiKey: "ollama", // required but ignored }); const responsesResult = await openai.responses.create({ model: "qwen3:8b", input: "Write a short poem about the color blue", }); console.log(responsesResult.output\_text); ``` ```shell responses.sh curl -X POST http://localhost:11434/v1/responses \ -H "Content-Type: application/json" \ -d '{ "model": "qwen3:8b", "input": "Write a short poem about the color blue" }' ``` ### v1/chat/completions with vision example ```python vision.py from openai import OpenAI client = OpenAI( base\_url='http://localhost:11434/v1/', api\_key='ollama', # required but ignored ) response = client.chat.completions.create( model='qwen3-vl:8b', messages=[ { 'role': 'user', 'content': [ {'type': 'text', 'text': "What's in this image?"}, { 'type': 'image\_url', 'image\_url': 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG0AAABmCAYAAADBPx+VAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA3VSURBVHgB7Z27r0zdG8fX743i1bi1ikMoFMQloXRpKFFIqI7LH4BEQ+NWIkjQuSWCRIEoULk0gsK1kCBI0IhrQVT7tz/7zZo888yz1r7MnDl7z5xvsjkzs2fP3uu71nNfa7lkAsm7d++Sffv2JbNmzUqcc8m0adOSzZs3Z+/XES4ZckAWJEGWPiCxjsQNLWmQsWjRIpMseaxcuTKpG/7HP27I8P79e7dq1ars/yL4/v27S0ejqwv+cUOGEGGpKHR37tzJCEpHV9tnT58+dXXCJDdECBE2Ojrqjh071hpNECjx4cMHVycM1Uhbv359B2F79+51586daxN/+pyRkRFXKyRDAqxEp4yMlDDzXG1NPnnyJKkThoK0VFd1ELZu3TrzXKxKfW7dMBQ6bcuWLW2v0VlHjx41z717927ba22U9APcw7Nnz1oGEPeL3m3p2mTAYYnFmMOMXybPPXv2bNIPpFZr1NHn4HMw0KRBjg9NuRw95s8PEcz/6DZELQd/09C9QGq5RsmSRybqkwHGjh07OsJSsYYm3ijPpyHzoiacg35MLdDSIS/O1yM778jOTwYUkKNHWUzUWaOsylE00MyI0fcnOwIdjvtNdW/HZwNLGg+sR1kMepSNJXmIwxBZiG8tDTpEZzKg0GItNsosY8USkxDhD0Rinuiko2gfL/RbiD2LZAjU9zKQJj8RDR0vJBR1/Phx9+PHj9Z7REF4nTZkxzX4LCXHrV271qXkBAPGfP/atWvu/PnzHe4C97F48eIsRLZ9+3a3f/9+87dwP1JxaF7/3r17ba+5l4EcaVo0lj3SBq5kGTJSQmLWMjgYNei2GPT1MuMqGTDEFHzeQSP2wi/jGnkmPJ/nhccs44jvDAxpVcxnq0F6eT8h4ni/iIWpR5lPyA6ETkNXoSukvpJAD3AsXLiwpZs49+fPn5ke4j10TqYvegSfn0OnafC+Tv9ooA/JPkgQysqQNBzagXY55nO/oa1F7qvIPWkRL12WRpMWUvpVDYmxAPehxWSe8ZEXL20sadYIozfmNch4QJPAfeJgW3rNsnzphBKNJM2KKODo1rVOMRYik5ETy3ix4qWNI81qAAirizgMIc+yhTytx0JWZuNI03qsrgWlGtwjoS9XwgUhWGyhUaRZZQNNIEwCiXD16tXcAHUs79co0vSD8rrJCIW98pzvxpAWyyo3HYwqS0+H0BjStClcZJT5coMm6D2LOF8TolGJtK9fvyZpyiC5ePFi9nc/oJU4eiEP0jVoAnHa9wyJycITMP78+eMeP37sXrx44d6+fdt6f82aNdkx1pg9e3Zb5W+RSRE+n+VjksQWifvVaTKFhn5O8my63K8Qabdv33b379/PiAP//vuvW7BggZszZ072/+TJk91YgkafPn166zXB1rQHFvouAWHq9z3SEevSUerqCn2/dDCeta2jxYbr69evk4MHDyY7d+7MjhMnTiTPnz9Pfv/+nfQT2ggpO2dMF8cghuoM7Ygj5iWCqRlGFml0QC/ftGmTmzt3rmsaKDsgBSPh0/8yPeLLBihLkOKJc0jp8H8vUzcxIA1k6QJ/c78tWEyj5P3o4u9+jywNPdJi5rAH9x0KHcl4Hg570eQp3+vHXGyrmEeigzQsQsjavXt38ujRo44LQuDDhw+TW7duRS1HGgMxhNXHgflaNTOsHyKvHK5Ijo2jbFjJBQK9YwFd6RVMzfgRBmEfP37suBBm/p49e1qjEP2mwTViNRo0VJWH1deMXcNK08uUjVUu7s/zRaL+oLNxz1bpANco4npUgX4G2eFbpDFyQoQxojBCpEGSytmOH8qrH5Q9vuzD6ofQylkCUmh8DBAr+q8JCyVNtWQIidKQE9wNtLSQnS4jDSsxNHogzFuQBw4cyM61UKVsjfr3ooBkPSqqQHesUPWVtzi9/vQi1T+rJj7WiTz4Pt/l3LxUkr5P2VYZaZ4URpsE+st/dujQoaBBYokbrz/8TJNQYLSonrPS9kUaSkPeZyj1AWSj+d+VBoy1pIWVNed8P0Ll/ee5HdGRhrHhR5GGN0r4LGZBaj8oFDJitBTJzIZgFcmU0Y8ytWMZMzJOaXUSrUs5RxKnrxmbb5YXO9VGUhtpXldhEUogFr3IzIsvlpmdosVcGVGXFWp2oU9kLFL3dEkSz6NHEY1sjSRdIuDFWEhd8KxFqsRi1uM/nz9/zpxnwlESONdg6dKlbsaMGS4EHFHtjFIDHwKOo46l4TxSuxgDzi+rE2jg+BaFruOX4HXa0Nnf1lwAPufZeF8/r6zD97WK2qFnGjBxTw5qNGPxT+5T/r7/7RawFC3j4vTp09koCxkeHjqbHJqArmH5UrFKKksnxrK7FuRIs8STfBZv+luugXZ2pR/pP9Ois4z+TiMzUUkUjD0iEi1fzX8GmXyuxUBRcaUfykV0YZnlJGKQpOiGB76x5GeWkWWJc3mOrK6S7xdND+W5N6XyaRgtWJFe13GkaZnKOsYqGdOVVVbGupsyA/l7emTLHi7vwTdirNEt0qxnzAvBFcnQF16xh/TMpUuXHDowhlA9vQVraQhkudRdzOnK+04ZSP3DUhVSP61YsaLtd/ks7ZgtPcXqPqEafHkdqa84X6aCeL7YWlv6edGFHb+ZFICPlljHhg0bKuk0CSvVznWsotRu433alNdFrqG45ejoaPCaUkWERpLXjzFL2Rpllp7PJU2a/v7Ab8N05/9t27Z16KUqoFGsxnI9EosS2niSYg9SpU6B4JgTrvVW1flt1sT+0ADIJU2maXzcUTraGCRaL1Wp9rUMk16PMom8QhruxzvZIegJjFU7LLCePfS8uaQdPny4jTTL0dbee5mYokQsXTIWNY46kuMbnt8Kmec+LGWtOVIl9cT1rCB0V8WqkjAsRwta93TbwNYoGKsUSChN44lgBNCoHLHzquYKrU6qZ8lolCIN0Rh6cP0Q3U6I6IXILYOQI513hJaSKAorFpuHXJNfVlpRtmYBk1Su1obZr5dnKAO+L10Hrj3WZW+E3qh6IszE37F6EB+68mGpvKm4eb9bFrlzrok7fvr0Kfv727dvWRmdVTJHw0qiiCUSZ6wCK+7XL/AcsgNyL74DQQ730sv78Su7+t/A36MdY0sW5o40ahslXr58aZ5HtZB8GH64m9EmMZ7FpYw4T6QnrZfgenrhFxaSiSGXtPnz57e9TkNZLvTjeqhr734CNtrK41L40sUQckmj1lGKQ0rC37x544r8eNXRpnVE3ZZY7zXo8NomiO0ZUCj2uHz58rbXoZ6gc0uA+F6ZeKS/jhRDUq8MKrTho9fEkihMmhxtBI1DxKFY9XLpVcSkfoi8JGnToZO5sU5aiDQIW716ddt7ZLYtMQlhECdBGXZZMWldY5BHm5xgAroWj4C0hbYkSc/jBmggIrXJWlZM6pSETsEPGqZOndr2uuuR5rF169a2HoHPdurUKZM4CO1WTPqaDaAd+GFGKdIQkxAn9RuEWcTRyN2KSUgiSgF5aWzPTeA/lN5rZubMmR2bE4SIC4nJoltgAV/dVefZm72AtctUCJU2CMJ327hxY9t7EHbkyJFseq+EJSY16RPo3Dkq1kkr7+q0bNmyDuLQcZBEPYmHVdOBiJyIlrRDq41YPWfXOxUysi5fvtyaj+2BpcnsUV/oSoEMOk2CQGlr4ckhBwaetBhjCwH0ZHtJROPJkyc7UjcYLDjmrH7ADTEBXFfOYmB0k9oYBOjJ8b4aOYSe7QkKcYhFlq3QYLQhSidNmtS2RATwy8YOM3EQJsUjKiaWZ+vZToUQgzhkHXudb/PW5YMHD9yZM2faPsMwoc7RciYJXbGuBqJ1UIGKKLv915jsvgtJxCZDubdXr165mzdvtr1Hz5LONA8jrUwKPqsmVesKa49S3Q4WxmRPUEYdTjgiUcfUwLx589ySJUva3oMkP6IYddq6HMS4o55xBJBUeRjzfa4Zdeg56QZ43LhxoyPo7Lf1kNt7oO8wWAbNwaYjIv5lhyS7kRf96dvm5Jah8vfvX3flyhX35cuX6HfzFHOToS1H4BenCaHvO8pr8iDuwoUL7tevX+b5ZdbBair0xkFIlFDlW4ZknEClsp/TzXyAKVOmmHWFVSbDNw1l1+4f90U6IY/q4V27dpnE9bJ+v87QEydjqx/UamVVPRG+mwkNTYN+9tjkwzEx+atCm/X9WvWtDtAb68Wy9LXa1UmvCDDIpPkyOQ5ZwSzJ4jMrvFcr0rSjOUh+GcT4LSg5ugkW1Io0/SCDQBojh0hPlaJdah+tkVYrnTZowP8iq1F1TgMBBauufyB33x1v+NWFYmT5KmppgHC+NkAgbmRkpD3yn9QIseXymoTQFGQmIOKTxiZIWpvAatenVqRVXf2nTrAWMsPnKrMZHz6bJq5jvce6QK8J1cQNgKxlJapMPdZSR64/UivS9NztpkVEdKcrs5alhhWP9NeqlfWopzhZScI6QxseegZRGeg5a8C3Re1Mfl1ScP36ddcUaMuv24iOJtz7sbUjTS4qBvKmstYJoUauiuD3k5qhyr7QdUHMeCgLa1Ear9NquemdXgmum4fvJ6w1lqsuDhNrg1qSpleJK7K3TF0Q2jSd94uSZ60kK1e3qyVpQK6PVWXp2/FC3mp6jBhKKOiY2h3gtUV64TWM6wDETRPLDfSakXmH3w8g9Jlug8ZtTt4kVF0kLUYYmCCtD/DrQ5YhMGbA9L3ucdjh0y8kOHW5gU/VEEmJTcL4Pz/f7mgoAbYkAAAAAElFTkSuQmCC', }, ], } ], max\_tokens=300, ) print(response.choices[0].message.content) ``` ```javascript vision.js import OpenAI from "openai"; const openai = new OpenAI({ baseURL: "http://localhost:11434/v1/", apiKey: "ollama", // required but ignored }); const response = await openai.chat.completions.create({ model: "qwen3-vl:8b", messages: [ { role: "user", content: [ { type: "text", text: "What's in this image?" }, { type: "image\_url", image\_url: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG0AAABmCAYAAADBPx+VAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA3VSURBVHgB7Z27r0zdG8fX743i1bi1ikMoFMQloXRpKFFIqI7LH4BEQ+NWIkjQuSWCRIEoULk0gsK1kCBI0IhrQVT7tz/7zZo888yz1r7MnDl7z5xvsjkzs2fP3uu71nNfa7lkAsm7d++Sffv2JbNmzUqcc8m0adOSzZs3Z+/XES4ZckAWJEGWPiCxjsQNLWmQsWjRIpMseaxcuTKpG/7HP27I8P79e7dq1ars/yL4/v27S0ejqwv+cUOGEGGpKHR37tzJCEpHV9tnT58+dXXCJDdECBE2Ojrqjh071hpNECjx4cMHVycM1Uhbv359B2F79+51586daxN/+pyRkRFXKyRDAqxEp4yMlDDzXG1NPnnyJKkThoK0VFd1ELZu3TrzXKxKfW7dMBQ6bcuWLW2v0VlHjx41z717927ba22U9APcw7Nnz1oGEPeL3m3p2mTAYYnFmMOMXybPPXv2bNIPpFZr1NHn4HMw0KRBjg9NuRw95s8PEcz/6DZELQd/09C9QGq5RsmSRybqkwHGjh07OsJSsYYm3ijPpyHzoiacg35MLdDSIS/O1yM778jOTwYUkKNHWUzUWaOsylE00MyI0fcnOwIdjvtNdW/HZwNLGg+sR1kMepSNJXmIwxBZiG8tDTpEZzKg0GItNsosY8USkxDhD0Rinuiko2gfL/RbiD2LZAjU9zKQJj8RDR0vJBR1/Phx9+PHj9Z7REF4nTZkxzX4LCXHrV271qXkBAPGfP/atWvu/PnzHe4C97F48eIsRLZ9+3a3f/9+87dwP1JxaF7/3r17ba+5l4EcaVo0lj3SBq5kGTJSQmLWMjgYNei2GPT1MuMqGTDEFHzeQSP2wi/jGnkmPJ/nhccs44jvDAxpVcxnq0F6eT8h4ni/iIWpR5lPyA6ETkNXoSukvpJAD3AsXLiwpZs49+fPn5ke4j10TqYvegSfn0OnafC+Tv9ooA/JPkgQysqQNBzagXY55nO/oa1F7qvIPWkRL12WRpMWUvpVDYmxAPehxWSe8ZEXL20sadYIozfmNch4QJPAfeJgW3rNsnzphBKNJM2KKODo1rVOMRYik5ETy3ix4qWNI81qAAirizgMIc+yhTytx0JWZuNI03qsrgWlGtwjoS9XwgUhWGyhUaRZZQNNIEwCiXD16tXcAHUs79co0vSD8rrJCIW98pzvxpAWyyo3HYwqS0+H0BjStClcZJT5coMm6D2LOF8TolGJtK9fvyZpyiC5ePFi9nc/oJU4eiEP0jVoAnHa9wyJycITMP78+eMeP37sXrx44d6+fdt6f82aNdkx1pg9e3Zb5W+RSRE+n+VjksQWifvVaTKFhn5O8my63K8Qabdv33b379/PiAP//vuvW7BggZszZ072/+TJk91YgkafPn166zXB1rQHFvouAWHq9z3SEevSUerqCn2/dDCeta2jxYbr69evk4MHDyY7d+7MjhMnTiTPnz9Pfv/+nfQT2ggpO2dMF8cghuoM7Ygj5iWCqRlGFml0QC/ftGmTmzt3rmsaKDsgBSPh0/8yPeLLBihLkOKJc0jp8H8vUzcxIA1k6QJ/c78tWEyj5P3o4u9+jywNPdJi5rAH9x0KHcl4Hg570eQp3+vHXGyrmEeigzQsQsjavXt38ujRo44LQuDDhw+TW7duRS1HGgMxhNXHgflaNTOsHyKvHK5Ijo2jbFjJBQK9YwFd6RVMzfgRBmEfP37suBBm/p49e1qjEP2mwTViNRo0VJWH1deMXcNK08uUjVUu7s/zRaL+oLNxz1bpANco4npUgX4G2eFbpDFyQoQxojBCpEGSytmOH8qrH5Q9vuzD6ofQylkCUmh8DBAr+q8JCyVNtWQIidKQE9wNtLSQnS4jDSsxNHogzFuQBw4cyM61UKVsjfr3ooBkPSqqQHesUPWVtzi9/vQi1T+rJj7WiTz4Pt/l3LxUkr5P2VYZaZ4URpsE+st/dujQoaBBYokbrz/8TJNQYLSonrPS9kUaSkPeZyj1AWSj+d+VBoy1pIWVNed8P0Ll/ee5HdGRhrHhR5GGN0r4LGZBaj8oFDJitBTJzIZgFcmU0Y8ytWMZMzJOaXUSrUs5RxKnrxmbb5YXO9VGUhtpXldhEUogFr3IzIsvlpmdosVcGVGXFWp2oU9kLFL3dEkSz6NHEY1sjSRdIuDFWEhd8KxFqsRi1uM/nz9/zpxnwlESONdg6dKlbsaMGS4EHFHtjFIDHwKOo46l4TxSuxgDzi+rE2jg+BaFruOX4HXa0Nnf1lwAPufZeF8/r6zD97WK2qFnGjBxTw5qNGPxT+5T/r7/7RawFC3j4vTp09koCxkeHjqbHJqArmH5UrFKKksnxrK7FuRIs8STfBZv+luugXZ2pR/pP9Ois4z+TiMzUUkUjD0iEi1fzX8GmXyuxUBRcaUfykV0YZnlJGKQpOiGB76x5GeWkWWJc3mOrK6S7xdND+W5N6XyaRgtWJFe13GkaZnKOsYqGdOVVVbGupsyA/l7emTLHi7vwTdirNEt0qxnzAvBFcnQF16xh/TMpUuXHDowhlA9vQVraQhkudRdzOnK+04ZSP3DUhVSP61YsaLtd/ks7ZgtPcXqPqEafHkdqa84X6aCeL7YWlv6edGFHb+ZFICPlljHhg0bKuk0CSvVznWsotRu433alNdFrqG45ejoaPCaUkWERpLXjzFL2Rpllp7PJU2a/v7Ab8N05/9t27Z16KUqoFGsxnI9EosS2niSYg9SpU6B4JgTrvVW1flt1sT+0ADIJU2maXzcUTraGCRaL1Wp9rUMk16PMom8QhruxzvZIegJjFU7LLCePfS8uaQdPny4jTTL0dbee5mYokQsXTIWNY46kuMbnt8Kmec+LGWtOVIl9cT1rCB0V8WqkjAsRwta93TbwNYoGKsUSChN44lgBNCoHLHzquYKrU6qZ8lolCIN0Rh6cP0Q3U6I6IXILYOQI513hJaSKAorFpuHXJNfVlpRtmYBk1Su1obZr5dnKAO+L10Hrj3WZW+E3qh6IszE37F6EB+68mGpvKm4eb9bFrlzrok7fvr0Kfv727dvWRmdVTJHw0qiiCUSZ6wCK+7XL/AcsgNyL74DQQ730sv78Su7+t/A36MdY0sW5o40ahslXr58aZ5HtZB8GH64m9EmMZ7FpYw4T6QnrZfgenrhFxaSiSGXtPnz57e9TkNZLvTjeqhr734CNtrK41L40sUQckmj1lGKQ0rC37x544r8eNXRpnVE3ZZY7zXo8NomiO0ZUCj2uHz58rbXoZ6gc0uA+F6ZeKS/jhRDUq8MKrTho9fEkihMmhxtBI1DxKFY9XLpVcSkfoi8JGnToZO5sU5aiDQIW716ddt7ZLYtMQlhECdBGXZZMWldY5BHm5xgAroWj4C0hbYkSc/jBmggIrXJWlZM6pSETsEPGqZOndr2uuuR5rF169a2HoHPdurUKZM4CO1WTPqaDaAd+GFGKdIQkxAn9RuEWcTRyN2KSUgiSgF5aWzPTeA/lN5rZubMmR2bE4SIC4nJoltgAV/dVefZm72AtctUCJU2CMJ327hxY9t7EHbkyJFseq+EJSY16RPo3Dkq1kkr7+q0bNmyDuLQcZBEPYmHVdOBiJyIlrRDq41YPWfXOxUysi5fvtyaj+2BpcnsUV/oSoEMOk2CQGlr4ckhBwaetBhjCwH0ZHtJROPJkyc7UjcYLDjmrH7ADTEBXFfOYmB0k9oYBOjJ8b4aOYSe7QkKcYhFlq3QYLQhSidNmtS2RATwy8YOM3EQJsUjKiaWZ+vZToUQgzhkHXudb/PW5YMHD9yZM2faPsMwoc7RciYJXbGuBqJ1UIGKKLv915jsvgtJxCZDubdXr165mzdvtr1Hz5LONA8jrUwKPqsmVesKa49S3Q4WxmRPUEYdTjgiUcfUwLx589ySJUva3oMkP6IYddq6HMS4o55xBJBUeRjzfa4Zdeg56QZ43LhxoyPo7Lf1kNt7oO8wWAbNwaYjIv5lhyS7kRf96dvm5Jah8vfvX3flyhX35cuX6HfzFHOToS1H4BenCaHvO8pr8iDuwoUL7tevX+b5ZdbBair0xkFIlFDlW4ZknEClsp/TzXyAKVOmmHWFVSbDNw1l1+4f90U6IY/q4V27dpnE9bJ+v87QEydjqx/UamVVPRG+mwkNTYN+9tjkwzEx+atCm/X9WvWtDtAb68Wy9LXa1UmvCDDIpPkyOQ5ZwSzJ4jMrvFcr0rSjOUh+GcT4LSg5ugkW1Io0/SCDQBojh0hPlaJdah+tkVYrnTZowP8iq1F1TgMBBauufyB33x1v+NWFYmT5KmppgHC+NkAgbmRkpD3yn9QIseXymoTQFGQmIOKTxiZIWpvAatenVqRVXf2nTrAWMsPnKrMZHz6bJq5jvce6QK8J1cQNgKxlJapMPdZSR64/UivS9NztpkVEdKcrs5alhhWP9NeqlfWopzhZScI6QxseegZRGeg5a8C3Re1Mfl1ScP36ddcUaMuv24iOJtz7sbUjTS4qBvKmstYJoUauiuD3k5qhyr7QdUHMeCgLa1Ear9NquemdXgmum4fvJ6w1lqsuDhNrg1qSpleJK7K3TF0Q2jSd94uSZ60kK1e3qyVpQK6PVWXp2/FC3mp6jBhKKOiY2h3gtUV64TWM6wDETRPLDfSakXmH3w8g9Jlug8ZtTt4kVF0kLUYYmCCtD/DrQ5YhMGbA9L3ucdjh0y8kOHW5gU/VEEmJTcL4Pz/f7mgoAbYkAAAAAElFTkSuQmCC", }, ], }, ], }); console.log(response.choices[0].message.content); ``` ```shell vision.sh curl -X POST http://localhost:11434/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "qwen3-vl:8b", "messages": [{ "role": "user", "content": [{"type": "text", "text": "What is this an image of?"}, {"type": "image\_url", "image\_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG0AAABmCAYAAADBPx+VAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA3VSURBVHgB7Z27r0zdG8fX743i1bi1ikMoFMQloXRpKFFIqI7LH4BEQ+NWIkjQuSWCRIEoULk0gsK1kCBI0IhrQVT7tz/7zZo888yz1r7MnDl7z5xvsjkzs2fP3uu71nNfa7lkAsm7d++Sffv2JbNmzUqcc8m0adOSzZs3Z+/XES4ZckAWJEGWPiCxjsQNLWmQsWjRIpMseaxcuTKpG/7HP27I8P79e7dq1ars/yL4/v27S0ejqwv+cUOGEGGpKHR37tzJCEpHV9tnT58+dXXCJDdECBE2Ojrqjh071hpNECjx4cMHVycM1Uhbv359B2F79+51586daxN/+pyRkRFXKyRDAqxEp4yMlDDzXG1NPnnyJKkThoK0VFd1ELZu3TrzXKxKfW7dMBQ6bcuWLW2v0VlHjx41z717927ba22U9APcw7Nnz1oGEPeL3m3p2mTAYYnFmMOMXybPPXv2bNIPpFZr1NHn4HMw0KRBjg9NuRw95s8PEcz/6DZELQd/09C9QGq5RsmSRybqkwHGjh07OsJSsYYm3ijPpyHzoiacg35MLdDSIS/O1yM778jOTwYUkKNHWUzUWaOsylE00MyI0fcnOwIdjvtNdW/HZwNLGg+sR1kMepSNJXmIwxBZiG8tDTpEZzKg0GItNsosY8USkxDhD0Rinuiko2gfL/RbiD2LZAjU9zKQJj8RDR0vJBR1/Phx9+PHj9Z7REF4nTZkxzX4LCXHrV271qXkBAPGfP/atWvu/PnzHe4C97F48eIsRLZ9+3a3f/9+87dwP1JxaF7/3r17ba+5l4EcaVo0lj3SBq5kGTJSQmLWMjgYNei2GPT1MuMqGTDEFHzeQSP2wi/jGnkmPJ/nhccs44jvDAxpVcxnq0F6eT8h4ni/iIWpR5lPyA6ETkNXoSukvpJAD3AsXLiwpZs49+fPn5ke4j10TqYvegSfn0OnafC+Tv9ooA/JPkgQysqQNBzagXY55nO/oa1F7qvIPWkRL12WRpMWUvpVDYmxAPehxWSe8ZEXL20sadYIozfmNch4QJPAfeJgW3rNsnzphBKNJM2KKODo1rVOMRYik5ETy3ix4qWNI81qAAirizgMIc+yhTytx0JWZuNI03qsrgWlGtwjoS9XwgUhWGyhUaRZZQNNIEwCiXD16tXcAHUs79co0vSD8rrJCIW98pzvxpAWyyo3HYwqS0+H0BjStClcZJT5coMm6D2LOF8TolGJtK9fvyZpyiC5ePFi9nc/oJU4eiEP0jVoAnHa9wyJycITMP78+eMeP37sXrx44d6+fdt6f82aNdkx1pg9e3Zb5W+RSRE+n+VjksQWifvVaTKFhn5O8my63K8Qabdv33b379/PiAP//vuvW7BggZszZ072/+TJk91YgkafPn166zXB1rQHFvouAWHq9z3SEevSUerqCn2/dDCeta2jxYbr69evk4MHDyY7d+7MjhMnTiTPnz9Pfv/+nfQT2ggpO2dMF8cghuoM7Ygj5iWCqRlGFml0QC/ftGmTmzt3rmsaKDsgBSPh0/8yPeLLBihLkOKJc0jp8H8vUzcxIA1k6QJ/c78tWEyj5P3o4u9+jywNPdJi5rAH9x0KHcl4Hg570eQp3+vHXGyrmEeigzQsQsjavXt38ujRo44LQuDDhw+TW7duRS1HGgMxhNXHgflaNTOsHyKvHK5Ijo2jbFjJBQK9YwFd6RVMzfgRBmEfP37suBBm/p49e1qjEP2mwTViNRo0VJWH1deMXcNK08uUjVUu7s/zRaL+oLNxz1bpANco4npUgX4G2eFbpDFyQoQxojBCpEGSytmOH8qrH5Q9vuzD6ofQylkCUmh8DBAr+q8JCyVNtWQIidKQE9wNtLSQnS4jDSsxNHogzFuQBw4cyM61UKVsjfr3ooBkPSqqQHesUPWVtzi9/vQi1T+rJj7WiTz4Pt/l3LxUkr5P2VYZaZ4URpsE+st/dujQoaBBYokbrz/8TJNQYLSonrPS9kUaSkPeZyj1AWSj+d+VBoy1pIWVNed8P0Ll/ee5HdGRhrHhR5GGN0r4LGZBaj8oFDJitBTJzIZgFcmU0Y8ytWMZMzJOaXUSrUs5RxKnrxmbb5YXO9VGUhtpXldhEUogFr3IzIsvlpmdosVcGVGXFWp2oU9kLFL3dEkSz6NHEY1sjSRdIuDFWEhd8KxFqsRi1uM/nz9/zpxnwlESONdg6dKlbsaMGS4EHFHtjFIDHwKOo46l4TxSuxgDzi+rE2jg+BaFruOX4HXa0Nnf1lwAPufZeF8/r6zD97WK2qFnGjBxTw5qNGPxT+5T/r7/7RawFC3j4vTp09koCxkeHjqbHJqArmH5UrFKKksnxrK7FuRIs8STfBZv+luugXZ2pR/pP9Ois4z+TiMzUUkUjD0iEi1fzX8GmXyuxUBRcaUfykV0YZnlJGKQpOiGB76x5GeWkWWJc3mOrK6S7xdND+W5N6XyaRgtWJFe13GkaZnKOsYqGdOVVVbGupsyA/l7emTLHi7vwTdirNEt0qxnzAvBFcnQF16xh/TMpUuXHDowhlA9vQVraQhkudRdzOnK+04ZSP3DUhVSP61YsaLtd/ks7ZgtPcXqPqEafHkdqa84X6aCeL7YWlv6edGFHb+ZFICPlljHhg0bKuk0CSvVznWsotRu433alNdFrqG45ejoaPCaUkWERpLXjzFL2Rpllp7PJU2a/v7Ab8N05/9t27Z16KUqoFGsxnI9EosS2niSYg9SpU6B4JgTrvVW1flt1sT+0ADIJU2maXzcUTraGCRaL1Wp9rUMk16PMom8QhruxzvZIegJjFU7LLCePfS8uaQdPny4jTTL0dbee5mYokQsXTIWNY46kuMbnt8Kmec+LGWtOVIl9cT1rCB0V8WqkjAsRwta93TbwNYoGKsUSChN44lgBNCoHLHzquYKrU6qZ8lolCIN0Rh6cP0Q3U6I6IXILYOQI513hJaSKAorFpuHXJNfVlpRtmYBk1Su1obZr5dnKAO+L10Hrj3WZW+E3qh6IszE37F6EB+68mGpvKm4eb9bFrlzrok7fvr0Kfv727dvWRmdVTJHw0qiiCUSZ6wCK+7XL/AcsgNyL74DQQ730sv78Su7+t/A36MdY0sW5o40ahslXr58aZ5HtZB8GH64m9EmMZ7FpYw4T6QnrZfgenrhFxaSiSGXtPnz57e9TkNZLvTjeqhr734CNtrK41L40sUQckmj1lGKQ0rC37x544r8eNXRpnVE3ZZY7zXo8NomiO0ZUCj2uHz58rbXoZ6gc0uA+F6ZeKS/jhRDUq8MKrTho9fEkihMmhxtBI1DxKFY9XLpVcSkfoi8JGnToZO5sU5aiDQIW716ddt7ZLYtMQlhECdBGXZZMWldY5BHm5xgAroWj4C0hbYkSc/jBmggIrXJWlZM6pSETsEPGqZOndr2uuuR5rF169a2HoHPdurUKZM4CO1WTPqaDaAd+GFGKdIQkxAn9RuEWcTRyN2KSUgiSgF5aWzPTeA/lN5rZubMmR2bE4SIC4nJoltgAV/dVefZm72AtctUCJU2CMJ327hxY9t7EHbkyJFseq+EJSY16RPo3Dkq1kkr7+q0bNmyDuLQcZBEPYmHVdOBiJyIlrRDq41YPWfXOxUysi5fvtyaj+2BpcnsUV/oSoEMOk2CQGlr4ckhBwaetBhjCwH0ZHtJROPJkyc7UjcYLDjmrH7ADTEBXFfOYmB0k9oYBOjJ8b4aOYSe7QkKcYhFlq3QYLQhSidNmtS2RATwy8YOM3EQJsUjKiaWZ+vZToUQgzhkHXudb/PW5YMHD9yZM2faPsMwoc7RciYJXbGuBqJ1UIGKKLv915jsvgtJxCZDubdXr165mzdvtr1Hz5LONA8jrUwKPqsmVesKa49S3Q4WxmRPUEYdTjgiUcfUwLx589ySJUva3oMkP6IYddq6HMS4o55xBJBUeRjzfa4Zdeg56QZ43LhxoyPo7Lf1kNt7oO8wWAbNwaYjIv5lhyS7kRf96dvm5Jah8vfvX3flyhX35cuX6HfzFHOToS1H4BenCaHvO8pr8iDuwoUL7tevX+b5ZdbBair0xkFIlFDlW4ZknEClsp/TzXyAKVOmmHWFVSbDNw1l1+4f90U6IY/q4V27dpnE9bJ+v87QEydjqx/UamVVPRG+mwkNTYN+9tjkwzEx+atCm/X9WvWtDtAb68Wy9LXa1UmvCDDIpPkyOQ5ZwSzJ4jMrvFcr0rSjOUh+GcT4LSg5ugkW1Io0/SCDQBojh0hPlaJdah+tkVYrnTZowP8iq1F1TgMBBauufyB33x1v+NWFYmT5KmppgHC+NkAgbmRkpD3yn9QIseXymoTQFGQmIOKTxiZIWpvAatenVqRVXf2nTrAWMsPnKrMZHz6bJq5jvce6QK8J1cQNgKxlJapMPdZSR64/UivS9NztpkVEdKcrs5alhhWP9NeqlfWopzhZScI6QxseegZRGeg5a8C3Re1Mfl1ScP36ddcUaMuv24iOJtz7sbUjTS4qBvKmstYJoUauiuD3k5qhyr7QdUHMeCgLa1Ear9NquemdXgmum4fvJ6w1lqsuDhNrg1qSpleJK7K3TF0Q2jSd94uSZ60kK1e3qyVpQK6PVWXp2/FC3mp6jBhKKOiY2h3gtUV64TWM6wDETRPLDfSakXmH3w8g9Jlug8ZtTt4kVF0kLUYYmCCtD/DrQ5YhMGbA9L3ucdjh0y8kOHW5gU/VEEmJTcL4Pz/f7mgoAbYkAAAAAElFTkSuQmCC"}]}] }' ``` ## Endpoints ### `/v1/chat/completions` #### Supported features - [x] Chat completions - [x] Streaming - [x] JSON mode - [x] Reproducible outputs - [x] Vision - [x] Tools - [ ] Logprobs #### Supported request fields - [x] `model` - [x] `messages` - [x] Text `content` - [x] Image `content` - [x] Base64 encoded image - [ ] Image URL - [x] Array of `content` parts - [x] `frequency\_penalty` - [x] `presence\_penalty` - [x] `response\_format` - [x] `seed` - [x] `stop` - [x] `stream` - [x] `stream\_options` - [x] `include\_usage` - [x] `temperature` - [x] `top\_p` - [x] `max\_tokens` - [x] `tools` - [ ] `tool\_choice` - [ ] `logit\_bias` - [ ] `user` - [ ] `n` ### `/v1/completions` #### Supported features - [x] Completions - [x] Streaming - [x] JSON mode - [x] Reproducible outputs - [ ] Logprobs #### Supported request fields - [x] `model` - [x] `prompt` - [x] `frequency\_penalty` - [x] `presence\_penalty` - [x] `seed` - [x] `stop` - [x] `stream` - [x] `stream\_options` - [x] `include\_usage` - [x] `temperature` - [x] `top\_p` - [x] `max\_tokens` - [x] `suffix` - [ ] `best\_of` - [ ] `echo` - [ ] `logit\_bias` - [ ] `user` - [ ] `n` #### Notes - `prompt` currently only accepts a string ### `/v1/models` #### Notes - `created` corresponds to when the model was last modified - `owned\_by` corresponds to the ollama
https://github.com/ollama/ollama/blob/main//docs/api/openai-compatibility.mdx
main
ollama
[ -0.06421857327222824, -0.01575322449207306, 0.004540615249425173, 0.04996958747506142, 0.011235358193516731, -0.12365873903036118, 0.013716643676161766, 0.0017203079769387841, 0.04442308098077774, -0.07857483625411987, 0.016710329800844193, 0.01876436546444893, -0.043836917728185654, 0.08080349862575531, 0.1662897765636444, 0.0655168741941452, 0.05126785486936569, -0.04821173846721649, -0.025058411061763763, -0.03346656635403633, 0.04258432984352112, 0.07133649289608002, 0.10351768881082535, -0.012864560820162296, -0.013813749887049198, -0.06309284269809723, 0.00046830918290652335, -0.00013402907643467188, 0.027097873389720917, 0.015448402613401413, 0.09639865159988403, -0.017905263230204582, 0.0056840963661670685, 0.01678249053657055, 0.018513688817620277, 0.061867617070674896, -0.04571281373500824, -0.10553040355443954, -0.043826621025800705, 0.00035163096617907286, 0.05136526748538017, 0.04677431657910347, -0.06184161826968193, -0.015296285040676594, 0.015270261093974113, -0.10161646455526352, -0.01966859959065914, -0.04164615273475647, 0.016466336324810982, 0.011422904208302498, -0.06782569736242294, -0.01553963590413332, -0.022420858964323997, 0.03368643671274185, 0.041969120502471924, 0.06437621265649796, -0.09973537176847458, -0.025608599185943604, -0.024791637435555458, -0.035234931856393814, 0.022817300632596016, -0.0492665097117424, -0.005672954022884369, -0.03703952208161354, -0.03555041924118996, -0.013315240852534771, -0.053851787000894547, 0.005509835202246904, -0.023719342425465584, -0.029579756781458855, 0.005953364074230194, 0.044817980378866196, -0.0035243676975369453, 0.017983948811888695, -0.040451984852552414, -0.02715127170085907, 0.014979518949985504, 0.03395526483654976, -0.0449637807905674, 0.043982427567243576, -0.031413182616233826, -0.05503838136792183, -0.043902214616537094, 0.037324242293834686, 0.039690688252449036, 0.041463855654001236, -0.006405233405530453, 0.023491067811846733, 0.04507465660572052, -0.03490578755736351, -0.017592178657650948, -0.02458794228732586, 0.007496672682464123, 0.006615332327783108, 0.09009072184562683, -0.024882622063159943, 0.01331011950969696, -0.011917630210518837, -0.08270461112260818, 0.09713868796825409, -0.015810757875442505, -0.07880453765392303, -0.030326180160045624, 0.026417968794703484, -0.033047519624233246, 0.023974323645234108, 0.025229591876268387, 0.04346565902233124, -0.05547406151890755, 0.042182669043540955, -0.0269462950527668, -0.1259949654340744, 0.11648675799369812, 0.026942303404211998, -0.005723063834011555, 0.07382208108901978, -0.024004770442843437, -0.006362401880323887, 0.04641427472233772, 0.0625026598572731, 0.06299587339162827, -0.05592791363596916, 0.03937423229217529, -0.006240381393581629, 0.006427569780498743, 0.06603837013244629, 0.03565269708633423, 3.58148149440596e-33, 0.11418638378381729, 0.03201694041490555, 0.0006035237456671894, 0.025475384667515755, 0.05703819543123245, 0.09283792227506638, 0.028613463044166565, -0.04853207990527153, -0.044855598360300064, -0.10285962373018265, -0.08608673512935638, 0.07764021307229996, -0.006936684716492891, -0.029992932453751564, -0.004802413284778595, 0.042887911200523376, -0.009775953367352486, 0.10097657889127731, 0.11112434417009354, 0.03372202813625336, 0.024760309606790543, 0.021494464948773384, 0.04628048837184906, 0.05272207409143448, -0.07005580514669418, 0.015068157576024532, -0.03441835567355156, -0.09024864435195923, -0.016993889585137367, 0.00815828051418066, 0.05373727157711983, -0.006898287683725357, -0.038359709084033966, 0.03593316301703453, 0.026037320494651794, 0.013896722346544266, -0.02060147188603878, -0.05813692882657051, -0.1111353188753128, -0.042783673852682114, -0.015771565958857536, 0.021791068837046623, -0.03499053791165352, -0.0056789470836520195, -0.07093781232833862, -0.05782836675643921, -0.03701409325003624, 0.04635755717754364, 0.0320967398583889, 0.058036670088768005, -0.10908213257789612, 0.008228332735598087, -0.04111117497086525, -0.013205943629145622, -0.009200295433402061, -0.10044138133525848, -0.019209429621696472, -0.03275598958134651, 0.047726672142744064, -0.08362674713134766, -0.0489480160176754, -0.033235762268304825, -0.017865382134914398, -0.015774667263031006, -0.007857817225158215, 0.017452172935009003, -0.017588535323739052, 0.01638590171933174, 0.025526748970150948, -0.04933108389377594, -0.02758871018886566, 0.015061970800161362, -0.06331591308116913, 0.0698387622833252, -0.04531760886311531, -0.03524787724018097, -0.022735748440027237, -0.03230246901512146, 0.059401966631412506, -0.004443509038537741, 0.03491787239909172, -0.03856571018695831, -0.043582744896411896, 0.021840550005435944, -0.007911130785942078, 0.011094511486589909, 0.02231096476316452, -0.015481132082641125, 0.024588685482740402, 0.05685325711965561, -0.04897735267877579, 0.021992197260260582, -0.0051640672609210014, 0.04019303247332573, 0.01020907238125801, -2.7747288848480777e-33, 0.024461444467306137, -0.022729577496647835, -0.022143015637993813, 0.04956578463315964, 0.05046556890010834, -0.03776552528142929, 0.06432939320802689, -0.0022198103833943605, 0.06126603111624718, 0.009709690697491169, 0.009895930998027325, -0.051064521074295044, 0.13818681240081787, 0.012906063348054886, 0.036649465560913086, -0.04267155006527901, -0.0588429756462574, 0.011649316176772118, -0.004154086112976074, 0.003810166846960783, -0.038501739501953125, 0.0023963451385498047, -0.07016854733228683, -0.03113814815878868, 0.05155271291732788, 0.04623889923095703, -0.03640886768698692, -0.055780839174985886, -0.08717838674783707, -0.06949689239263535, 0.009302515536546707, 0.10197651386260986, -0.12821494042873383, 0.0483270138502121, 0.020797379314899445, 0.11649948358535767, 0.057898856699466705, 0.08344090729951859, -0.030723832547664642, 0.030097009614109993, 0.11640089005231857, -0.05352747440338135, -0.03784309700131416, -0.0038056145422160625, -0.07157683372497559, 0.03945564478635788, -0.029044490307569504, 0.03244912251830101, -0.07874315977096558, -0.020317308604717255, 0.06718819588422775, 0.0037948351819068193, 0.00473374780267477, -0.019112078472971916, 0.04335993900895119, -0.01136919017881155, 0.055372823029756546, -0.033774636685848236, -0.03497179597616196, -0.03176539018750191, 0.031617533415555954, -0.1386731117963791, 0.0790753960609436, 0.01713411882519722, -0.010917386040091515, -0.09657495468854904, 0.021479206159710884, 0.10761476308107376, 0.05603787675499916, -0.05766845867037773, -0.11903832852840424, -0.10051481425762177, 0.08061739802360535, 0.007785682566463947, 0.10963501036167145, 0.04582040756940842, -0.04884224757552147, -0.02747432328760624, 0.06727040559053421, 0.022990625351667404, -0.07597657293081284, -0.020348142832517624, 0.0592828169465065, 0.0006783230928704143, 0.059581004083156586, 0.012285975739359856, 0.06583266705274582, 0.050831571221351624, -0.0015413110377267003, 0.04407370463013649, -0.055166345089673996, 0.07660162448883057, 0.009527206420898438, 0.06710999459028244, 0.05223585292696953, -4.933642827609219e-8, -0.08584289252758026, -0.08863019943237305, -0.09835845977067947, 0.036906979978084564, -0.03443366661667824, -0.004173679742962122, 0.013914273120462894, 0.01366342045366764, 0.06473296880722046, 0.03637607395648956, -0.013669432140886784, 0.042473580688238144, -0.026738008484244347, -0.04953106865286827, -0.07792053371667862, 0.05368414521217346, -0.005330583546310663, 0.030593620613217354, 0.01779433712363243, -0.046707794070243835, 0.03659132122993469, -0.026821745559573174, 0.01721625216305256, 0.01668303646147251, -0.02495749667286873, -0.08672841638326645, -0.037910908460617065, 0.0637742206454277, -0.07539590448141098, -0.036543987691402435, 0.01209334097802639, -0.07463400065898895, 0.09800010174512863, -0.02862396277487278, -0.021055350080132484, -0.010232916101813316, 0.03641827404499054, -0.0303055327385664, -0.022092243656516075, 0.013365590013563633, 0.07610168308019638, 0.02763291262090206, -0.04298112168908119, -0.08035637438297272, 0.06442615389823914, 0.0364406481385231, -0.015389954671263695, -0.061621662229299545, -0.03551386296749115, -0.001400083303451538, -0.018439799547195435, -0.04521210119128227, 0.08028719574213028, -0.001616595545783639, -0.010710354894399643, -0.05869143828749657, 0.002665403764694929, -0.021377693861722946, -0.02870136685669422, 0.019507739692926407, 0.06401247531175613, 0.06568033993244171, 0.03683838993310928, 0.009566144086420536 ]
0.071143
`suffix` - [ ] `best\_of` - [ ] `echo` - [ ] `logit\_bias` - [ ] `user` - [ ] `n` #### Notes - `prompt` currently only accepts a string ### `/v1/models` #### Notes - `created` corresponds to when the model was last modified - `owned\_by` corresponds to the ollama username, defaulting to `"library"` ### `/v1/models/{model}` #### Notes - `created` corresponds to when the model was last modified - `owned\_by` corresponds to the ollama username, defaulting to `"library"` ### `/v1/embeddings` #### Supported request fields - [x] `model` - [x] `input` - [x] string - [x] array of strings - [ ] array of tokens - [ ] array of token arrays - [x] `encoding format` - [x] `dimensions` - [ ] `user` ### `/v1/images/generations` (experimental) > Note: This endpoint is experimental and may change or be removed in future versions. Generate images using image generation models. ```python images.py from openai import OpenAI client = OpenAI( base\_url='http://localhost:11434/v1/', api\_key='ollama', # required but ignored ) response = client.images.generate( model='x/z-image-turbo', prompt='A cute robot learning to paint', size='1024x1024', response\_format='b64\_json', ) print(response.data[0].b64\_json[:50] + '...') ``` ```javascript images.js import OpenAI from "openai"; const openai = new OpenAI({ baseURL: "http://localhost:11434/v1/", apiKey: "ollama", // required but ignored }); const response = await openai.images.generate({ model: "x/z-image-turbo", prompt: "A cute robot learning to paint", size: "1024x1024", response\_format: "b64\_json", }); console.log(response.data[0].b64\_json.slice(0, 50) + "..."); ``` ```shell images.sh curl -X POST http://localhost:11434/v1/images/generations \ -H "Content-Type: application/json" \ -d '{ "model": "x/z-image-turbo", "prompt": "A cute robot learning to paint", "size": "1024x1024", "response\_format": "b64\_json" }' ``` #### Supported request fields - [x] `model` - [x] `prompt` - [x] `size` (e.g. "1024x1024") - [x] `response\_format` (only `b64\_json` supported) - [ ] `n` - [ ] `quality` - [ ] `style` - [ ] `user` ### `/v1/responses` > Note: Added in Ollama v0.13.3 Ollama supports the [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses). Only the non-stateful flavor is supported (i.e., there is no `previous\_response\_id` or `conversation` support). #### Supported features - [x] Streaming - [x] Tools (function calling) - [x] Reasoning summaries (for thinking models) - [ ] Stateful requests #### Supported request fields - [x] `model` - [x] `input` - [x] `instructions` - [x] `tools` - [x] `stream` - [x] `temperature` - [x] `top\_p` - [x] `max\_output\_tokens` - [ ] `previous\_response\_id` (stateful v1/responses not supported) - [ ] `conversation` (stateful v1/responses not supported) - [ ] `truncation` ## Models Before using a model, pull it locally `ollama pull`: ```shell ollama pull llama3.2 ``` ### Default model names For tooling that relies on default OpenAI model names such as `gpt-3.5-turbo`, use `ollama cp` to copy an existing model name to a temporary name: ```shell ollama cp llama3.2 gpt-3.5-turbo ``` Afterwards, this new model name can be specified the `model` field: ```shell curl http://localhost:11434/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "user", "content": "Hello!" } ] }' ``` ### Setting the context size The OpenAI API does not have a way of setting the context size for a model. If you need to change the context size, create a `Modelfile` which looks like: ``` FROM PARAMETER num\_ctx ``` Use the `ollama create mymodel` command to create a new model with the updated context size. Call the API with the updated model name: ```shell curl http://localhost:11434/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "mymodel", "messages": [ { "role": "user", "content": "Hello!" } ] }' ```
https://github.com/ollama/ollama/blob/main//docs/api/openai-compatibility.mdx
main
ollama
[ -0.03276447951793671, 0.007432424463331699, -0.04835851490497589, -0.035860005766153336, 0.022471381351351738, -0.06445612758398056, 0.06845523416996002, 0.06410984694957733, 0.01811029203236103, -0.04713916406035423, 0.025087634101510048, -0.013746069744229317, 0.04347750544548035, -0.01031962689012289, 0.011462089605629444, 0.1001216471195221, -0.08285392075777054, 0.006001792382448912, -0.04773682728409767, -0.04494483023881912, 0.01879216730594635, 0.09437913447618484, -0.027165239676833153, 0.02636829949915409, 0.0429912693798542, 0.0179411880671978, 0.011304128915071487, 0.047259967774152756, -0.0038574477657675743, -0.018935807049274445, 0.06186223030090332, 0.012280830182135105, 0.0090609947219491, 0.04615011811256409, 0.06176113709807396, 0.09040873497724533, -0.0309924203902483, -0.14183858036994934, 0.014649235643446445, -0.06147245690226555, 0.018988067284226418, -0.005664346739649773, -0.06711164116859436, -0.040314238518476486, -0.037459928542375565, -0.04404523968696594, -0.04951530694961548, -0.04141489416360855, -0.05887577310204506, 0.016045117750763893, -0.07575393468141556, -0.0994565561413765, -0.015198612585663795, -0.004089272581040859, 0.010999278165400028, 0.019420895725488663, -0.05458153784275055, -0.002266497816890478, 0.0012629927368834615, -0.039560433477163315, -0.032992228865623474, 0.0056303199380636215, -0.02594158612191677, 0.013308846391737461, -0.04682407155632973, -0.0856003537774086, -0.037616126239299774, 0.0322546549141407, 0.045717332512140274, 0.021878521889448166, -0.049481600522994995, 0.06224234029650688, -0.07006523013114929, 0.0140498923137784, -0.02256440743803978, 0.007016612682491541, 0.03232702240347862, 0.030943918973207474, 0.014411251991987228, -0.12791569530963898, -0.05928783863782883, -0.038570187985897064, -0.0034262537956237793, -0.004529049154371023, -0.03030974231660366, 0.04793741554021835, -0.018794067203998566, 0.030276477336883545, 0.12770268321037292, -0.016952885314822197, -0.01778625138103962, -0.07888013869524002, 0.08630011230707169, 0.04168980196118355, 0.008446612395346165, 0.05473864823579788, 0.04082508757710457, 0.01581663265824318, 0.0005733396392315626, 0.15344682335853577, -0.0734669417142868, 0.019267965108156204, 0.04937725141644478, 0.0356907956302166, 0.05637308955192566, 0.029171762987971306, 0.02721981704235077, 0.05407439172267914, -0.05741081014275551, -0.041579101234674454, -0.013129605911672115, -0.005852338392287493, -0.00956809800118208, 0.0329083614051342, 0.028074871748685837, -0.03483826294541359, 0.013376944698393345, -0.003405308583751321, -0.022939616814255714, 0.08645419776439667, 0.12363284081220627, -0.013541121035814285, -0.008122183382511139, 0.05986349284648895, -0.057799167931079865, -0.023672688752412796, -0.04297763854265213, 4.3130298324890715e-33, 0.09285671263933182, 0.04560067504644394, 0.017213070765137672, 0.04192058742046356, 0.06195930019021034, 0.07083489745855331, 0.012915766797959805, 0.06040235236287117, -0.0537651963531971, 0.004876407328993082, -0.05887729674577713, 0.046034056693315506, -0.024039937183260918, 0.028772572055459023, 0.012003432027995586, 0.009388525038957596, -0.0008121398277580738, 0.030465636402368546, 0.027234263718128204, 0.05042421445250511, 0.05251554399728775, 0.0457882396876812, -0.050000857561826706, 0.0016558782663196325, -0.018127048388123512, -0.002257040236145258, -0.029761243611574173, -0.05559820681810379, -0.048676151782274246, 0.012690299190580845, 0.039747774600982666, -0.09503456950187683, 0.02719007432460785, -0.018494242802262306, 0.011286296881735325, 0.04809984192252159, 0.015651531517505646, -0.027563415467739105, -0.08648467808961868, -0.0444563589990139, 0.0476527214050293, 0.021084805950522423, -0.012060800567269325, -0.050743259489536285, -0.09123371541500092, -0.04496027156710625, -0.08922343701124191, 0.07391811907291412, 0.008761967532336712, -0.026783905923366547, -0.03012034110724926, 0.011711932718753815, -0.007094207685440779, -0.025989972054958344, -0.028694259002804756, -0.08273353427648544, -0.07600422203540802, 0.012510004453361034, 0.025586921721696854, -0.05110740289092064, 0.009577694348990917, 0.01821487583220005, 0.024928368628025055, 0.006640399806201458, 0.010386251844465733, -0.01133466511964798, 0.08240633457899094, -0.014367944560945034, 0.0780218094587326, 0.055607132613658905, -0.14782635867595673, 0.03859204426407814, -0.062364451587200165, 0.05585750192403793, -0.06003790348768234, -0.09487069398164749, -0.016959575936198235, -0.038878802210092545, 0.00011673554399749264, 0.004660509526729584, -0.006468757055699825, -0.0057540773414075375, -0.11617594212293625, -0.00550948828458786, -0.003163551213219762, -0.027509011328220367, -0.023564593866467476, -0.07683426141738892, -0.09200005233287811, -0.026691270992159843, 0.015740197151899338, -0.00035362428752705455, -0.03890090435743332, -0.09021566808223724, -0.05215660110116005, -6.727981589865703e-33, 0.06699991971254349, 0.01089904922991991, 0.033419203013181686, -0.012194810435175896, 0.022598404437303543, -0.08426667004823685, 0.05652660131454468, 0.02041768468916416, -0.020074239000678062, -0.06477753818035126, -0.00908349733799696, -0.004396998323500156, 0.05305268615484238, -0.007321451790630817, 0.06184690445661545, -0.0005900138639844954, -0.13937081396579742, -0.12376636266708374, 0.028393980115652084, -0.02093629539012909, -0.06388971954584122, 0.1572737693786621, -0.05806974694132805, 0.056001026183366776, 0.05628552660346031, 0.019395818933844566, 0.008367122150957584, 0.006080273073166609, -0.0031010094098746777, -0.01544024609029293, -0.040417008101940155, 0.01244810689240694, -0.08986710011959076, 0.016097720712423325, -0.019460421055555344, 0.015860330313444138, -0.0028556378092616796, 0.09727075695991516, 0.014784292317926884, 0.06998497992753983, 0.09099835902452469, 0.027402030304074287, -0.02625505067408085, 0.016803573817014694, -0.05343957245349884, 0.03121403604745865, 0.03322390466928482, 0.02748924493789673, 0.02997412532567978, -0.055824656039476395, 0.02034987136721611, -0.07972057908773422, -0.025815695524215698, 0.031154567375779152, 0.03409493714570999, -0.05023733526468277, 0.012359573505818844, -0.04803686589002609, -0.02612690068781376, -0.03153494372963905, -0.03356219455599785, -0.012395824305713177, 0.05440400168299675, -0.010298587381839752, -0.08712717145681381, -0.16378140449523926, -0.09543534368276596, -0.04482658952474594, -0.013116066344082355, -0.07426268607378006, 0.0020961835980415344, -0.05735988914966583, 0.007328759413212538, 0.047695986926555634, 0.021921217441558838, -0.037751469761133194, -0.08281347900629044, -0.04577908292412758, 0.05407218635082245, 0.03327111899852753, -0.10244305431842804, 0.0406331904232502, 0.07115835696458817, 0.10768867284059525, -0.015546643175184727, -0.029593734070658684, 0.04109223932027817, 0.09530787914991379, 0.0016345042968168855, 0.016423823311924934, 0.027614351361989975, 0.05989323556423187, 0.06517063826322556, 0.08568271994590759, -0.0385887511074543, -5.611896014556805e-8, -0.0630703866481781, -0.04404845088720322, -0.056196797639131546, 0.0845445916056633, 0.029021481052041054, 0.03609080612659454, -0.010374357923865318, -0.04873049631714821, 0.01798924058675766, -0.038795504719018936, 0.05015454813838005, 0.04535026103258133, -0.04134870693087578, -0.03830935060977936, -0.07120677083730698, 0.026266595348715782, -0.03941718116402626, 0.0688379779458046, -0.06649205088615417, -0.05418652668595314, -0.008052068762481213, 0.016878394410014153, -0.014508320018649101, -0.08716733008623123, 0.06518430262804031, -0.018811192363500595, -0.031834669411182404, 0.04540346935391426, -0.046945858746767044, 0.015557706356048584, 0.08376838266849518, 0.06277197599411011, 0.06576551496982574, -0.0545082725584507, -0.000009053279427462257, -0.00690034031867981, -0.03276773542165756, -0.008690154179930687, -0.01623598113656044, -0.02352210506796837, 0.0694948360323906, 0.07683205604553223, -0.039977461099624634, 0.0015584592474624515, 0.038030385971069336, -0.07404524832963943, 0.10980232805013657, -0.003268718719482422, 0.006513699423521757, -0.04929662495851517, 0.0010864409850910306, -0.016675464808940887, 0.01276481244713068, 0.052069008350372314, -0.0654730424284935, -0.0332859568297863, 0.007521633990108967, 0.06269776076078415, 0.06894347816705704, -0.04910298064351082, 0.050770170986652374, -0.020060962066054344, 0.06919629126787186, -0.015007410198450089 ]
0.116236
{ "role": "user", "content": "Hello!" } ] }' ```
https://github.com/ollama/ollama/blob/main//docs/api/openai-compatibility.mdx
main
ollama
[ 0.010678776539862156, 0.08889999240636826, 0.03154566511511803, 0.02250397950410843, -0.023986101150512695, -0.028294814750552177, 0.06700275838375092, -0.013021537102758884, -0.029689006507396698, -0.056251659989356995, 0.01605059951543808, -0.0410747192800045, 0.004168702755123377, 0.07486375421285629, 0.14358004927635193, 0.01866946555674076, 0.0029226080514490604, 0.05585761368274689, 0.009868467226624489, -0.048351921141147614, -0.0011892839102074504, -0.029428863897919655, 0.054126616567373276, -0.018015123903751373, 0.0002978550619445741, -0.015196431428194046, -0.02932349219918251, 0.03102302923798561, 0.04413953423500061, -0.0033570777159184217, 0.08641444146633148, -0.03261243924498558, 0.0691605806350708, 0.01703435741364956, -0.05877355486154556, 0.09576618671417236, 0.07468927651643753, -0.11291952431201935, 0.050770629197359085, -0.005442340392619371, 0.03038131445646286, 0.05335867404937744, -0.11272016912698746, -0.01142696850001812, 0.04573579877614975, -0.10483472794294357, 0.035660985857248306, -0.04423338174819946, 0.02051260881125927, 0.060284946113824844, -0.02054239623248577, -0.055075667798519135, 0.007584409322589636, 0.0566701740026474, 0.03868262842297554, 0.06599854677915573, -0.05824896693229675, -0.027878332883119583, 0.014839068055152893, -0.023133229464292526, 0.014865458942949772, -0.040446605533361435, -0.031668949872255325, 0.04219796508550644, 0.03401202708482742, -0.09075789153575897, -0.02532261051237583, 0.0020669158548116684, -0.10270312428474426, -0.0032256857957690954, -0.008141892030835152, -0.0732809379696846, 0.004005991853773594, -0.020433055236935616, -0.0002465055149514228, -0.04785870388150215, 0.040516648441553116, -0.02081761136651039, 0.04387554153800011, 0.010089602321386337, 0.023907339200377464, -0.06137607619166374, -0.03352395072579384, 0.05658669397234917, -0.04519251361489296, 0.07064653933048248, -0.047687921673059464, -0.05641612783074379, -0.10303130745887756, 0.010103209875524044, -0.006305136252194643, -0.0290568508207798, 0.1057642474770546, 0.0038561499677598476, -0.024821562692523003, 0.06499562412500381, -0.0030637108720839024, 0.03288091719150543, -0.05484245717525482, 0.04162523150444031, -0.00980130210518837, -0.051455721259117126, 0.07640158385038376, 0.0028152847662568092, -0.027243001386523247, -0.008235312066972256, -0.03321637585759163, 0.01527328696101904, -0.07277854532003403, 0.024124741554260254, -0.0329291895031929, 0.00896400585770607, -0.0833451971411705, -0.0030680387280881405, -0.012067760340869427, -0.057086896151304245, -0.025563698261976242, -0.0032621915452182293, 0.017833922058343887, 0.10239046812057495, 0.11802508682012558, -0.015679409727454185, -0.03412964567542076, 0.041244588792324066, 0.06491419672966003, 0.017333615571260452, 0.06103600934147835, -7.9870190588849e-33, 0.11597286909818649, 0.03001893311738968, 0.03157594054937363, 0.07458944618701935, 0.03426668792963028, 0.014266593381762505, 0.019161704927682877, 0.004297515843063593, -0.0793420597910881, 0.006146480794996023, -0.009209444746375084, 0.022794436663389206, 0.0004510379512794316, 0.01052081398665905, -0.0666036605834961, 0.039664264768362045, 0.010187145322561264, 0.0030226337257772684, 0.011995567008852959, 0.009766208939254284, -0.02355625107884407, 0.05492781102657318, -0.05655016750097275, 0.038206957280635834, 0.0327247753739357, -0.05698637664318085, 0.006919964216649532, -0.07424837350845337, -0.022389834746718407, 0.023539822548627853, 0.032193806022405624, -0.08161402493715286, -0.007756335660815239, 0.03630048781633377, 0.019939903169870377, -0.004297031555324793, -0.0156814306974411, 0.04529409483075142, -0.09650742262601852, -0.012259155511856079, -0.008943254128098488, -0.057363077998161316, -0.009582249447703362, 0.00543171027675271, -0.13278454542160034, -0.08004973083734512, 0.0025767229963093996, 0.03562173992395401, 0.04344106465578079, 0.10368315130472183, -0.07194894552230835, 0.034487035125494, -0.015327357687056065, -0.05139788240194321, 0.10986994951963425, -0.01119966059923172, 0.009079539217054844, 0.03408621624112129, -0.07535373419523239, -0.09551538527011871, -0.017698900774121284, 0.09057099372148514, 0.059412769973278046, -0.0009344085701741278, 0.03216993063688278, -0.08901612460613251, 0.015885503962635994, -0.014700316824018955, 0.06661855429410934, -0.02683422900736332, -0.08178147673606873, 0.011223253794014454, -0.012261888943612576, 0.063437819480896, -0.11584684997797012, -0.05622384697198868, -0.04064303636550903, 0.018262039870023727, 0.02600265108048916, 0.07135627418756485, 0.01512494869530201, -0.11302884668111801, 0.014699004590511322, 0.07290434837341309, -0.05199238657951355, 0.030895821750164032, -0.031141040846705437, -0.05715799331665039, 0.0008865133277140558, -0.036225803196430206, -0.0283468347042799, -0.019722025841474533, -0.006140549201518297, 0.009646204300224781, -0.0742626041173935, 3.950364478663456e-33, 0.11038919538259506, -0.07400327920913696, -0.04557233303785324, -0.05531938001513481, -0.008803044445812702, -0.03920622169971466, 0.08179730921983719, 0.06154315173625946, 0.0013268600450828671, -0.009447969496250153, -0.0019627981819212437, 0.016074903309345245, 0.03504306077957153, 0.0037685127463191748, -0.03596387803554535, 0.01693635620176792, -0.10506422072649002, -0.0018662505317479372, 0.054236847907304764, -0.03445806726813316, -0.03188147768378258, -0.020912442356348038, 0.012802391313016415, 0.08206187933683395, 0.020211737602949142, -0.0663938820362091, 0.03537479043006897, -0.035003721714019775, -0.06318572908639908, 0.06544337421655655, 0.03714435175061226, 0.007156325504183769, -0.02226303331553936, -0.003480637911707163, -0.05810103565454483, -0.05774535611271858, -0.08851451426744461, 0.0339142307639122, 0.003693531034514308, -0.018161989748477936, 0.06496723741292953, 0.07803436368703842, 0.06624776870012283, -0.033224496990442276, -0.03686134144663811, 0.03802596777677536, 0.012029736302793026, -0.0665120780467987, -0.04613657668232918, 0.08331195265054703, 0.015177463181316853, -0.014348006807267666, 0.015239906497299671, 0.004443091806024313, 0.025493284687399864, -0.02673001028597355, -0.023171400651335716, -0.07840211689472198, 0.06765835732221603, -0.014468474313616753, 0.009816798381507397, 0.0675925612449646, 0.000821305438876152, 0.01427111029624939, 0.027904028072953224, -0.0983416959643364, -0.045720115303993225, 0.07359036803245544, 0.0023041111417114735, -0.11125046759843826, 0.056530773639678955, -0.10228962451219559, 0.02912862040102482, 0.024999259039759636, -0.0234706848859787, -0.02891097217798233, -0.01877805031836033, -0.017046242952346802, 0.018962202593684196, 0.01356582436710596, 0.018281392753124237, -0.04211344197392464, -0.05268331244587898, 0.09040854126214981, -0.012989761307835579, 0.02382897399365902, -0.019020065665245056, 0.03685465827584267, -0.011275157332420349, 0.010484976693987846, 0.06108223646879196, 0.08331981301307678, -0.061521269381046295, 0.004631850868463516, -0.008684883825480938, -3.092074152277746e-8, -0.09030373394489288, 0.010716857388615608, -0.07695628702640533, -0.014468648470938206, -0.015905315056443214, 0.03595459461212158, -0.026190446689724922, -0.08479981124401093, 0.04212481528520584, 0.04607713222503662, 0.00007742890738882124, -0.0038087230641394854, -0.08177755028009415, -0.1225837767124176, 0.042496681213378906, 0.040008604526519775, -0.07167550176382065, 0.12029337882995605, -0.008699965663254261, -0.03584115207195282, 0.04881086200475693, 0.03621815890073776, -0.023818647488951683, -0.07517115026712418, 0.03269356116652489, 0.10751177370548248, -0.0854058787226677, -0.048281535506248474, -0.025023482739925385, 0.04678800329566002, -0.02765701338648796, 0.0035444048698991537, -0.04334620013833046, -0.053732872009277344, 0.010760108008980751, 0.007963490672409534, 0.04481298476457596, -0.07532735913991928, 0.004349146503955126, 0.022278806194663048, 0.07945065945386887, 0.05186378210783005, -0.021452320739626884, 0.024077266454696655, -0.03353143483400345, -0.031049340963363647, 0.06550735980272293, 0.05917778238654137, 0.10570786893367767, -0.06436285376548767, 0.04801106080412865, -0.07109900563955307, -0.08478397876024246, -0.027653224766254425, -0.04144294559955597, 0.06576556712388992, 0.08457766473293304, 0.044498275965452194, -0.005237080622464418, -0.03808967024087906, 0.09002327919006348, 0.0699678286910057, 0.022113347426056862, -0.00014743527572136372 ]
0.038141