mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-04-28 18:22:47 +00:00
31ced88b78
ConceptNet (api.conceptnet.io) was returning sustained 502s, breaking every guess with an "Upstream hiccup" reply. Replace with env.AI.run on @cf/baai/bge-small-en-v1.5 and score guesses by computing cosine similarity locally against the target vector. The local google-10k wordlist doubles as the in/out-of-vocabulary set, so OOV detection is an O(1) Set.has() with no upstream call. The similarity() response shape is unchanged, so handlers/render/state stay as-is. Free on the Workers Free plan: 10k Neurons/day cap, ~0.0037 Neurons per 2-word guess → ~2.7M guesses/day headroom for this bot.