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.1.tbz
sha256=cb3b82428abcda76c02ec92f8103a4db28edf3f42795794a37135e9a3c40af96
sha512=11be8889ee25bee67b2be00553c42a4692bc73e5ce23985e8bb87f8a07e9d8f556b5a63b219fe5fe30366c8b0d4edae494afa80ccfbfcb112f1fa1e458de55bf

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.