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.6.tbz
sha256=44e7f6ebef6da2828ec2844dd5b38c8f37284c08e54a29e06f6a8822df6f8e10
sha512=ce31d0868abf28bcaef7b24a0ab09b37dcfc94db3de96b38ff36a03800ae59a19e8009a35314f93191b3c8f178c40f8569630d4389f56ddc2f2cc94fb7bffc3c

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.