package chatoyant
Build not yet checked sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
OCaml-first LLM SDK with Melange-generated JavaScript
Install
dune-project
Dependency
Authors
Maintainers
Sources
chatoyant-v0.19.1.tbz
sha256=df4cc0ed2de93449efda24a5649266a5276930f42ad36cd046289d065efbdc4e
sha512=e6b64381eff2a36dc9381768e360db6516903b41cf17e82d4da614fb49afcdb332882e9b09939e2c9ac7222adbfd6aead2527ec383e0b64a2933cec3e0668b75
doc/src/chatoyant.tokens/lifecycle.ml.html
Source file lifecycle.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96type status = Active | Deprecated | Retired type info = { status : status; deprecated_on : string option; retires_on : string option; replacement : string option; note : string option; } let retired = { status = Retired; deprecated_on = None; retires_on = None; replacement = None; note = None; } let entry = function | "grok-build-0.1" -> Some { retired with retires_on = Some "2026-11-19" } | "grok-imagine-image-quality" | "grok-imagine-image-pro" -> Some { retired with retires_on = Some "2026-11-02"; replacement = Some "grok-imagine-image-2.0"; note = Some "xAI serves it as grok-imagine-image-2.0 at low quality."; } | "claude-opus-4-5" -> Some { status = Deprecated; deprecated_on = Some "2026-11-23"; retires_on = Some "2027-01-22"; replacement = Some "claude-opus-5-5"; note = None; } | "claude-opus-4-1" | "claude-sonnet-4-20250514" | "claude-sonnet-4-0" | "claude-opus-4-20250514" | "claude-opus-4-0" | "claude-3-5-sonnet-20241022" | "claude-3-5-sonnet-20240620" | "claude-3-5-haiku-20241022" | "claude-3-opus-20240229" | "claude-3-haiku-20240307" | "grok-4-1-fast-reasoning" | "grok-4-1-fast-non-reasoning" | "grok-4-fast-reasoning" | "grok-4-fast-non-reasoning" | "grok-4-0709" | "grok-4" | "grok-code-fast-1" | "grok-3" | "grok-3-mini" | "grok-2-vision-1212" | "grok-2-image-1212" -> Some retired | _ -> None let lifecycle model = let id = String.lowercase_ascii model in match entry id with | Some _ as info -> info | None -> let n = String.length id in if n > 9 && id.[n - 9] = '-' && String.for_all (function '0' .. '9' -> true | _ -> false) (String.sub id (n - 8) 8) then entry (String.sub id 0 (n - 9)) else None let warning model = let suffix prefix = Option.fold ~none:"" ~some:(( ^ ) prefix) in match lifecycle model with | None | Some { status = Active; _ } -> None | Some info -> let detail = match info.status with | Deprecated -> "deprecated" ^ suffix " on " info.deprecated_on ^ suffix ", with API retirement on " info.retires_on | Retired -> "retired" ^ suffix " on " info.retires_on | Active -> assert false in Some ("Chatoyant: " ^ model ^ " is " ^ detail ^ " on the first-party API." ^ suffix " Recommended replacement: " info.replacement) let handler = Atomic.make prerr_endline let set_warning_handler = Atomic.set handler let warned = Atomic.make [] let rec claim id = let seen = Atomic.get warned in if List.mem id seen then false else Atomic.compare_and_set warned seen (id :: seen) || claim id let warn_once model = match warning model with | Some message when claim (String.lowercase_ascii model) -> ( try (Atomic.get handler) message with _ -> ()) | _ -> ()
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>