package ocaml-ai-sdk

  1. Overview
  2. Docs
OCaml AI SDK - Provider abstraction for AI models

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocaml-ai-sdk-0.5.tbz
sha256=9e3437d6ebf48ec9f5d9a8afd62eaeece124023f02dbd87e4b291205fd309b72
sha512=605c10ed62c0cbc31a151b7031cc80a284d5c94231c1ef423ae7439572e3fadddab4a45f52eaeeef83973a8e324839b9fda03f9082deef1b6781353f63975510

doc/ocaml-ai-sdk.ai_provider_openai/Ai_provider_openai/Model_catalog/index.html

Module Ai_provider_openai.Model_catalogSource

OpenAI model catalog and capability detection.

Sourcetype system_message_mode =
  1. | System
  2. | Developer
  3. | Remove
Sourcetype model_capabilities = {
  1. is_reasoning_model : bool;
  2. system_message_mode : system_message_mode;
  3. default_max_tokens : int;
  4. supports_structured_output : bool;
  5. supports_vision : bool;
  6. supports_tool_calling : bool;
}
Sourcetype known_model =
  1. | Gpt_4_1
  2. | Gpt_4_1_mini
  3. | Gpt_4_1_nano
  4. | Gpt_4o
  5. | Gpt_4o_mini
  6. | Gpt_4_turbo
  7. | Gpt_4
  8. | Gpt_3_5_turbo
  9. | O1
  10. | O1_mini
  11. | O3
  12. | O3_mini
  13. | O4_mini
  14. | Custom of string
Sourceval to_model_id : known_model -> string
Sourceval of_model_id : string -> known_model

Exact match on base model IDs. Dated variants (e.g. "gpt-4o-2024-08-06") return Custom. Use capabilities for prefix-based detection.

Sourceval capabilities : string -> model_capabilities

Get capabilities from a raw model ID string. Routes through of_model_id first, with prefix-based fallback for Custom variants.

Sourceval is_reasoning_model : string -> bool

Convenience: check if a model ID is a reasoning model.